to be sure about this, I'd need to be able to recreate the problem
with a bit of test code, and I've not played with SDO using RMI calls,
but the SDO metadata associated with the namespace URI must be
available when the XML document is parsed. This would be made
available when either the XSDHelper is used to load a schema or
generated SDO classes are registered with the environment, and it is
going to need to be available in the jvm that the xml parsing is
happening.

Kelvin.

2009/11/20 Malisetti, Ramanjaneyulu <ramanjaneyulu.malise...@ca.com>:
> Hi,
>
>           We have a class called Descriptor that loads XML and XSD files to
> build SDO objects, this we are doing in its constructor.  We have another
> class called Container that contains Descriptor  class.  If we make
> Container class object as Remotable (Exported as RMI object) and call a
> method on remotable object on RMI client side to get descriptor, it is
> throwing the following exception . The below “not found URI” is there in
> XML file. We are not getting what is the problem. Could you  helps us here
> what is going wrong? BTW, we ensured all required interfaces as  Remote so
> that there is nothing wrong on RMI side.
>
> java.rmi.UnmarshalException: error unmarshalling return; nested exception
> is:
>
>         org.eclipse.emf.ecore.resource.Resource$IOWrappedException: Package
> with uri 'http://www.abc.com/connex' not found. (http:///temp.xml, 3, 106)
>
>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:173)
>
>         at
> java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(RemoteObjectInvocationHandler.java:178)
>
>         at
> java.rmi.server.RemoteObjectInvocationHandler.invoke(RemoteObjectInvocationHandler.java:132)
>
>         at $Proxy8.getDescriptor(Unknown Source)
>
>         at
> com.abc.connector.impl.infrastructure.rmi.RemoteRMIConnectorProxy.getDescriptor(RemoteRMIConnectorProxy.java:66)
>
>         at
> com.abc.connector.impl.infrastructure.rmi.test.TestRMIConnector.setUpBeforeClass(TestRMIConnector.java:79)
>
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
>         at java.lang.reflect.Method.invoke(Method.java:597)
>
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAfterRunner.java:74)
>
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfterRunner.java:50)
>
>         at
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:33)
>
>         at
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>
>         at
> org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45)
>
>         at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>
>         at
> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
> Caused by: org.eclipse.emf.ecore.resource.Resource$IOWrappedException:
> Package with uri 'http://www.abc.com/connex' not found. (http:///temp.xml,
> 3, 106)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.handleErrors(XMLLoadImpl.java:83)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:278)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:666)
>
>         at
> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl.doLoad(SDOXMLResourceImpl.java:589)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.load(XMLResourceImpl.java:634)
>
>         at
> org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:266)
>
>         at
> org.apache.tuscany.sdo.helper.XMLDocumentImpl.load(XMLDocumentImpl.java:239)
>
>         at
> org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:97)
>
>         at
> org.apache.tuscany.sdo.helper.XMLHelperImpl.load(XMLHelperImpl.java:79)
>
>         at
> org.apache.tuscany.sdo.spi.HelperProviderBase$ResolvableImpl.readDataObject(HelperProviderBase.java:229)
>
>         at
> org.apache.tuscany.sdo.spi.HelperProviderBase$ResolvableImpl.readExternal(HelperProviderBase.java:161)
>
>         at
> commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
>
>         at
> java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
>
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
>
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>
>         at
> org.apache.tuscany.sdo.spi.HelperProviderBase$ResolvableImpl.readDataObject(HelperProviderBase.java:238)
>
>         at
> org.apache.tuscany.sdo.spi.HelperProviderBase$ResolvableImpl.readExternal(HelperProviderBase.java:161)
>
>         at
> commonj.sdo.impl.ExternalizableDelegator.readExternal(ExternalizableDelegator.java:83)
>
>         at
> java.io.ObjectInputStream.readExternalData(ObjectInputStream.java:1792)
>
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1751)
>
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
>
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
>
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>
>         at
> java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1947)
>
>         at
> java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1871)
>
>         at
> java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
>
>         at
> java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
>
>         at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
>
>         at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:306)
>
>         at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:155)
>
>         ... 19 more
>
> Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with
> uri 'http://www.abc.com/connex' not found. (http:///temp.xml, 3, 106)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2350)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2188)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectFromTypeName(XMLHandler.java:1828)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObject(XMLHandler.java:1787)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.handleFeature(XMLHandler.java:1569)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createDocumentRoot(XMLHandler.java:1237)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1165)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1247)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:883)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:866)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:627)
>
>         at
> org.apache.tuscany.sdo.util.resource.SDOXMLResourceImpl$SDOXMLLoadImpl$XmlHandler.startElement(SDOXMLResourceImpl.java:405)
>
>         at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(XMLNSDocumentScannerImpl.java:626)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:3088)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(XMLDocumentScannerImpl.java:914)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:647)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140)
>
>         at
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:508)
>
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807)
>
>         at
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
>
>         at
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107)
>
>         at
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
>
>         at
> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
>
>         at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
>
>         at
> org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:268)
>
>         ... 50 more
>
> Regards
>
> Raman

Reply via email to