Hi Kelvin Yes, this partly represents my szenario. It works for me in a standalone JVM. It works also within a simple servlet szenario. It doesn't work in a servlet/ejb szenario when I run an initialization step when starting up the ejb module such as:
HelperContext hc = HelperProvider.getDefaultContext(); Factory.INSTANCE.register(hc); This initialization is required in order to have all types registered for subsequent rmi/iiop calls. Btw, without having a datagraph in my SDO hierarchy, it all works fine, even in the servlet/ejb szenario. If I omit the initialization step in the ejb, the servlet works fine but the ejb fails when deserializing the serialized datagraph. To me this looks like something (the change package) registered during the ejb initialization in the global registry is not visible to the servlet afterwards. Thanks Erich --- kelvin goodson <[EMAIL PROTECTED]> wrote: > Hi Erich, > > I generated code from your schema and tried the > following lines of code, > which executed without failure ... > > > *public* *void* testErichsProblem() *throws* > Exception { > > PublicationDataGraph pdg = > ServicesFactory.*INSTANCE*.createPublicationDataGraph(); > > DataObject dob = (DataObject)pdg; > ChangeSummary cs = dob.getChangeSummary(); > cs.beginLogging(); > } > > does this represent a distilled version of your > scenario? > > Regards,Kelvin > On 29/06/07, Erich Rueede <[EMAIL PROTECTED]> wrote: > > > > Hi > > > > I am testing with the SDO beta-1 code. > > > > I generated static SDO classes with an embedded > > datagraph by extending the BaseDataGraphType > > as described in the SDO 2.1 spec using the > following > > XSD: > > > > <xsd:schema > xmlns="http://www.w3.org/2001/XMLSchema" > > targetNamespace="http://abc.com/services" > > xmlns:tns="http://abc.com/services" > > xmlns:sdo="commonj.sdo" > > xmlns:sdoJava="commonj.sdo/java" > > xmlns:sdoXml="commonj.sdo/xml" > > sdoJava:package="com.abc.services" > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > > > > <xsd:complexType > name="PublicationDataGraph"> > > <complexContent> > > <extension > base="sdo:BaseDataGraphType"> > > <xsd:sequence> > > > <xsd:element name="test" > > type="xsd:string" /> > > </xsd:sequence> > > </extension> > > </complexContent> > > </xsd:complexType> > > > > <xsd:complexType > name="ModifyPublicationInput" > > <xsd:sequence> > > <xsd:element > name="PublicationDataGraph" > > type="tns:PublicationDataGraph" /> > > </xsd:sequence> > > </xsd:complexType> > > </xsd:schema> > > > > > > After I instantiated the top level DataObject > > (ModifyPubicationInput) containing the embedded > > Datagraph, > > I tried to beginLogging which causes the following > > exception in > > > org.eclipse.emf.ecore.change.ChangePackage$Literals.<clinit>( > > ChangePackage.java:903). > > > > The same exception also happens when I try to > > serialize the toplevel DataObject to XML or when I > try > > to > > send it via RMI/IIOP to an EJB. > > > > > > [6/29/07 11:32:31:898 CEST] 7dec7dec WebGroup > E > > SRVE0026E: [Servlet Error]-[]: > > java.lang.ExceptionInInitializerError > > at > java.lang.Class.initialize(Class.java:345) > > at > > > org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.getObjectChanges( > > ChangeDescriptionImpl.java:141) > > at > > > org.apache.tuscany.sdo.impl.ChangeSummaryImpl.beginLogging( > > ChangeSummaryImpl.java:190) > > at > > > com.abc.servlet.TestServlet.doPost(TestServlet.java:156) > > at > > > com.abc.servlet.TestServlet.doGet(TestServlet.java:127) > > at > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:740) > > at > > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853) > > at > > > com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService( > > StrictServletInstance.java:110) > > at > > > com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service( > > StrictLifecycleServlet.java:174) > > at > > > com.ibm.ws.webcontainer.servlet.IdleServletState.service( > > StrictLifecycleServlet.java:313) > > at > > > com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service( > > StrictLifecycleServlet.java:116) > > at > > > com.ibm.ws.webcontainer.servlet.ServletInstance.service( > > ServletInstance.java:283) > > at > > > com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch( > > ValidServletReferenceState.java:42) > > at > > > com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch( > > ServletInstanceReference.java:40) > > at > > > > > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch > > (WebAppRequestDispatcher.java:1018) > > at > > > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch( > > WebAppRequestDispatcher.java:529) > > at > > > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward( > > WebAppRequestDispatcher.java:208) > > at > > > com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java > > :134) > > at > > > com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook( > > WebAppInvoker.java:321) > > at > > > com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation > > (CachedInvocation.java:71) > > at > > > com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI( > > ServletRequestProcessor.java:246) > > at > > > com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service( > > OSEListener.java:334) > > at > > > com.ibm.ws.webcontainer.http.HttpConnection.handleRequest( > > HttpConnection.java:56) > > at > > > com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java > > :652) > > at > > > com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448) > > at > > > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937) > > Caused by: java.lang.NullPointerException > > at > > > org.eclipse.emf.ecore.change.ChangePackage$Literals.<clinit>( > > ChangePackage.java:903) > > at java.lang.Class.initializeImpl(Native > Method) > > at > java.lang.Class.initialize(Class.java:339) > > at > > > org.eclipse.emf.ecore.change.impl.ChangeDescriptionImpl.getObjectChanges( > > ChangeDescriptionImpl.java:141) > > at > === message truncated === ____________________________________________________________________________________ Bored stiff? Loosen up... Download and play hundreds of games for free on Yahoo! Games. http://games.yahoo.com/games/front --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]