I've managed to reproduce the problem with a simple test, and marshalling
manually. If I run this code I get the same error:
LoginApplicationCallParameter lCallParam = new
LoginApplicationCallParameter();
lCallParam.setPassword("tim");
lCallParam.setUserName("tim");
LoginApplicationResponseParameter lResponseParam = new
LoginApplicationResponseParameter();
lResponseParam.setApplicationDate(new Date());
lResponseParam.setSecurityToken("fhkjhgkjdfhgkjhdfgkjdhfk");
lResponseParam.setUserName("tim");
IBindingFactory lBindingFactory1 =
BindingDirectory.getFactory(LoginApplicationCallParameter.class);
IMarshallingContext lMarshallContext1 =
lBindingFactory1.createMarshallingContext();
lMarshallContext1.setIndent(2);
lMarshallContext1.marshalDocument(lCallParam, "UTF-8", null, new
FileOutputStream("/home/tjs/LoginCall.xml"));
IBindingFactory lBindingFactory2 =
BindingDirectory.getFactory(LoginApplicationResponseParameter.class);
IMarshallingContext lMarshallContext2 =
lBindingFactory2.createMarshallingContext();
lMarshallContext2.setIndent(2);
lMarshallContext2.marshalDocument(lCallParam, "UTF-8", null,
new FileOutputStream("/home/tjs/LoginResponse.xml"));
The important thing to note is that both lMarshallContexts are passed the
lCallParameter, where the second one should have been passed
lResponseParameter (and if you do it works fine) So in the second case, I'm
trying to marshall lCallParameter given a factory from
LoginApplicationResponseParameter. The error is:
java.lang.NullPointerException
at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.jibx.runtime.impl.MarshallingContext.getMarshaller(MarshallingContext.java:876)
at
com.comany.gateway.base.param.classes.LoginApplicationCallParameter.marshal(LoginApplicationCallParameter.java)
at
org.jibx.runtime.impl.MarshallingContext.marshalRoot(MarshallingContext.java:919)
at
org.jibx.runtime.impl.MarshallingContext.marshalDocument(MarshallingContext.java:967)
at com.company.webservices.test.BindingTest.testBinding(BindingTest.java:69)
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:324)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:421)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:305)
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:186)
So all I need to do now is work out why when it's failing when returning from
the soap call. I presume it's trying to marshall with the wrong Factory
somehow. Any thoughts would be appreciated.
Tim.
On Tuesday 02 Nov 2004 17:22, Dennis Sosnoski wrote:
> Should have read the rest of the emails in this thread before sending my
> reply to your original email. This server error looks like something is
> going wrong in the process of loading one of the JiBX
> marshaller/unmarshaller classes (probably one of the classes added by
> the JiBX binding compiler when you run it on your binding). What makes
> this really strange is that you're getting a null pointer exception
> inside the actual class loader code. I don't know what could cause this.
>
> To find the problem you could step into the JiBX code (if you're able to
> use a debugger for your server environment) and see what class it's
> trying to load - perhaps the class name has somehow been corrupted for
> the JiBX code. If the class name looks good and should be available for
> loading you can try tracing into the classloading to see where the error
> is occurring. If you can't debug, you can add a print statement to the
> JiBX MarshallingContext code before line 876 to see what's going wrong
> (it's easy to rebuild JiBX from the distribution, as long as you've got
> Ant installed - just the default Ant target in the /build directory will
> regenerate the jar files).
>
> - Dennis
>
> Tim Sawyer wrote:
> >I have narrowed this down now to an error on the server side.
> >
> >I was using Orion 2.0 to produce the error I posted before, but if you run
> > it in Tomcat (5.0.25) you get a different client side error, but still
> > the same server side error.
> >
> >Here's the Tomcat client error:
> >
> > [junit] Caused by: org.jibx.soap.SOAPException: Error unmarshalling
> > message body [junit] Root cause: org.jibx.runtime.JiBXException: Error
> > accessing document
> >
> > [junit] Root cause: java.io.EOFException: no more data available
> > [junit] at org.jibx.soap.SOAPContext.getReceivePayload(Unknown
> > Source) [junit] at org.jibx.soap.SOAPContext.unmarshalSOAP(Unknown
> > Source) [junit] at org.jibx.soap.client.SOAPClient.call(Unknown
> > Source) [junit] at
> > com.pancredit.webservices.test.WebServiceTest.testLoginApplic
> > ation(WebServiceTest.java:74)
> > [junit] ... 26 more
> >
> >which looks like it's not receiving a proper response.
> >
> >The server side error is as follows (taken from Tomcat logs), can anyone
> > explain what I might have done wrong?
> >
> >2004-11-02 11:44:51 StandardContext[/core-web-services]soap_servlet: Error
> > processing request java.lang.NullPointerException
> > at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
> > at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
> > at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> > at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.
> >java:1255) at
> > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.
> >java:1189) at
> > org.jibx.runtime.impl.MarshallingContext.getMarshaller(MarshallingContext
> >.java:876) at
> > com.pancredit.gateway.base.param.classes.LoginApplicationResponseParamete
> >r.marshal(LoginApplicationResponseParameter.java) at
> > org.jibx.soap.SOAPContext.marshalSOAP(Unknown Source)
> > at org.jibx.soap.server.SOAPService.processRequest(Unknown Source)
> > at org.jibx.soap.server.SOAPServlet.doPost(Unknown Source)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> > at
> > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicat
> >ionFilterChain.java:237) at
> > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilte
> >rChain.java:157) at
> > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve
> >.java:214) at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCon
> >text.java:104) at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:52
> >0) at
> > org.apache.catalina.core.StandardContextValve.invokeInternal(StandardCont
> >extValve.java:198) at
> > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve
> >.java:152) at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCon
> >text.java:104) at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:52
> >0) at
> > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
> >137) at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCon
> >text.java:104) at
> > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
> >117) at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCon
> >text.java:102) at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:52
> >0) at
> > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.j
> >ava:109) at
> > org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCon
> >text.java:104) at
> > org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:52
> >0) at
> > org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at
> > org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
> > at
> > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793
> >) at
> > org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processCo
> >nnection(Http11Protocol.java:702) at
> > org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571
> >) at
> > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.
> >java:644) at java.lang.Thread.run(Thread.java:534)
> >
> >
> >Cheers,
> >
> >Tim.
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> _______________________________________________
> jibx-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
jibx-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jibx-users