java.lang.RuntimeException: org.xml.sax.SAXParseException: Premature end of file.

ode-dev | Alexey Ousov (JIRA) | 9 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When invoking external service via TCP using OpenJPA the following error is generated: DEBUG - LoggingErrorHandler.fatalError(89) | :-1:-1:FATAL:Premature end of file. ERROR - ODEService.onAxisMessageExchange(179) | Error processing response for MEX {MyRoleMex#hqejbhcnphr2wshoxjstwx [Client hqejbhcnphr2wshoxjstww] calling {http://www.example.org/registerUser}registerUser.registerUser(...)} java.lang.RuntimeException: org.xml.sax.SAXParseException: Premature end of file. at org.apache.ode.dao.jpa.MessageExchangeDAOImpl.getEPR(MessageExchangeDAOImpl.java:152) at org.apache.ode.bpel.engine.MessageExchangeImpl.getEndpointReference(MessageExchangeImpl.java:199) at org.apache.ode.axis2.ODEService.writeHeader(ODEService.java:271) at org.apache.ode.axis2.ODEService.onResponse(ODEService.java:229) at org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:172) at org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:69) at org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:50) at org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145) at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275) at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:595) Caused by: org.xml.sax.SAXParseException: Premature end of file. at org.apache.xerces.parsers.DOMParser.parse(Unknown Source) at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at org.apache.ode.utils.DOMUtils.parse(DOMUtils.java:622) at org.apache.ode.utils.DOMUtils.stringToDOM(DOMUtils.java:548) at org.apache.ode.dao.jpa.MessageExchangeDAOImpl.getEPR(MessageExchangeDAOImpl.java:150) ... 26 more Actually there are 3 places where this error is generated: org.apache.ode.dao.jpa.MessageExchangeDAOImpl.getEPR, PartnerLinkDAOImpl.getPartnerEPR and possibly (not tested) PartnerLinkDAOImpl.getMyEPR(). The cause is: variable which holds xml representation of EPR is not null, but empty string (""). It seems that OpenJPA in conjunction with Oracle uses empty string when restoring these values from database.

    Apache's JIRA Issue Tracker | 9 years ago | Alexey Ousov
    java.lang.RuntimeException: org.xml.sax.SAXParseException: Premature end of file.
  2. 0

    [jira] Created: (ODE-231) org.xml.sax.SAXParseException: Premature end of file when invoking external service (TCP)

    ode-dev | 9 years ago | Alexey Ousov (JIRA)
    java.lang.RuntimeException: org.xml.sax.SAXParseException: Premature end of file.
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    org.xml.sax.SAXParseException: Premature end of file

    Stack Overflow | 5 years ago | Dave
    org.xml.sax.SAXParseException: Premature end of file.
  5. 0

    Problem parsing String to DOM in Java

    Stack Overflow | 6 years ago | Larry
    org.xml.sax.SAXParseException: Premature end of file.
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. org.xml.sax.SAXParseException

    Premature end of file.

    at org.apache.xerces.parsers.DOMParser.parse()
  2. Xerces2-j
    DocumentBuilderImpl.parse
    1. org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    2. org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    2 frames
  3. org.apache.ode
    ODEMessageReceiver.invokeBusinessLogic
    1. org.apache.ode.utils.DOMUtils.parse(DOMUtils.java:622)
    2. org.apache.ode.utils.DOMUtils.stringToDOM(DOMUtils.java:548)
    3. org.apache.ode.dao.jpa.MessageExchangeDAOImpl.getEPR(MessageExchangeDAOImpl.java:150)
    4. org.apache.ode.bpel.engine.MessageExchangeImpl.getEndpointReference(MessageExchangeImpl.java:199)
    5. org.apache.ode.axis2.ODEService.writeHeader(ODEService.java:271)
    6. org.apache.ode.axis2.ODEService.onResponse(ODEService.java:229)
    7. org.apache.ode.axis2.ODEService.onAxisMessageExchange(ODEService.java:172)
    8. org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:69)
    9. org.apache.ode.axis2.hooks.ODEMessageReceiver.invokeBusinessLogic(ODEMessageReceiver.java:50)
    9 frames
  4. org.apache.axis2
    AxisEngine.receive
    1. org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:96)
    2. org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:145)
    2 frames
  5. Apache Axis2 - Transport - HTTP
    AxisServlet.doPost
    1. org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
    2. org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:120)
    2 frames
  6. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    2. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    2 frames
  7. Glassfish Core
    CoyoteAdapter.service
    1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
    2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
    3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
    5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
    7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
    8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
    8 frames
  8. Grizzly HTTP
    LeaderFollowerWorkerThread.runIt
    1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
    2. org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
    3. org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
    4. org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
    4 frames
  9. Tomcat Util
    ThreadPool$ControlRunnable.run
    1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
    1 frame
  10. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:595)
    1 frame