[
https://issues.apache.org/jira/browse/WSCOMMONS-381?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Veithen resolved WSCOMMONS-381.
---------------------------------------
Resolution: Fixed
Fix Version/s: Axiom 1.2.8
Assignee: Andreas Veithen
I tested the message with the latest code and the problem no longer occurs. I
reverted to the previous version of PartFactory (r661891) and with that version
I was able to reproduce the problem. Thus the bug has been fixed together with
other changes in r680107.
> StringIndexOutOfBoundsException in
> org.apache.axiom.attachments.impl.PartFactory.readHeader()
> ---------------------------------------------------------------------------------------------
>
> Key: WSCOMMONS-381
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-381
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Environment: Axis2 1.4 Client and Server
> Reporter: Jan Dittberner
> Assignee: Andreas Veithen
> Fix For: Axiom 1.2.8
>
> Attachments: Axiom_PartFactory_Trouble_SwA.txt
>
>
> PartFactory throws a StringIndexOutOfBoundsException in
> org.apache.axiom.attachments.impl.PartFactory.readHeader():
> org.apache.axiom.om.OMException: java.lang.StringIndexOutOfBoundsException:
> String index out of range: -1
> at
> org.apache.axiom.attachments.impl.PartFactory.createPart(PartFactory.java:127)
>
> at
> org.apache.axiom.attachments.Attachments.getPart(Attachments.java:624)
> at
> org.apache.axiom.attachments.Attachments.getNextPartDataHandler(Attachments.java:542)
>
> at
> org.apache.axiom.attachments.Attachments.getDataHandler(Attachments.java:333)
> at
> org.apache.axis2.context.MessageContext.getAttachment(MessageContext.java:1681)
>
> at
> de.t_systems.mittelstand.crow.obmcrow._2008_1.RequestValidator.validateAttachment(RequestValidator.java:223)
>
> at
> de.t_systems.mittelstand.crow.obmcrow._2008_1.RequestValidator.validate(RequestValidator.java:130)
>
> at
> de.t_systems.mittelstand.crow.obmcrow._2008_1.ObmCrowServiceSkeleton.createNewComplaint(ObmCrowServiceSkeleton.java:120)
>
> at
> de.t_systems.mittelstand.crow.obmcrow._2008_1.ObmCrowServiceMessageReceiverInOut.invokeBusinessLogic(ObmCrowServiceMessageReceiverInOut.java:69)
>
> at
> org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
>
> at
> org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:100)
>
> at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
> at
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
>
> at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:131)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
>
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:568)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
> at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
> at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>
> at
> org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> at java.lang.Thread.run(Thread.java:619)
> Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
> range: -1
> at
> java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:881)
> at java.lang.StringBuffer.substring(StringBuffer.java:416)
> at
> org.apache.axiom.attachments.impl.PartFactory.readHeader(PartFactory.java:232)
>
> at
> org.apache.axiom.attachments.impl.PartFactory.readHeaders(PartFactory.java:199)
>
> at
> org.apache.axiom.attachments.impl.PartFactory.createPart(PartFactory.java:85)
> ... 28 more
> The problem is caused by a SwA-Message that has been created by an Axis2 1.4
> client. The attachment that creates the trouble is a MIME-Message itself and
> the header that PartFactory cannot read contains a line break.
> I attach an example SOAP-Message that causes the crash:
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.