You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Aiden Grandfield (JIRA)" <ji...@apache.org> on 2009/06/09 16:02:07 UTC

[jira] Created: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
-------------------------------------------------------------------------------------

                 Key: AXIS2-4368
                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
    Affects Versions: 1.4.1
         Environment: Sun Java 6, 
            Reporter: Aiden Grandfield


I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
The attachment is a zlib file about 4mb in size.

The complex type I am using is a straight forward one....

<complexType name="CompressedDataType">
<sequence>
<element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
<element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
</sequence>
</complexType>


where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>

Let me know if you need more information.
I logged this as Major as I have no work around.



java.lang.ArrayIndexOutOfBoundsException: 2048
	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Aiden Grandfield (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718786#action_12718786 ] 

Aiden Grandfield commented on AXIS2-4368:
-----------------------------------------

Hello again,

We have updated to a later version of the JRE, 1.6.0_11-b03, (we were using 1.6.0_01, hard to imagine how this changes anything)and we can no longer see the problem. If the problem does not show its self again in the next week, I am going to mark this as resolved. This bug should still be kept as a reference though, for people who notice similar problems.

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen resolved AXIS2-4368.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.6

I believe that this is fixed by the change in WSCOMMONS-489.

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>            Assignee: Andreas Veithen
>             Fix For: 1.6
>
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Aiden Grandfield (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718905#action_12718905 ] 

Aiden Grandfield commented on AXIS2-4368:
-----------------------------------------

Ok, the multi threading we are doing might be responsible for this. For our application, we are required to create two separate instances of our stubs and invoke two identical servers at the same time. We do this by running the a stub on two paralell threads. 

So I guess my question is, would two instances of the stub running on two separate threads reference a single instance of the ChunkedOutputStream ?


> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719150#action_12719150 ] 

Andreas Veithen commented on AXIS2-4368:
----------------------------------------

If you are using two separate instances, then this should not happen (actually it should never happen, and if it does, then there is a bug). Do you use any of the settings related to the configuration of HttpClient (REUSE_HTTP_CLIENT, MULTITHREAD_HTTP_CONNECTION_MANAGER, etc.)?

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12718868#action_12718868 ] 

Andreas Veithen commented on AXIS2-4368:
----------------------------------------

I had a look at the code in ChunkedOutputStream and I believe it is impossible to get this exception unless one of the following is happening:

1. There is an exception on the underlying stream (i.e. the stream ChunkedOutputStream writes to) and this exception is swallowed somewhere in Axiom or Axis2. Indeed, an exception in the underlying stream may leave ChunkedOutputStream in an inconsistent state. If the ChunkedOutputStream is used after that, then it would be possible to get the ArrayIndexOutOfBoundsException.

2. There is a concurrency issue and the same ChunkedOutputStream instance is used concurrently by different threads. Indeed, ChunkedOutputStream has not been designed to be thread safe (because it should not be used concurrently).

Both conditions are not very probable, but can't be excluded. Note that assumption 2 would be compatible with the fact that you don't see the issue anymore in Java 1.6. Indeed there might be very subtle differences in the threading implementation between different JREs.

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen reassigned AXIS2-4368:
--------------------------------------

    Assignee: Andreas Veithen

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>            Assignee: Andreas Veithen
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Aiden Grandfield (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719621#action_12719621 ] 

Aiden Grandfield commented on AXIS2-4368:
-----------------------------------------

We use all the defaults and use no fancy configurations. 

In fact, the only property we manually set ourselves is  stub._getServiceClient().getOptions().setTimeOutInMilliSeconds()  :-)

The command line we use to build the stub is very straight forward:
wsdl2java.bat -uri ./ConfTool.wsdl -p com.pilz.ie.se02.soap -s

At the moment, we are in the middle of a release. When the release it done, I will roll back the JVM version and try to reproduce the issue again. This will be in about 2 weeks. Is there some debug data I can turn on so I can send you a log?


> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12719787#action_12719787 ] 

Andreas Veithen commented on AXIS2-4368:
----------------------------------------

Set the log level to debug and try to get the log messages just before the exception is triggered. Maybe this will give us an idea what happens.

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (AXIS2-4368) ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2-4368?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729858#action_12729858 ] 

Andreas Veithen commented on AXIS2-4368:
----------------------------------------

Aiden,

Since you are using Sun's StAX implementation (see stack trace), I believe that this issue could be caused by WSCOMMONS-489. Please watch this issue for possible solutions/workarounds.

Andreas

> ChunkedOutputStream is giving an OutOfBoundException:2048 with MTOMAwareXMLSerializer
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2-4368
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4368
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: databinding
>    Affects Versions: 1.4.1
>         Environment: Sun Java 6, 
>            Reporter: Aiden Grandfield
>
> I am getting to following exception INTERMITTENTLY when attepmting to send an MTOM attachment using a client stub generated from a WSDL2Java.
> The attachment is a zlib file about 4mb in size.
> The complex type I am using is a straight forward one....
> <complexType name="CompressedDataType">
> <sequence>
> <element name="file" type="xmime:base64Binary" minOccurs="1" maxOccurs="1" nillable="true"/>
> <element name="sizeOfUncompressedData" type="xsd:unsignedInt" minOccurs="1" maxOccurs="1"/>
> </sequence>
> </complexType>
> where xmime =  <import namespace="http://www.w3.org/2005/05/xmlmime" schemaLocation="http://www.w3.org/2005/05/xmlmime"/>
> Let me know if you need more information.
> I logged this as Major as I have no work around.
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 	at org.apache.commons.httpclient.ChunkedOutputStream.write(ChunkedOutputStream.java:160)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.UTF8OutputStreamWriter.write(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeXMLContent(Unknown Source)
> 	at com.sun.xml.internal.stream.writers.XMLStreamWriterImpl.writeCharacters(Unknown Source)
> 	at org.apache.axiom.om.impl.MTOMXMLStreamWriter.writeCharacters(MTOMXMLStreamWriter.java:237)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.writeOutput(OMTextImpl.java:255)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeLocal(OMTextImpl.java:433)
> 	at org.apache.axiom.om.impl.llom.OMTextImpl.internalSerializeAndConsume(OMTextImpl.java:408)
> 	at org.apache.axis2.databinding.utils.writer.MTOMAwareXMLSerializer.writeDataHandler(MTOMAwareXMLSerializer.java:172)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62888)
> 	at com.pilz.ie.se02.soap.ConfToolStub$Base64Binary.serialize(ConfToolStub.java:62825)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19615)
> 	at com.pilz.ie.se02.soap.ConfToolStub$CompressedDataType.serialize(ConfToolStub.java:19535)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35343)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML.serialize(ConfToolStub.java:35287)
> 	at com.pilz.ie.se02.soap.ConfToolStub$SetProjectConfigToolXML$1.serialize(ConfToolStub.java:35275)
> 	at org.apache.axis2.databinding.ADBDataSource.serialize(ADBDataSource.java:93)
> 	at org.apache.axiom.om.impl.llom.OMSourcedElementImpl.internalSerializeAndConsume(OMSourcedElementImpl.java:664)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerialize(OMElementImpl.java:918)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.serializeInternally(SOAPEnvelopeImpl.java:240)
> 	at org.apache.axiom.soap.impl.llom.SOAPEnvelopeImpl.internalSerialize(SOAPEnvelopeImpl.java:228)
> 	at org.apache.axiom.om.impl.llom.OMElementImpl.internalSerializeAndConsume(OMElementImpl.java:947)
> 	at org.apache.axiom.om.impl.llom.OMNodeImpl.serializeAndConsume(OMNodeImpl.java:471)
> 	at org.apache.axis2.transport.http.SOAPMessageFormatter.writeTo(SOAPMessageFormatter.java:79)
> 	at org.apache.axis2.transport.http.AxisRequestEntity.writeRequest(AxisRequestEntity.java:84)
> 	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:499)
> 	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
> 	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
> 	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
> 	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346)
> 	at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:542)
> 	at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:189)
> 	at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:75)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:371)
> 	at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:209)
> 	at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:448)
> 	at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
> 	at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> 	at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> 	at com.pilz.ie.se02.soap.ConfToolStub.setProjectConfigToolXML(ConfToolStub.java:7956)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolStubFacade.setProjectConfigToolXML(ConfToolStubFacade.java:1441)
> 	at com.pilz.ie.se02.model.device.soap.wrapper.ConfToolManager.setProjectConfigToolXML(ConfToolManager.java:1078)
> 	at com.pilz.ie.se02.services.io.network.tasks.DownloadProjectTask.downloadConfigToolData(DownloadProjectTask.java:177)
> 	at com.pilz.ie.se02.services.io.network.SeDownloadManager$PerformStepThread.run(SeDownloadManager.java:488) 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.