This discussion is archived
3 Replies Latest reply: Sep 19, 2012 5:25 AM by user696 RSS

@MTOM with @SchemaValidation causes IllegalStateException when streaming

950813 Newbie
Currently Being Moderated
We are using Weblogic-10.3.3 and streaming documents from Documentum to web service clients via MTOM (using the @MTOM annotation).

Our service was working fine when our EJB web service class only had the @MTOM annotation on it.

However, adding @SchemaValidation annotation causes a "java.lang.IllegalStateException: closed" exception (AdminServer.log stack trace is below) when the web service response is being returned (to the client).

In soapUI, the document's content type comes through, but the file size is 0.

Somehow, @SchemaValidation logic is interfering with the MTOM streaming.

Has anyone else encountered there and/or know the reason why this occurring? Is the schema validation reading the response stream first (to do its validation) and then, when the client tries to read the same response stream for the document content, there is no data in the stream (since it was read already by the schema validation)?

Again, there is no problem when the @SchemaValidation annotation is not present.

Thank you.

-----
java.lang.IllegalStateException: closed
     at com.documentum.fc.client.content.impl.BlockPuller.verifyOpen(BlockPuller.java:64)
     at com.documentum.fc.client.content.impl.BlockPuller.close(BlockPuller.java:69)
     at com.documentum.fc.client.content.impl.PullerInputStream.close(PullerInputStream.java:110)
     at com.documentum.fc.impl.util.io.InputStreamHandle.close(InputStreamHandle.java:45)
     at java.io.FilterInputStream.close(FilterInputStream.java:156)
     at javax.activation.DataHandler.writeTo(DataHandler.java:297)
     at com.sun.xml.ws.encoding.MtomCodec$ByteArrayBuffer.write(MtomCodec.java:206)
     at com.sun.xml.ws.encoding.MtomCodec.encode(MtomCodec.java:173)
     at com.sun.xml.ws.encoding.SOAPBindingCodec.encode(SOAPBindingCodec.java:258)
     at com.sun.xml.ws.transport.http.HttpAdapter.encodePacket(HttpAdapter.java:368)
     at com.sun.xml.ws.transport.http.HttpAdapter.access$100(HttpAdapter.java:102)
     at com.sun.xml.ws.transport.http.HttpAdapter$HttpToolkit.handle(HttpAdapter.java:534)
     at com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:255)
     at com.sun.xml.ws.transport.http.servlet.ServletAdapter.handle(ServletAdapter.java:141)
     at weblogic.wsee.jaxws.WLSServletAdapter.handle(WLSServletAdapter.java:210)
     at weblogic.wsee.jaxws.HttpServletAdapter$AuthorizedInvoke.run(HttpServletAdapter.java:311)
     at weblogic.wsee.jaxws.HttpServletAdapter.post(HttpServletAdapter.java:223)
     at weblogic.wsee.jaxws.JAXWSServlet.doPost(JAXWSServlet.java:124)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
     at weblogic.wsee.jaxws.JAXWSServlet.service(JAXWSServlet.java:79)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:821)
     at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
     at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
     at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686)
     at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
     at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
     at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
     at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
     at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
     at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points