[
https://issues.apache.org/jira/browse/AXIS2-1964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467836
]
Roberto commented on AXIS2-1964:
--------------------------------
Hi all,
in these days I'm facing this same issue of :
java.lang.NullPointerException
at
com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)
at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)
at
com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)
with Axis 1.1.1. ( I don't know if on Axis 1.1 would be worked ).
If I change from:
_operationClient.getOptions().setAction("");
to:
_operationClient.getOptions().setAction("http://localhost:8080/axis2/services/EMServerImplService");
I still get the same NPE.
With a deeper analysis, I found that the HTTP request is sent to the server;
see below the server-side exception:
------------------------------------------------------------------------------------------------
org.apache.axis2.AxisFault: Invalid chunk; nested exception is:
com.ctc.wstx.exc.WstxIOException: Invalid chunk
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:339)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:272)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:198)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:144)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:209)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:138)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2459)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:132)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:118)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:116)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:544)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:126)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:595)
at
org.apache.catalina.valves.RequestDumperValve.invoke(RequestDumperValve.java:164)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:593)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:432)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:954)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:534)
Caused by: com.ctc.wstx.exc.WstxIOException: Invalid chunk
at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:536)
at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:592)
at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:617)
at
com.ctc.wstx.stax.WstxInputFactory.createXMLStreamReader(WstxInputFactory.java:312)
at
org.apache.axiom.om.util.StAXUtils.createXMLStreamReader(StAXUtils.java:115)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:226)
... 37 more
Caused by: java.io.IOException: Invalid chunk
at
org.apache.coyote.http11.filters.ChunkedInputFilter.doRead(ChunkedInputFilter.java:130)
at
org.apache.coyote.http11.InternalInputBuffer.doRead(InternalInputBuffer.java:712)
at org.apache.coyote.Request.doRead(Request.java:418)
at
org.apache.coyote.tomcat4.CoyoteInputStream.readBytes(CoyoteInputStream.java:153)
at
org.apache.coyote.tomcat4.CoyoteInputStream.read(CoyoteInputStream.java:110)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:220)
at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
at java.io.FilterInputStream.read(FilterInputStream.java:90)
at com.ctc.wstx.io.UTF8Reader.loadMore(UTF8Reader.java:362)
at com.ctc.wstx.io.UTF8Reader.read(UTF8Reader.java:110)
at
com.ctc.wstx.io.ReaderBootstrapper.initialLoad(ReaderBootstrapper.java:245)
at
com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:132)
at
com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:531)
... 42 more
------------------------------------------------------------------------------------------------
The server returns an error page to the client, which cannot deserialize the
response or something like it I think, so it get an NPE.
Is there any workaround?
> Null Pointer Exception in Service STUB class at
> _operationClient.execute(true); line for AXIS2 1.1.1
> -----------------------------------------------------------------------------------------------------
>
> Key: AXIS2-1964
> URL: https://issues.apache.org/jira/browse/AXIS2-1964
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: codegen
> Affects Versions: 1.1.1
> Environment: WINDOWS, JAVA1.4, RAD IDE
> Reporter: Vivek Gawande
> Attachments: Jira-1964-Files.zip
>
>
> The recently released version 1.1.1 gives following NPE. It works fine with
> AXIS2 (1 and 1.1) versions though. The WorkflowServiceAdapterServiceStub is
> my service stub class.
> java.lang.NullPointerException
> at
> com.ctc.wstx.sw.BaseNsStreamWriter.doWriteDefaultNs(BaseNsStreamWriter.java:528)
> at
> com.ctc.wstx.sw.SimpleNsStreamWriter.writeDefaultNamespace(SimpleNsStreamWriter.java:111)
> at
> com.ctc.wstx.sw.SimpleNsStreamWriter.writeNamespace(SimpleNsStreamWriter.java:119)
> at
> org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeNamespace(MTOMXMLStreamWriter.java:146)
> at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeElement(StreamingOMSerializer.java:243)
> at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serializeNode(StreamingOMSerializer.java:76)
> at
> org.apache.axiom.om.impl.serialize.StreamingOMSerializer.serialize(StreamingOMSerializer.java:59)
> at
> org.apache.axiom.om.impl.util.OMSerializerUtil.serializeByPullStream(OMSerializerUtil.java:473)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:823)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:819)
> at
> org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:180)
> at
> org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:848)
> at
> org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:419)
> at
> org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.handleOMOutput(SOAPOverHTTPSender.java:190)
> at
> org.apache.axis2.transport.http.SOAPOverHTTPSender$AxisSOAPRequestEntity.writeRequest(SOAPOverHTTPSender.java:232)
> at
> org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:495)
> at
> org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:1973)
> at
> org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:993)
> at
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:397)
> at
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170)
> at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:396)
> at
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> at
> org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:541)
> at
> org.apache.axis2.transport.http.SOAPOverHTTPSender.send(SOAPOverHTTPSender.java:119)
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:335)
> at
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:204)
> at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:674)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:237)
> at
> org.apache.axis2.description.OutInAxisOperationClient.execute(OutInAxisOperation.java:202)
> at
> com.gnw.eprocess.svc.wf.WorkflowServiceAdapterServiceStub.createWorkItem(WorkflowServiceAdapterServiceStub.java:240)
> at
> com.gnw.eprocess.svc.wf.test.WorkflowServiceAdapterServiceStubTest.testCreateWorkItem(WorkflowServiceAdapterServiceStubTest.java:85)
> I compared the files generated for 1.1.1 with 1.1 and there is mismatch on
> the line where it sets Action attribute
> 1.1 Generated Code: _operationClient.getOptions().setAction("");
> 1.1.1 Generated Code:
> _operationClient.getOptions().setAction("http://wf.svc.eprocess.gnw.com/WorkflowServiceAdapter/createWorkItemRequest");
>
> We were actually looking for the fix of Bug 1856 in 1.1.1 as our IBM
> Webservice WSDL contains Abstract element, which is causing problems writing
> handlers on our service side on the SOAP Request after deserialization. But
> now the client stopped creating SOAP Request because of above NPE. I am not
> sure whether the Bug 1856 and above problem is related.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]