[solved]SAXParseException: Premature end of file

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2008 07:43 AM
getting this exception,org. xml.sax.SAXParseException: Premature end of file.
when running this code on an client:
when running this code on an client:
Predicate itemsToCheckOut = new Predicate(referencestoGet, null, null);CheckoutResult checkOutResult = authoringService.checkout(itemsToCheckOut, null);
trace:de.momeLearnClient.exceptions.AlfrescoWSException: org.xml.sax.SAXParseException: Premature end of file. at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.alfresco.webservice.authoring.AuthoringServiceSoapBindingStub.checkout(AuthoringServiceSoapBindingStub.java:608) at de.momeLearnClient.datasource.AlfrescoWSDataAccessManager.getAllContentItemsFromRepository(AlfrescoWSDataAccessManager.java:294)
can anybody help me ?
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2008 09:57 AM
It sounds like you are not receiving a SOAP message response. Maybe you are not connecting to the correct endpoint URL, or you are behind a proxy (probably a transparent proxy?).
Study the alfresco.log in the root directory of Alfresco installation, and if you can not see anything, use tcpmon or similar to capture de XML messages exchange.
Study the alfresco.log in the root directory of Alfresco installation, and if you can not see anything, use tcpmon or similar to capture de XML messages exchange.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2008 04:37 PM
yes, the client gets this when the response from the server is a failure, in this case the xpath prcessor throwed an exception that the path in an Reference was wrong

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-18-2008 11:58 AM
Hi
Even me faces the same problem.
In my case i am able to access the old services implemented . But faceing the problem with the New Service.This New service had two Holder objects.
[java] faultSubcode:
[java] faultString: org.xml.sax.SAXParseException: Premature end of file.
[java] faultActor:
[java] faultNode:
[java] faultDetail:
[java] {http://xml.apache.org/axis/}stackTrace
rg.xml.sax.SAXParseExce ption: Premature end of file.
[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce ption(Unknown Source)
[java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S ource)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S ource)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S ource)
[java] at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion (Unknown Source)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown So urce)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown So urce)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Sou rce)
[java] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unkn own Source)
[java] at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
[java] at org.apache.axis.encoding.DeserializationContext.parse(Deseria lizationContext.java:227)
[java] at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
[java] at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
[java] at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(Mu stUnderstandChecker.java:62)
[java] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
[java] at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
[java] at org.apache.axis.client.Call.invoke(Call.java:2767)
[java] at org.apache.axis.client.Call.invoke(Call.java:2443)
[java] at org.apache.axis.client.Call.invoke(Call.java:2366)
[java] at org.apache.axis.client.Call.invoke(Call.java:1812)
[java] at com.acme.ems.northbound.soap.networkLevel.NetworkLevelBindStu b.saveConfigExt(NetworkLevelBindStub.java:3934)
[java] at com.verizon.ns.client.Client.test(Client.java:210)
[java] at com.verizon.ns.client.Client.main(Client.java:167)
[java] {http://xml.apache.org/axis/}hostname:blogical
[java] org.xml.sax.SAXParseException: Premature end of file.
can any one pls Hlep me.
Note: I am able to call the old services with out any error but New services is causeing me this problem …
Even me faces the same problem.
In my case i am able to access the old services implemented . But faceing the problem with the New Service.This New service had two Holder objects.
[java] faultSubcode:
[java] faultString: org.xml.sax.SAXParseException: Premature end of file.
[java] faultActor:
[java] faultNode:
[java] faultDetail:
[java] {http://xml.apache.org/axis/}stackTrace

[java] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseExce ption(Unknown Source)
[java] at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S ource)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S ource)
[java] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown S ource)
[java] at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion (Unknown Source)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown So urce)
[java] at org.apache.xerces.parsers.XML11Configuration.parse(Unknown So urce)
[java] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[java] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Sou rce)
[java] at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unkn own Source)
[java] at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
[java] at org.apache.axis.encoding.DeserializationContext.parse(Deseria lizationContext.java:227)
[java] at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
[java] at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
[java] at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(Mu stUnderstandChecker.java:62)
[java] at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
[java] at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
[java] at org.apache.axis.client.Call.invoke(Call.java:2767)
[java] at org.apache.axis.client.Call.invoke(Call.java:2443)
[java] at org.apache.axis.client.Call.invoke(Call.java:2366)
[java] at org.apache.axis.client.Call.invoke(Call.java:1812)
[java] at com.acme.ems.northbound.soap.networkLevel.NetworkLevelBindStu b.saveConfigExt(NetworkLevelBindStub.java:3934)
[java] at com.verizon.ns.client.Client.test(Client.java:210)
[java] at com.verizon.ns.client.Client.main(Client.java:167)
[java] {http://xml.apache.org/axis/}hostname:blogical
[java] org.xml.sax.SAXParseException: Premature end of file.
can any one pls Hlep me.
Note: I am able to call the old services with out any error but New services is causeing me this problem …

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 05:10 AM
the client cannot read the server response
–> thats why the parser is throwing that
so your client doesn´t recognizes these "new Service"-response
–> thats why the parser is throwing that
so your client doesn´t recognizes these "new Service"-response

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2008 11:28 AM
I had taken the trace of the xml useing the paros
Content-Type: text/xml; charset=utf-8^M
Accept: application/soap+xml, application/dime, multipart/related, text/*^M
User-Agent: Axis/1.4 Paros/3.2.13^M
Host: sigtstp:5000^M
Cache-Control: no-cache^M
Pragma: no-cache^M
SOAPAction: ""^M
Content-Length: 869^M
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginToEMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><user xsi:type="xsd:string">admin</user><password xsi:type="xsd:string">admin</password><ossObject href="#id0"/></loginToEMS><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1
SSObject" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:userObjects.soap.northbound.ems.acme.com"><ossName xsi:type="xsd:string">ESAP</ossName><osslocation xsi:type="xsd:string">Tampa</osslocation><ossType xsi:type="xsd:string">Provisioning</ossType></multiRef></soapenv:Body></soapenv:Envelope>^A^@^@^@<92>HTTP/1.1 200 OK^M
Server: Sun-ONE-Web-Server/6.1^M
Date: Fri, 15 Aug 2008 21:53:17 GMT^M
Content-type: text/xml; charset=utf-8^M
Connection: close
Cleint is able to genarate the xml file and send to server but the server is getting closed.
Can u pls help if i need to use and diffrent ant task i am useing axis-wsdl2java task to genarate the stubs.
Content-Type: text/xml; charset=utf-8^M
Accept: application/soap+xml, application/dime, multipart/related, text/*^M
User-Agent: Axis/1.4 Paros/3.2.13^M
Host: sigtstp:5000^M
Cache-Control: no-cache^M
Pragma: no-cache^M
SOAPAction: ""^M
Content-Length: 869^M
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><loginToEMS soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><user xsi:type="xsd:string">admin</user><password xsi:type="xsd:string">admin</password><ossObject href="#id0"/></loginToEMS><multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns1

Server: Sun-ONE-Web-Server/6.1^M
Date: Fri, 15 Aug 2008 21:53:17 GMT^M
Content-type: text/xml; charset=utf-8^M
Connection: close
Cleint is able to genarate the xml file and send to server but the server is getting closed.
Can u pls help if i need to use and diffrent ant task i am useing axis-wsdl2java task to genarate the stubs.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2010 10:24 PM
I counter the same error when I deploy community 3.3g on WebLogic 10.3.
But there is no error when on tomcat.
Any idea? Thank you.
But there is no error when on tomcat.
Any idea? Thank you.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2013 05:50 AM
Alfresco 4.0.d
Tomcat v7.0
Even I am getting the same error
This block of code is throwing the error:
Predicate itemsToCheckOut = new Predicate(new Reference[]{document}, STORE, null);
CheckoutResult checkOutResult = WebServiceFactory.getAuthoringService().checkout(itemsToCheckOut, null);
Following is the stacktrace:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace
rg.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.alfresco.webservice.authoring.AuthoringServiceSoapBindingStub.checkout(AuthoringServiceSoapBindingStub.java:608)
at com.tcs.interfaceToAlfresco.services.AlfrescoServices.createMinorVersionOfDocument(AlfrescoServices.java:407)
at com.tcs.interfaceToAlfresco.services.AlfrescoUpload.documentsWithVersion(AlfrescoUpload.java:106)
at com.tcs.interfaceToAlfresco.services.Uploading.startUpload(Uploading.java:97)
at com.tcs.interfaceToAlfresco.action.Upload.execute(Upload.java:33)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Tomcat v7.0
Even I am getting the same error
This block of code is throwing the error:
Predicate itemsToCheckOut = new Predicate(new Reference[]{document}, STORE, null);
CheckoutResult checkOutResult = WebServiceFactory.getAuthoringService().checkout(itemsToCheckOut, null);
Following is the stacktrace:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Premature end of file.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace

at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at org.alfresco.webservice.authoring.AuthoringServiceSoapBindingStub.checkout(AuthoringServiceSoapBindingStub.java:608)
at com.tcs.interfaceToAlfresco.services.AlfrescoServices.createMinorVersionOfDocument(AlfrescoServices.java:407)
at com.tcs.interfaceToAlfresco.services.AlfrescoUpload.documentsWithVersion(AlfrescoUpload.java:106)
at com.tcs.interfaceToAlfresco.services.Uploading.startUpload(Uploading.java:97)
at com.tcs.interfaceToAlfresco.action.Upload.execute(Upload.java:33)
at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:305)
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:191)
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-30-2013 06:00 AM
@Morpheus
How did you solve this problem???? Even I am getting the same error at the same place.
How did you solve this problem???? Even I am getting the same error at the same place.
