On my Axis 1.4 webservice this exception is thrown when an incoming message is corrupted.
WARN ;2010-07-15 14:45:38,232;org.apache.axis.attachments.AttachmentsImpl;;Exception:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:javax.mail.MessagingException: Error in input stream;
nested exception is:
java.io.IOException: End of stream encountered before final boundary marker.
at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:361)
at javax.mail.internet.InternetHeaders.<init>(InternetHeaders.java:310)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readTillFound(MultiPartRelatedInputStream.java:499)
at org.apache.axis.attachments.MultiPartRelatedInputStream.readAll(MultiPartRelatedInputStream.java:433)
at org.apache.axis.attachments.MultiPartRelatedInputStream.getAttachments(MultiPartRelatedInputStream.java:439)
at org.apache.axis.attachments.AttachmentsImpl.mergeinAttachments(AttachmentsImpl.java:171)
at org.apache.axis.attachments.AttachmentsImpl.getAttachmentCount(AttachmentsImpl.java:550)
at org.apache.axis.Message.getAttachments(Message.java:689)
at prg.xft.in.attachments.ExtractAttachments.extract(ExtractAttachments.java:45)
at prg.xft.ib.In.inbound(In.java:79)
at prg.xft.ib.In.<init>(In.java:54)
at prg.skel.jiz.ServiceImpl.inbound(ServiceImpl.java:24)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:397)
at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:454)
at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
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:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:891)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: End of stream encountered before final boundary marker.
at org.apache.axis.attachments.BoundaryDelimitedStream.read(BoundaryDelimitedStream.java:308)
at org.apache.axis.attachments.BoundaryDelimitedStream.read(BoundaryDelimitedStream.java:358)
at org.apache.axis.attachments.BoundaryDelimitedStream.read(BoundaryDelimitedStream.java:370)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:84)
at javax.mail.internet.InternetHeaders.load(InternetHeaders.java:338)
... 42 more
I tried to catch the exception multiple times on different places in my source code, but I can not catch it. The stacktrace only appears in my logs.