Hello people... The following error is showing. Anybody can help-me please?
23:24:26,482 ERROR XMLHelper:61 - Error parsing XML: XML InputStream(3) White spaces are required between publicId and systemId.
23:24:26,492 ERROR Configuration:380 - Could not configure datastore from inputstream org.dom4j.DocumentException: Error on line 3 of document : White spaces are required between publicId and systemId. Nested exception: White spaces are required between publicId and systemId.
Hibernate version: 3
Mapping documents:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE hibernate-mapping PUBLIC
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="br.com.planet.dominnio.security.model.Usuario"
table="usuario"
schema="security">
<id name="codUsuario" column="cod_usuario">
<generator class="sequence">
<param name="sequence">seq_usuario</param>
</generator>
</id>
<property name="dscLogin" column="dsc_login" length="15" not-null="true"/>
<property name="nomUsuario" column="nom_usuario" length="50" not-null="true"/>
<property name="dscSenha" column="dsc_senha" length="10" not-null="false"/>
<property name="tpoSituacao" column="tpo_situacao" length="1" not-null="true"/>
<version name="tmsAlteracao" column="tms_alteracao" type="timestamp"/>
</class>
</hibernate-mapping>
Code between sessionFactory.openSession() and session.close():
Usuario usuario = new Usuario();
usuario.setDscLogin("marcelo");
usuario.setDscSenha("torres");
usuario.setNomUsuario("Marcelo");
usuario.setTpoSituacao("A");
Session session = HibernateUtilSimple.currentSession();
Transaction tx = session.beginTransaction();
session.save(usuario);
tx.commit();
HibernateUtilSimple.closeSession();
Full stack trace of any exception that occurs:
23:24:25,931 INFO Environment:411 - Hibernate 3.0 alpha
23:24:25,941 INFO Environment:424 - hibernate.properties not found
23:24:25,951 INFO Environment:457 - using CGLIB reflection optimizer
23:24:25,971 INFO Environment:486 - using JDK 1.4 java.sql.Timestamp handling
23:24:26,171 INFO Configuration:1019 - configuring from resource: /hibernate.cf
g.xml
23:24:26,181 INFO Configuration:990 - Configuration resource: /hibernate.cfg.xm
l
23:24:26,462 INFO Configuration:416 - Mapping resource: br/com/planet/dominnio/
security/model/Usuario.hbm.xml
23:24:26,482 ERROR XMLHelper:61 - Error parsing XML: XML InputStream(3) White sp
aces are required between publicId and systemId.
23:24:26,492 ERROR Configuration:380 - Could not configure datastore from input
stream
org.dom4j.DocumentException: Error on line 3 of document : White spaces are req
uired between publicId and systemId. Nested exception: White spaces are required
between publicId and systemId.
at org.dom4j.io.SAXReader.read(SAXReader.java:355)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:371
)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:421)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1137)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1093)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1021)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1007)
at br.com.planet.baseapp.persistence.HibernateUtilSimple.<clinit>(Hibern
ateUtilSimple.java:26)
at br.com.planet.dominnio.security.business.UsuarioBS.Insert(UsuarioBS.j
ava:33)
at br.com.planet.dominnio.security.controller.LogonAction.execute(LogonA
ction.java:48)
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:115
8)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534)
Nested exception:
org.xml.sax.SAXParseException: White spaces are required between publicId and sy
stemId.
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.dom4j.io.SAXReader.read(SAXReader.java:339)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:371
)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:421)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1137)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1093)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1021)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1007)
at br.com.planet.baseapp.persistence.HibernateUtilSimple.<clinit>(Hibern
ateUtilSimple.java:26)
at br.com.planet.dominnio.security.business.UsuarioBS.Insert(UsuarioBS.j
ava:33)
at br.com.planet.dominnio.security.controller.LogonAction.execute(LogonA
ction.java:48)
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:115
8)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534)
23:24:26,692 ERROR HibernateUtilSimple:29 - Initial SessionFactory creation fail
ed.
org.hibernate.MappingException: Error reading resource: br/com/planet/dominnio/s
ecurity/model/Usuario.hbm.xml
at org.hibernate.cfg.Configuration.addResource(Configuration.java:424)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1137)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1093)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1021)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1007)
at br.com.planet.baseapp.persistence.HibernateUtilSimple.<clinit>(Hibern
ateUtilSimple.java:26)
at br.com.planet.dominnio.security.business.UsuarioBS.Insert(UsuarioBS.j
ava:33)
at br.com.planet.dominnio.security.controller.LogonAction.execute(LogonA
ction.java:48)
at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
tProcessor.java:421)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
va:226)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:115
8)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
icationFilterChain.java:284)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
ilterChain.java:204)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
alve.java:257)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
ContextValve.java:245)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
alve.java:199)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
ava:184)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
ava:164)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:149)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:156)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
eContext.java:151)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
a:567)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:20
6)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
:833)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
ssConnection(Http11Protocol.java:732)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
:619)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
ool.java:688)
at java.lang.Thread.run(Thread.java:534)
Caused by: org.hibernate.MappingException: org.dom4j.DocumentException: Error on
line 3 of document : White spaces are required between publicId and systemId.
Nested exception: White spaces are required between publicId and systemId.
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:381
)
at org.hibernate.cfg.Configuration.addResource(Configuration.java:421)
... 37 more
Caused by: org.dom4j.DocumentException: Error on line 3 of document : White spa
ces are required between publicId and systemId. Nested exception: White spaces a
re required between publicId and systemId.
at org.dom4j.io.SAXReader.read(SAXReader.java:355)
at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:371
)
... 38 more
Name and version of the database you are using:
PostgreSQL 7.3.2
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
|