Home » Modeling » EMF » [CDO] PackageNotFoundException when committing a transaction
[CDO] PackageNotFoundException when committing a transaction [message #481112] |
Wed, 19 August 2009 16:29 |
Eclipse User |
|
|
|
Originally posted by: eagankh.gmail.com
I am using CDO 2.0 and running everything in an Eclipse environment.
When I commit a transaction to my CDO server, the server seems to fail
when trying to load the metamodel (ecore) for my model when it's
attempting to decode the data sent from the client (I think!). It throws
the following exception:
[ERROR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
([namespace uri of my model], 5, 61)
org.eclipse.net4j.util.WrappedException:
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
uri 'http://www.eclipse.org/emf/2002/Ecore' not found. ([namespace uri of
my model], 5, 61)
at org.eclipse.net4j.util.WrappedException.wrap(WrappedExceptio n.java:37)
at
org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:256)
at
org.eclipse.emf.cdo.common.model.CDOModelUtil.readPackage(CD OModelUtil.java:381)
at
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .read(CDOPackageUnitImpl.java:282)
at
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOPackageUnit(CDODataInputImpl.java:89)
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:267)
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
at
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
at
org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
at
org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
at
org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
at
org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
at java.lang.Thread.run(Thread.java:637)
Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
([namespace uri of my model], 5, 61)
at
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
at
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
at
org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:249)
... 16 more
Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
with uri 'http://www.eclipse.org/emf/2002/Ecore' not found. ([namespace
uri of my model], 5, 61)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
at
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
at
org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
at
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
at
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
at
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
at
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
at
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
at
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
... 19 more
In the client, I am creating the session and transaction as follows:
Session:
IConnector connector = TCPUtil.getConnector(IPluginContainer.INSTANCE,
CDO_SERVER);
// Create CDO session configuration
CDOSessionConfiguration config = CDONet4jUtil.createSessionConfiguration();
config.setConnector(connector);
config.setRepositoryName("repo1");
CDOSession session = config.openSession();
// I have tried it with and without the following code -- no difference
CDOPackageRegistry registry = session.getPackageRegistry();
CDOPackageRegistryPopulator.populate(registry);
Transaction:
CDOTransaction transaction = session.openTransaction();
CDOResource resource = transaction.getOrCreateResource("users");
resource.getContents().add(user);
transaction.commit();
I've done lots of searching and trying things with no success, so any help
would be greatly appreciated!
-Kelly
|
|
|
Re: [CDO] PackageNotFoundException when committing a transaction [message #481230 is a reply to message #481112] |
Thu, 20 August 2009 08:05 |
Andre Dietisheim Messages: 131 Registered: July 2009 |
Senior Member |
|
|
Hi Kelly
you could try to register your ecore-package manually:
CDOPackageRegistry registry = session.getPackageRegistry();
registry.putEPackage(YOURPACKAGE.eINSTANCE)
does this help?
Cheers
André
Kelly Eagan wrote:
> I am using CDO 2.0 and running everything in an Eclipse environment.
>
> When I commit a transaction to my CDO server, the server seems to fail
> when trying to load the metamodel (ecore) for my model when it's
> attempting to decode the data sent from the client (I think!). It
> throws the following exception:
>
> [ERROR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
> ([namespace uri of my model], 5, 61)
> org.eclipse.net4j.util.WrappedException:
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
> uri 'http://www.eclipse.org/emf/2002/Ecore' not found. ([namespace uri
> of my model], 5, 61)
> at
> org.eclipse.net4j.util.WrappedException.wrap(WrappedExceptio n.java:37)
> at
> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:256)
> at
> org.eclipse.emf.cdo.common.model.CDOModelUtil.readPackage(CD OModelUtil.java:381)
>
> at
> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .read(CDOPackageUnitImpl.java:282)
>
> at
> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOPackageUnit(CDODataInputImpl.java:89)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:267)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>
> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>
> at
> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>
> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>
> at java.lang.Thread.run(Thread.java:637)
> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
> ([namespace uri of my model], 5, 61)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
>
> at
> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:249)
> ... 16 more
> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found. ([namespace
> uri of my model], 5, 61)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
> ... 19 more
>
>
> In the client, I am creating the session and transaction as follows:
>
> Session:
>
> IConnector connector = TCPUtil.getConnector(IPluginContainer.INSTANCE,
> CDO_SERVER);
>
> // Create CDO session configuration
> CDOSessionConfiguration config = CDONet4jUtil.createSessionConfiguration();
> config.setConnector(connector);
> config.setRepositoryName("repo1");
>
> CDOSession session = config.openSession();
>
> // I have tried it with and without the following code -- no difference
> CDOPackageRegistry registry = session.getPackageRegistry();
> CDOPackageRegistryPopulator.populate(registry);
>
>
> Transaction:
>
> CDOTransaction transaction = session.openTransaction();
> CDOResource resource = transaction.getOrCreateResource("users");
>
> resource.getContents().add(user);
> transaction.commit();
>
> I've done lots of searching and trying things with no success, so any
> help would be greatly appreciated!
>
> -Kelly
>
>
>
|
|
|
Re: [CDO] PackageNotFoundException when committing a transaction [message #481325 is a reply to message #481230] |
Thu, 20 August 2009 13:38 |
Eclipse User |
|
|
|
Originally posted by: eagankh.gmail.com
Thanks for the suggestion! I did try this and, unfortunately, it didn't
work. I still get the same error.
-Kelly
Ande Dietisheim wrote:
> Hi Kelly
> you could try to register your ecore-package manually:
> CDOPackageRegistry registry = session.getPackageRegistry();
> registry.putEPackage(YOURPACKAGE.eINSTANCE)
> does this help?
> Cheers
> André
> Kelly Eagan wrote:
>> I am using CDO 2.0 and running everything in an Eclipse environment.
>>
>> When I commit a transaction to my CDO server, the server seems to fail
>> when trying to load the metamodel (ecore) for my model when it's
>> attempting to decode the data sent from the client (I think!). It
>> throws the following exception:
>>
>> [ERROR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>> ([namespace uri of my model], 5, 61)
>> org.eclipse.net4j.util.WrappedException:
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package with
>> uri 'http://www.eclipse.org/emf/2002/Ecore' not found. ([namespace uri
>> of my model], 5, 61)
>> at
>> org.eclipse.net4j.util.WrappedException.wrap(WrappedExceptio n.java:37)
>> at
>> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:256)
>> at
>>
org.eclipse.emf.cdo.common.model.CDOModelUtil.readPackage(CD OModelUtil.java:381)
>>
>> at
>>
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .read(CDOPackageUnitImpl.java:282)
>>
>> at
>>
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOPackageUnit(CDODataInputImpl.java:89)
>>
>> at
>>
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:267)
>>
>> at
>>
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>>
>> at
>>
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>>
>> at
>>
org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>>
>> at
>>
org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>>
>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>> at
>>
org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>>
>> at
>>
org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>>
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
>> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
>> at
>>
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
>>
>> at
>>
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>>
>> at java.lang.Thread.run(Thread.java:637)
>> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>> ([namespace uri of my model], 5, 61)
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
>>
>> at
>> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:249)
>> ... 16 more
>> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
>> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found. ([namespace
>> uri of my model], 5, 61)
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
>> at
>>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>>
>> at
>>
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>>
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>> ... 19 more
>>
>>
>> In the client, I am creating the session and transaction as follows:
>>
>> Session:
>>
>> IConnector connector = TCPUtil.getConnector(IPluginContainer.INSTANCE,
>> CDO_SERVER);
>>
>> // Create CDO session configuration
>> CDOSessionConfiguration config = CDONet4jUtil.createSessionConfiguration();
>> config.setConnector(connector);
>> config.setRepositoryName("repo1");
>>
>> CDOSession session = config.openSession();
>>
>> // I have tried it with and without the following code -- no difference
>> CDOPackageRegistry registry = session.getPackageRegistry();
>> CDOPackageRegistryPopulator.populate(registry);
>>
>>
>> Transaction:
>>
>> CDOTransaction transaction = session.openTransaction();
>> CDOResource resource = transaction.getOrCreateResource("users");
>>
>> resource.getContents().add(user);
>> transaction.commit();
>>
>> I've done lots of searching and trying things with no success, so any
>> help would be greatly appreciated!
>>
>> -Kelly
>>
>>
>>
|
|
|
Re: [CDO] PackageNotFoundException when committing a transaction [message #481403 is a reply to message #481112] |
Thu, 20 August 2009 19:56 |
|
Kelly,
The exception is absolutely strange. I have no idea what leads to
loading the Ecore meta meta model itself from XMI!
Have you tried to ommit the populate() call of the registry populator?
Usually it's not needed to populate the registry upfront...
Cheers
/Eike
----
http://thegordian.blogspot.com
Kelly Eagan schrieb:
> I am using CDO 2.0 and running everything in an Eclipse environment.
>
> When I commit a transaction to my CDO server, the server seems to fail
> when trying to load the metamodel (ecore) for my model when it's
> attempting to decode the data sent from the client (I think!). It
> throws the following exception:
>
> [ERROR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
> ([namespace uri of my model], 5, 61)
> org.eclipse.net4j.util.WrappedException:
> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package
> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
> ([namespace uri of my model], 5, 61)
> at
> org.eclipse.net4j.util.WrappedException.wrap(WrappedExceptio n.java:37)
> at
> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:256)
> at
> org.eclipse.emf.cdo.common.model.CDOModelUtil.readPackage(CD OModelUtil.java:381)
>
> at
> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .read(CDOPackageUnitImpl.java:282)
>
> at
> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOPackageUnit(CDODataInputImpl.java:89)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:267)
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>
> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>
> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>
> at
> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>
> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>
> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>
> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
>
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>
> at java.lang.Thread.run(Thread.java:637)
> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
> ([namespace uri of my model], 5, 61)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
>
> at
> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:249)
> ... 16 more
> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
> ([namespace uri of my model], 5, 61)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>
> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>
> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>
> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>
> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>
> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>
> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>
> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
> ... 19 more
>
>
> In the client, I am creating the session and transaction as follows:
>
> Session:
>
> IConnector connector = TCPUtil.getConnector(IPluginContainer.INSTANCE,
> CDO_SERVER);
>
> // Create CDO session configuration
> CDOSessionConfiguration config =
> CDONet4jUtil.createSessionConfiguration();
> config.setConnector(connector);
> config.setRepositoryName("repo1");
>
> CDOSession session = config.openSession();
>
> // I have tried it with and without the following code -- no difference
> CDOPackageRegistry registry = session.getPackageRegistry();
> CDOPackageRegistryPopulator.populate(registry);
>
>
> Transaction:
>
> CDOTransaction transaction = session.openTransaction();
> CDOResource resource = transaction.getOrCreateResource("users");
>
> resource.getContents().add(user);
> transaction.commit();
>
> I've done lots of searching and trying things with no success, so any
> help would be greatly appreciated!
>
> -Kelly
>
>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] PackageNotFoundException when committing a transaction [message #481621 is a reply to message #481403] |
Fri, 21 August 2009 22:16 |
Eclipse User |
|
|
|
Originally posted by: eagankh.gmail.com
Eike,
I've tried it with and without the populate() call. I only added that code
while trying various things to make it work. Today I created a fresh
workspace for the server in case there was something corrupted in the
other one. I'm still getting the same error though.
Is there something that I need to do on the server side to ensure that my
model is loaded properly? I currently do not have any server side code
that I've written...just have the generated model code. I use
cdo-server.xml to configure the server rather than doing it
programmatically as I've seen others do online.
Is it possible that I am missing a dependency somewhere that is ultimately
causing this error? I've fought dependency issues all along the way while
setting everything up so I wouldn't be surprised if something is still
missing.
I don't know if it's relevant but my cdo-server.xml file is below. I'm
trying to use this with Hibernate and HSQLDB.
<?xml version="1.0" encoding="UTF-8"?>
<cdoServer>
<!--
<acceptor type="http"/>
-->
<acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
<!--
<negotiator type="challenge" description="/temp/users.db"/>
-->
</acceptor>
<repository name="repo1">
<!--
<property name="overrideUUID"
value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
-->
<property name="supportingAudits" value="false"/>
<property name="verifyingRevisions" value="false"/>
<property name="currentLRUCapacity" value="10000"/>
<property name="revisedLRUCapacity" value="100"/>
<property name="hibernate.hbm2ddl.auto" value="update" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.connection.pool_size" value="10" />
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect" />
<property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver" />
<!--
<property name="hibernate.connection.url"
value="jdbc:hsqldb:mem:testdb" />
-->
<property name="hibernate.connection.url"
value="jdbc:hsqldb:file:testdb" />
<property name="hibernate.connection.username" value="sa" />
<!--
<property name="hibernate.connection.password" value="" />
-->
<property name="hibernate.connection.autocommit" value="true" />
<property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider" />
<property name="teneo.mapping.inheritance" value="TABLE_PER_CLASS"
/>
<property name="teneo.naming.id_feature_as_primary_key" value="id"
/>
<store type="hibernate">
<mappingProvider type="teneo" />
</store>
</repository>
</cdoServer>
Thanks,
Kelly
Eike Stepper wrote:
> Kelly,
> The exception is absolutely strange. I have no idea what leads to
> loading the Ecore meta meta model itself from XMI!
> Have you tried to ommit the populate() call of the registry populator?
> Usually it's not needed to populate the registry upfront...
> Cheers
> /Eike
> ----
> http://thegordian.blogspot.com
> Kelly Eagan schrieb:
>> I am using CDO 2.0 and running everything in an Eclipse environment.
>>
>> When I commit a transaction to my CDO server, the server seems to fail
>> when trying to load the metamodel (ecore) for my model when it's
>> attempting to decode the data sent from the client (I think!). It
>> throws the following exception:
>>
>> [ERROR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>> ([namespace uri of my model], 5, 61)
>> org.eclipse.net4j.util.WrappedException:
>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package
>> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>> ([namespace uri of my model], 5, 61)
>> at
>> org.eclipse.net4j.util.WrappedException.wrap(WrappedExceptio n.java:37)
>> at
>> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:256)
>> at
>>
org.eclipse.emf.cdo.common.model.CDOModelUtil.readPackage(CD OModelUtil.java:381)
>>
>> at
>>
org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .read(CDOPackageUnitImpl.java:282)
>>
>> at
>>
org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOPackageUnit(CDODataInputImpl.java:89)
>>
>> at
>>
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:267)
>>
>> at
>>
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>>
>> at
>>
org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>>
>> at
>>
org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>>
>> at
>>
org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>>
>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>> at
>>
org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>>
>> at
>>
org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>>
>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
>> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
>> at
>>
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
>>
>> at
>>
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>>
>> at java.lang.Thread.run(Thread.java:637)
>> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>> ([namespace uri of my model], 5, 61)
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>>
>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
>>
>> at
>> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:249)
>> ... 16 more
>> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package
>> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>> ([namespace uri of my model], 5, 61)
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>>
>> at
>>
org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>>
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>>
>> at
>>
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>>
>> at
>>
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>>
>> at
>>
com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>>
>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>> at
>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>> ... 19 more
>>
>>
>> In the client, I am creating the session and transaction as follows:
>>
>> Session:
>>
>> IConnector connector = TCPUtil.getConnector(IPluginContainer.INSTANCE,
>> CDO_SERVER);
>>
>> // Create CDO session configuration
>> CDOSessionConfiguration config =
>> CDONet4jUtil.createSessionConfiguration();
>> config.setConnector(connector);
>> config.setRepositoryName("repo1");
>>
>> CDOSession session = config.openSession();
>>
>> // I have tried it with and without the following code -- no difference
>> CDOPackageRegistry registry = session.getPackageRegistry();
>> CDOPackageRegistryPopulator.populate(registry);
>>
>>
>> Transaction:
>>
>> CDOTransaction transaction = session.openTransaction();
>> CDOResource resource = transaction.getOrCreateResource("users");
>>
>> resource.getContents().add(user);
>> transaction.commit();
>>
>> I've done lots of searching and trying things with no success, so any
>> help would be greatly appreciated!
>>
>> -Kelly
>>
>>
>>
|
|
|
Re: [CDO] PackageNotFoundException when committing a transaction [message #481648 is a reply to message #481621] |
Sat, 22 August 2009 08:37 |
|
Kelly,
Can you send me your model so that I can play with it?
If you don't want to attach it to this public thread you can send it
privately to stepper at esc-net dot de.
Please also send your .launch file!
Cheers
/Eike
----
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Kelly Eagan schrieb:
>
> Eike,
>
> I've tried it with and without the populate() call. I only added that
> code while trying various things to make it work. Today I created a
> fresh workspace for the server in case there was something corrupted
> in the other one. I'm still getting the same error though.
>
> Is there something that I need to do on the server side to ensure that
> my model is loaded properly? I currently do not have any server side
> code that I've written...just have the generated model code. I use
> cdo-server.xml to configure the server rather than doing it
> programmatically as I've seen others do online.
>
> Is it possible that I am missing a dependency somewhere that is
> ultimately causing this error? I've fought dependency issues all along
> the way while setting everything up so I wouldn't be surprised if
> something is still missing.
>
> I don't know if it's relevant but my cdo-server.xml file is below. I'm
> trying to use this with Hibernate and HSQLDB.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <cdoServer>
>
> <!--
> <acceptor type="http"/>
> -->
>
> <acceptor type="tcp" listenAddr="0.0.0.0" port="2036">
> <!--
> <negotiator type="challenge" description="/temp/users.db"/>
> -->
> </acceptor>
>
> <repository name="repo1">
> <!--
> <property name="overrideUUID"
> value="1ff5d226-b1f0-40fb-aba2-0c31b38c764f"/>
> -->
> <property name="supportingAudits" value="false"/>
> <property name="verifyingRevisions" value="false"/>
> <property name="currentLRUCapacity" value="10000"/>
> <property name="revisedLRUCapacity" value="100"/>
> <property name="hibernate.hbm2ddl.auto" value="update" />
> <property name="hibernate.show_sql" value="true" />
> <property name="hibernate.connection.pool_size" value="10" />
> <property name="hibernate.dialect"
> value="org.hibernate.dialect.HSQLDialect" />
> <property name="hibernate.connection.driver_class"
> value="org.hsqldb.jdbcDriver" />
> <!-- <property name="hibernate.connection.url"
> value="jdbc:hsqldb:mem:testdb" />
> -->
> <property name="hibernate.connection.url"
> value="jdbc:hsqldb:file:testdb" />
> <property name="hibernate.connection.username" value="sa" />
> <!-- <property name="hibernate.connection.password"
> value="" />
> -->
> <property name="hibernate.connection.autocommit" value="true" />
> <property name="hibernate.cache.provider_class"
> value="org.hibernate.cache.HashtableCacheProvider" />
>
> <property name="teneo.mapping.inheritance"
> value="TABLE_PER_CLASS" />
> <property name="teneo.naming.id_feature_as_primary_key"
> value="id" />
> <store type="hibernate">
> <mappingProvider type="teneo" />
> </store> </repository>
>
> </cdoServer>
>
>
> Thanks,
> Kelly
>
> Eike Stepper wrote:
>
>> Kelly,
>
>> The exception is absolutely strange. I have no idea what leads to
>> loading the Ecore meta meta model itself from XMI!
>
>> Have you tried to ommit the populate() call of the registry populator?
>> Usually it's not needed to populate the registry upfront...
>
>> Cheers
>> /Eike
>
>> ----
>> http://thegordian.blogspot.com
>
>
>
>> Kelly Eagan schrieb:
>>> I am using CDO 2.0 and running everything in an Eclipse environment.
>>>
>>> When I commit a transaction to my CDO server, the server seems to
>>> fail when trying to load the metamodel (ecore) for my model when
>>> it's attempting to decode the data sent from the client (I think!).
>>> It throws the following exception:
>>>
>>> [ERROR] org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
>>> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>>> ([namespace uri of my model], 5, 61)
>>> org.eclipse.net4j.util.WrappedException:
>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package
>>> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>>> ([namespace uri of my model], 5, 61)
>>> at
>>> org.eclipse.net4j.util.WrappedException.wrap(WrappedExceptio n.java:37)
>>> at
>>> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:256)
>>>
>>> at
> org.eclipse.emf.cdo.common.model.CDOModelUtil.readPackage(CD OModelUtil.java:381)
>
>>>
>>> at
> org.eclipse.emf.cdo.internal.common.model.CDOPackageUnitImpl .read(CDOPackageUnitImpl.java:282)
>
>>>
>>> at
> org.eclipse.emf.cdo.internal.common.io.CDODataInputImpl.read CDOPackageUnit(CDODataInputImpl.java:89)
>
>>>
>>> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicatingCommit(CommitTransactionIndication.ja va:267)
>
>>>
>>> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:197 )
>
>>>
>>> at
> org.eclipse.emf.cdo.internal.server.protocol.CommitTransacti onIndication.indicating(CommitTransactionIndication.java:140 )
>
>>>
>>> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.indicating (IndicationWithMonitoring.java:84)
>
>>>
>>> at
> org.eclipse.net4j.signal.IndicationWithResponse.doExtendedIn put(IndicationWithResponse.java:90)
>
>>>
>>> at org.eclipse.net4j.signal.Signal.doInput(Signal.java:312)
>>> at
> org.eclipse.net4j.signal.IndicationWithResponse.execute(Indi cationWithResponse.java:63)
>
>>>
>>> at
> org.eclipse.net4j.signal.IndicationWithMonitoring.execute(In dicationWithMonitoring.java:63)
>
>>>
>>> at org.eclipse.net4j.signal.Signal.runSync(Signal.java:239)
>>> at org.eclipse.net4j.signal.Signal.run(Signal.java:147)
>>> at
> java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Threa dPoolExecutor.java:886)
>
>>>
>>> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoo lExecutor.java:908)
>
>>>
>>> at java.lang.Thread.run(Thread.java:637)
>>> Caused by:
>>> org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package
>>> with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>>> ([namespace uri of my model], 5, 61)
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLL oadImpl.java:83)
>
>>>
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:191)
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLRes ourceImpl.java:180)
>
>>>
>>> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1494)
>
>>>
>>> at
>>> org.eclipse.emf.cdo.common.model.EMFUtil.createEPackage(EMFU til.java:249)
>>>
>>> ... 16 more
>>> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException:
>>> Package with uri 'http://www.eclipse.org/emf/2002/Ecore' not found.
>>> ([namespace uri of my model], 5, 61)
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(X MLHandler.java:2590)
>
>>>
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefi x(XMLHandler.java:2421)
>
>>>
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType (XMLHandler.java:1299)
>
>>>
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XM LHandler.java:1468)
>
>>>
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XML Handler.java:1019)
>
>>>
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMI Handler.java:83)
>
>>>
>>> at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:1001)
>
>>>
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHa ndler.java:712)
>>>
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHa ndler.java:169)
>>>
>>> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .startElement(AbstractSAXParser.java:501)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator. startElement(XMLDTDValidator.java:767)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.j ava:1359)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$ContentDriver.scanRootElementHook(XMLDocumentScannerImpl. java:1316)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl$FragmentContentDriver.next(XMLDocumentFragmentSca nnerImpl.java:3095)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl$PrologDriver.next(XMLDocumentScannerImpl.java:921)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerIm pl.next(XMLDocumentScannerImpl.java:648)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentS cannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java: 510)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:807)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuratio n.parse(XML11Configuration.java:737)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(X MLParser.java:107)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser .parse(AbstractSAXParser.java:1205)
>
>>>
>>> at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSA XParser.parse(SAXParserImpl.java:522)
>
>>>
>>> at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>>> at
>>> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl. java:181)
>>> ... 19 more
>>>
>>>
>>> In the client, I am creating the session and transaction as follows:
>>>
>>> Session:
>>>
>>> IConnector connector =
>>> TCPUtil.getConnector(IPluginContainer.INSTANCE, CDO_SERVER);
>>>
>>> // Create CDO session configuration
>>> CDOSessionConfiguration config =
>>> CDONet4jUtil.createSessionConfiguration();
>>> config.setConnector(connector);
>>> config.setRepositoryName("repo1");
>>> CDOSession session = config.openSession();
>>>
>>> // I have tried it with and without the following code -- no difference
>>> CDOPackageRegistry registry = session.getPackageRegistry();
>>> CDOPackageRegistryPopulator.populate(registry);
>>>
>>>
>>> Transaction:
>>>
>>> CDOTransaction transaction = session.openTransaction();
>>> CDOResource resource = transaction.getOrCreateResource("users");
>>> resource.getContents().add(user);
>>> transaction.commit();
>>>
>>> I've done lots of searching and trying things with no success, so
>>> any help would be greatly appreciated!
>>>
>>> -Kelly
>>>
>>>
>>>
>
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
| |
Re: [CDO] PackageNotFoundException when committing a transaction [message #962819 is a reply to message #962659] |
Mon, 29 October 2012 10:56 |
|
Am 29.10.2012 09:21, schrieb Patrick Di Loreto:
> I think I solved that problem by adding the org.eclipse.emf bundle in the product configuration, but now I'm getting
> the following exception:
>
>
> java.lang.UnsupportedOperationException: Not yet implemented
> at org.eclipse.emf.cdo.server.internal.mongodb.MongoDBStore.repairAfterCrash(MongoDBStore.java:566)
Unfortunately, according to http://wiki.eclipse.org/CDO/MongoDB_Store , this functionality is not yet implemented
because the original funder of the MongoDBStore stepped back ;-(
> at org.eclipse.emf.cdo.server.internal.mongodb.MongoDBStore.reStart(MongoDBStore.java:558)
> at org.eclipse.emf.cdo.server.internal.mongodb.MongoDBStore.doActivate(MongoDBStore.java:489)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:76)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
> at org.eclipse.emf.cdo.internal.server.Repository.doActivate(Repository.java:1845)
> at org.eclipse.net4j.util.lifecycle.Lifecycle.activate(Lifecycle.java:76)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:114)
> at org.eclipse.net4j.util.lifecycle.LifecycleUtil.activate(LifecycleUtil.java:104)
> at org.eclipse.emf.cdo.server.CDOServerUtil.addRepository(CDOServerUtil.java:208)
> at org.eclipse.emf.cdo.spi.server.RepositoryConfigurator.configure(RepositoryConfigurator.java:111)
> at org.eclipse.emf.cdo.internal.server.bundle.CDOServerApplication.doStart(CDOServerApplication.java:61)
> at org.eclipse.net4j.util.om.OSGiApplication.start(OSGiApplication.java:63)
> at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
> at java.lang.Thread.run(Thread.java:662)
>
>
> looks like the CDO repository has not been stopped properly even if I have executed the following command:
>
>
> osgi>cdo stop myrepo
Have you tried just "close"?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Goto Forum:
Current Time: Mon Sep 23 04:45:51 GMT 2024
Powered by FUDForum. Page generated in 0.04502 seconds
|