axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Mannion" <chris.mann...@itjunction.com>
Subject Re: Null Pointer from org.apache.axis.message.MessageElement.addTextNode
Date Tue, 06 Sep 2005 13:51:28 GMT
In case anyone else has this problem, I've determined it was being caused by a conflicting
copies of saaj.jar, the javax.xml library.

Chris Mannion
IT Junction
020 8452 4274
  ----- Original Message ----- 
  From: Chris Mannion 
  To: axis-user@ws.apache.org ; jayachandra@gmail.com 
  Sent: Tuesday, September 06, 2005 10:42 AM
  Subject: Re: Null Pointer from org.apache.axis.message.MessageElement.addTextNode


  I think the error is occuring in my client while it is constructing the message to send,
TCPmon doesn't pick anything up as I don't think the client gets as far as sending anything.

  Chris Mannion
  IT Junction
  020 8452 4274
    ----- Original Message ----- 
    From: jayachandra 
    To: axis-user@ws.apache.org 
    Sent: Tuesday, September 06, 2005 7:31 AM
    Subject: Re: Null Pointer from org.apache.axis.message.MessageElement.addTextNode


    Did you try verifying what is being sent on wire to the server using TCPMon?
    Start TCPmon on some port and redirect the content to the tomcat host and port. Make sure
you give tcpmon port in the portQName string rather than the tomcat port
     
    Assuming I would like to start tcpmon on 9090 and have my tomcat on local machine 8080.
I'd start tcpmon as 
    java org.apache.axis.utils.tcpmon 9090 localhost 8080

    HTH
    Jayachandra
     
    On 9/5/05, Chris Mannion <chris.mannion@itjunction.com> wrote: 
      Hi

      I'm getting a null pointer exception on invoking a call object.  This happens for any
call with parameters set, though I'm certain, from having debugged the code, that it is not
'caused by passing nulls for parameter values, the exception occurs even on calls where all
the values are present and correctly typed.  The stack trace for the error is below 

      AxisFault
       faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException 
       faultSubcode: 
       faultString: java.lang.NullPointerException
       faultActor: 
       faultNode: 
       faultDetail: 
       { http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
       at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)
       at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java :148)
       at org.apache.axis.message.SOAPHandler.endElement(SOAPHandler.java:112)
       at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
       at org.apache.xerces.parsers.AbstractSAXParser.endElement (Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) 
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at org.apache.axis.encoding.DeserializationContext.parse (DeserializationContext.java:227)
       at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
       at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
       at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke (MustUnderstandChecker.java:62)
       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
       at org.apache.axis.client.Call.invokeEngine(Call.java:2765)
       at org.apache.axis.client.Call.invoke(Call.java:2748) 
       at org.apache.axis.client.Call.invoke(Call.java:2424)
       at org.apache.axis.client.Call.invoke(Call.java:2347)
       at org.apache.axis.client.Call.invoke(Call.java:1804)
       at govConnect.WebServiceTools.call(WebServiceTools.java :130)
       at ep.callWS.service(callWS.java:65)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:419)
       at org.apache.catalina.servlets.InvokerServlet.doGet (InvokerServlet.java:133)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (ApplicationFilterChain.java:237)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)

       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardContextValve.invokeInternal (StandardContextValve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
       at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
       at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
       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.processConnection(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:536)

       {http://xml.apache.org/axis/}hostname:server

      java.lang.NullPointerException
       at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
       at org.apache.axis.client.AxisClient.invoke(AxisClient.java:216)
       at org.apache.axis.client.Call.invokeEngine (Call.java:2765)
       at org.apache.axis.client.Call.invoke(Call.java:2748)
       at org.apache.axis.client.Call.invoke(Call.java:2424)
       at org.apache.axis.client.Call.invoke(Call.java:2347)
       at org.apache.axis.client.Call.invoke (Call.java:1804)
       at govConnect.WebServiceTools.call(WebServiceTools.java:130)
       at ep.callWS.service(callWS.java:65)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
       at org.apache.catalina.servlets.InvokerServlet.serveRequest (InvokerServlet.java:419)
       at org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:133)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
       at javax.servlet.http.HttpServlet.service (HttpServlet.java:810)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)

       at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke (StandardPipeline.java:520)
       at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
       at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:137)
       at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
       at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:102)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.core.StandardValveContext.invokeNext (StandardValveContext.java:104)
       at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
       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.processConnection(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:536)
      Caused by: java.lang.NullPointerException
       at org.apache.axis.message.MessageElement.addTextNode(MessageElement.java:1396)
       at org.apache.axis.message.SOAPHandler.addTextNode(SOAPHandler.java:148)
       at org.apache.axis.message.SOAPHandler.endElement (SOAPHandler.java:112)
       at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
       at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement (Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse (Unknown Source)
       at javax.xml.parsers.SAXParser.parse(Unknown Source)
       at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
       at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java :696)
       at org.apache.axis.Message.getSOAPEnvelope(Message.java:424)
       at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
       at org.apache.axis.client.AxisClient.invoke(AxisClient.java :206)
       ... 36 more

      The code generating the error is as follows

      ServiceFactory serviceFactory = ServiceFactory.newInstance();
      webService = serviceFactory.createService(wsdlUrl, serviceQName);
      ...
      Call opCall = webService.createCall(portQName, operationName);
      ...
      return opCall.invoke(values);

      where values is an object array of correctly typed parameter values.  Does anyone have
any hints as to what the root of this problem might be?

      Chris Mannion
      IT Junction
      020 8452 4274



    -- 
    -- Jaya 
Mime
View raw message