2 Replies Latest reply on Aug 28, 2003 2:14 AM by Alberto Otero Garcia

    Problem receiving objects containing objects

    Alberto Otero Garcia Newbie

      Hello everybody,

      We have successfully developed a web service using JBoss + Axis + XDoclet + Eclipse.

      It all works correctly when we receive, through a method located in a session bean, objects containing simple data types (e.g.: in the method setPosition we receive an object called Position that contains the integer variables X and Y).

      The problem arises when we try to receive the same object (e.g.: Position), but instead of containing simple data types, containing another object that contains the real data (e.g.: Position contains Coordinates, that contain X and Y).

      Next the server.log section with the error (if you need more information don't hesitate asking me for it!).

      Thanks in adavance.

      --8<----------------------
      2003-08-20 19:31:10,250 ERROR [org.apache.axis.transport.http.AxisServlet] Exception:
      AxisFault
      faultCode: {http://xml.apache.org/axis/}Server.userException
      faultString: java.lang.NullPointerException
      faultActor: null
      faultDetail:
      stackTrace: java.lang.NullPointerException
      at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:223)
      at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:495)
      at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:942)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:206)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:370)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:370)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:370)
      at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:169)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:190)
      at org.jboss.net.axis.server.EJBProvider.processMessage(EJBProvider.java:260)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:534)


      java.lang.NullPointerException
      at org.apache.axis.AxisFault.makeFault(AxisFault.java:120)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:280)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:551)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:509)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
      at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
      at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
      at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
      at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
      at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
      at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.NullPointerException
      at org.apache.axis.encoding.ser.SimpleDeserializer.onEndElement(SimpleDeserializer.java:223)
      at org.apache.axis.encoding.DeserializerImpl.endElement(DeserializerImpl.java:495)
      at org.apache.axis.encoding.DeserializationContextImpl.endElement(DeserializationContextImpl.java:942)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:206)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:370)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:370)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.encoding.DeserializerImpl.startElement(DeserializerImpl.java:370)
      at org.apache.axis.encoding.ser.BeanDeserializer.startElement(BeanDeserializer.java:169)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:906)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:190)
      at org.jboss.net.axis.server.EJBProvider.processMessage(EJBProvider.java:260)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)
      ... 44 more
      --8<----------------------