"SAXParseException; Premature end of file." by kie-remote-client access with multibyte data

Solution In Progress - Updated -

Issue

  • I get SAXParseException when I access to business-central using Remote API
    Server side:
14:11:29,139 ERROR [org.jboss.resteasy.resteasy_jaxrs.i18n] (http-127.0.0.1:8080-4) RESTEASY000100: Failed executing POST execute: org.jboss.resteasy.plugins.providers.jaxb.JAXBUnmarshalException: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]
    at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.readFrom(AbstractJAXBProvider.java:147) [resteasy-jaxb-provider-2.3.13.Final-redhat-1.jar:]
    at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:106) [resteasy-jaxrs-2.3.13.Final-redhat-1.jar:]
    at org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:63) [resteasy-jaxrs-2.3.13.Final-redhat-1.jar:]
    at org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:109) [resteasy-jaxrs-2.3.13.Final-redhat-1.jar:]
...
Caused by: javax.xml.bind.UnmarshalException
 - with linked exception:
[org.xml.sax.SAXParseException; Premature end of file.]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.createUnmarshalException(AbstractUnmarshallerImpl.java:314) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-3.jar:1.0.4.Final-redhat-3]
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.createUnmarshalException(UnmarshallerImpl.java:578) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:264) [jaxb-impl-2.2.11.jar:2.2.11]
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:229) [jaxb-impl-2.2.11.jar:2.2.11]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:119) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-3.jar:1.0.4.Final-redhat-3]
    at javax.xml.bind.helpers.AbstractUnmarshallerImpl.unmarshal(AbstractUnmarshallerImpl.java:102) [jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-3.jar:1.0.4.Final-redhat-3]
    at org.jboss.resteasy.plugins.providers.jaxb.SecureUnmarshaller.unmarshal(SecureUnmarshaller.java:167) [resteasy-jaxb-provider-2.3.13.Final-redhat-1.jar:]
    at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.processWithSecureProcessing(AbstractJAXBProvider.java:306) [resteasy-jaxb-provider-2.3.13.Final-redhat-1.jar:]
    at org.jboss.resteasy.plugins.providers.jaxb.AbstractJAXBProvider.readFrom(AbstractJAXBProvider.java:129) [resteasy-jaxb-provider-2.3.13.Final-redhat-1.jar:]
    ... 46 more
Caused by: org.xml.sax.SAXParseException; Premature end of file.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:196) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:175) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:322) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:281) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:203) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:802) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:768) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1196) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:555) [xercesImpl-2.9.1.redhat-6.jar:2.9.1.redhat-6]
    at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:258) [jaxb-impl-2.2.11.jar:2.2.11]
    ... 52 more

Client side:

org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to send HTTP POST request
    at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:380)
    at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeCommand(AbstractRemoteCommandObject.java:160)
    at org.kie.services.client.api.command.KieSessionClientCommandObject.startProcess(KieSessionClientCommandObject.java:282)
    at com.sample.ProcessStartTest.testRest(ProcessStartTest.java:37)
...
Caused by: org.kie.remote.common.rest.KieRemoteHttpRequestException: Error occurred when trying to retrieve response code
    at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemoteHttpRequest.java:1331)
    at org.kie.remote.common.rest.KieRemoteHttpRequest.post(KieRemoteHttpRequest.java:719)
    at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:376)
    ... 22 more
Caused by: java.io.IOException: Incomplete output stream
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1472)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
    at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
    at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemoteHttpRequest.java:1329)
    ... 24 more

Environment

  • Red Hat JBoss BPM Suite
    • 6.3.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.