Forum Discussion

llgrs's avatar
llgrs
New Contributor
15 years ago

[SOLVED]XmlException: Unexpected end of file after null

I am using 3.0.1 to mock a web service for testing.  The WSDL/XSD has been imported, the mock service created, and responses to several messages configured.  The first request is responded to appropriately.  The second request (different method) for which I have configured a response is sent a 500 error.

The soapUI log has:
Thu Nov 19 13:38:39 EST 2009:DEBUG:VCSWebServiceSOAP MockService was unable to dispatch mock request
   com.eviware.soapui.impl.wsdl.mock.DispatchException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:404)
    at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:693)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
   Caused by: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
    at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
    at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712)
    at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696)
    at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683)
    at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
    at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:580)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.getRequestXmlObject(WsdlMockRequest.java:245)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.initPostRequest(WsdlMockRequest.java:144)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.(WsdlMockRequest.java:99)
    at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:384)
    ... 11 more
   Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
    at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
    at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
    at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
    ... 20 more
Thu Nov 19 13:38:39 EST 2009:ERROR:An error occured [org.apache.xmlbeans.XmlException: error: Unexpected end of file after null], see error log for details
Thu Nov 19 13:38:39 EST 2009:ERROR:An error occured [WRITER], see error log for details

The error.log has:
Thu Nov 19 13:38:39 EST 2009:ERROR:java.lang.IllegalStateException: WRITER
   java.lang.IllegalStateException: WRITER
    at org.mortbay.jetty.Response.getOutputStream(Response.java:573)
    at com.eviware.soapui.monitor.JettyMockEngine$MockRequestLog.log(JettyMockEngine.java:802)
    at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:51)
    at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:324)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
    at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

The message is never being dispatched to the mock method - the message log in the mock service is only  logging the 1st request.

The client is .net, the server was generated using Axis (I believe - I did not write the service), and this client request is accepted by the real service with no problem, so I don't suspect a problem with the client.
I see reference to an old bug in piccolo when the .parse method is called using a file reader rather than a string, but looking at the soapUI code, it appears to be called using a string.
Advice appreciated..

6 Replies

  • llgrs's avatar
    llgrs
    New Contributor
    Sure.  The 3.0.1 and 3.0.2 nightly build directories both seem to have versions of 3.0.2, although the builds in the 3.0.1 directory stopped on 11/3 - I am assuming that you'd like me to try the active build of 3.0.2 in the 3.0.2 directory rather than the build of 3.0.2 in the 3.0.1 directory?
  • llgrs's avatar
    llgrs
    New Contributor
    Sadly, it has not improved the situation.
    Here is the full soapUI log, although it is quite similar to the other.

    Fri Nov 20 08:59:48 EST 2009:DEBUG:Loading Definition...
    Fri Nov 20 08:59:48 EST 2009:DEBUG:Loading WSDL: file:/C:/lli/ascribe/Server/ScriptObjectModel/VCS/wsdl/VCSWebService.wsdl
    Fri Nov 20 08:59:48 EST 2009:DEBUG:Returning baseInputSource [file:/C:/lli/ascribe/Server/ScriptObjectModel/VCS/wsdl/VCSWebService.wsdl]
    Fri Nov 20 08:59:49 EST 2009:DEBUG:Returning latest import URI [file:\C:\lli\ascribe\Server\ScriptObjectModel\VCS\wsdl\VCSWebService.xsd]
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/xop.xsd with targetNamespace http://www.w3.org/2004/08/xop/include
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/XMLSchema.xsd with targetNamespace http://www.w3.org/2001/XMLSchema
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/xml.xsd with targetNamespace http://www.w3.org/XML/1998/namespace
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/swaref.xsd with targetNamespace http://ws-i.org/profiles/basic/1.1/xsd
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/xmime200505.xsd with targetNamespace http://www.w3.org/2005/05/xmlmime
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/xmime200411.xsd with targetNamespace http://www.w3.org/2004/11/xmlmime
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/soapEnvelope.xsd with targetNamespace http://schemas.xmlsoap.org/soap/envelope/
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/soapEncoding.xsd with targetNamespace http://schemas.xmlsoap.org/soap/encoding/
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/soapEnvelope12.xsd with targetNamespace http://www.w3.org/2003/05/soap-envelope
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from file:/C:/Program%20Files%20(x86)/eviware/soapUI-3.0.2/bin/soapui-3.0.2.jar!/com/eviware/soapui/resources/xsds/soapEncoding12.xsd with targetNamespace http://www.w3.org/2003/05/soap-encoding
    Fri Nov 20 08:59:49 EST 2009:INFO:Added default schema from C:/lli/ascribe/Server/ScriptObjectModel/VCS/wsdl/VCSWebService.xsd with targetNamespace http://www.archicoop.it/VCSWebService
    Fri Nov 20 08:59:49 EST 2009:INFO:Loading schema types from [file:/C:/lli/ascribe/Server/ScriptObjectModel/VCS/wsdl/VCSWebService.wsdl]
    Fri Nov 20 08:59:49 EST 2009:INFO:Getting schema file:/C:/lli/ascribe/Server/ScriptObjectModel/VCS/wsdl/VCSWebService.wsdl
    Fri Nov 20 08:59:49 EST 2009:DEBUG:Loaded Definition: ok
    Fri Nov 20 08:59:49 EST 2009:INFO:Started mockService [VCSWebServiceSOAP MockService] on port [8088] at path [/VCSWebService/services/VCSWebService]
    Fri Nov 20 08:59:50 EST 2009:INFO:Mounted WSDL for interface [VCSWebServiceSOAP] at [/VCSWebService/services/VCSWebService?WSDL]
    Fri Nov 20 09:08:45 EST 2009:DEBUG:VCSWebServiceSOAP MockService was unable to dispatch mock request
      com.eviware.soapui.impl.wsdl.mock.DispatchException: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:396)
      at com.eviware.soapui.monitor.JettyMockEngine$ServerHandler.handle(JettyMockEngine.java:699)
      at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
      at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      at org.mortbay.jetty.Server.handle(Server.java:324)
      at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
      at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
      at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
      at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
      at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
      at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
      at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
      Caused by: org.apache.xmlbeans.XmlException: error: Unexpected end of file after null
      at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3486)
      at org.apache.xmlbeans.impl.store.Locale.parse(Locale.java:712)
      at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:696)
      at org.apache.xmlbeans.impl.store.Locale.parseToXmlObject(Locale.java:683)
      at org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:208)
      at org.apache.xmlbeans.XmlObject$Factory.parse(XmlObject.java:580)
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.getRequestXmlObject(WsdlMockRequest.java:260)
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.initPostRequest(WsdlMockRequest.java:146)
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRequest.(WsdlMockRequest.java:101)
      at com.eviware.soapui.impl.wsdl.mock.WsdlMockRunner.dispatchRequest(WsdlMockRunner.java:376)
      ... 11 more
      Caused by: org.xml.sax.SAXParseException: Unexpected end of file after null
      at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.reportFatalError(Piccolo.java:1038)
      at org.apache.xmlbeans.impl.piccolo.xml.Piccolo.parse(Piccolo.java:723)
      at org.apache.xmlbeans.impl.store.Locale$SaxLoader.load(Locale.java:3454)
      ... 20 more
    Fri Nov 20 09:08:45 EST 2009:ERROR:An error occured [org.apache.xmlbeans.XmlException: error: Unexpected end of file after null], see error log for details
    Fri Nov 20 09:08:46 EST 2009:ERROR:An error occured [WRITER], see error log for details
  • I get this error when I turn on the "Enable Mock HTTP Log" in the HTTP Settings preference page. 
  • llgrs's avatar
    llgrs
    New Contributor
    Hey, that may have done the trick!
    Looks good, so far.  Will do some additional verification and confirm.

    Thanks, Jeff.