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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,

The persistence_2_0.xsd enforces the order of the elements in the xml. Re-ordering them makes then error go away.

Solutions on the web

via tomcat-users by jay, 1 year ago
Premature end of file.
via gmane.org by Unknown author, 2 years ago
via Google Groups by Ashok Nair, 7 months ago
Premature end of file.
via YouTrack by Unknown author, 1 year ago
org.xml.sax.SAXParseException: Premature end of file.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(UnknownSource)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(UnknownSource)
at org.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)
at org.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)
at org.apache.xerces.impl.XMLErrorReporter.reportError(UnknownSource)
at org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(UnknownSource)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1546)
at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:583)
at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)

Users with the same issue

2 times, 2 months ago
2 times, 2 months ago
7 times, 8 months ago
2 times, 8 months ago
2 times, 8 months ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.