Charles Odili [
https://community.jboss.org/people/chaluwa] created the discussion
"Hibernate Configuration Issues"
To view the discussion, visit:
https://community.jboss.org/message/798688#798688
--------------------------------------------------------------
I have an Errai KitchenSink based project to stretch my hands, but after creating my
hibernate.cfg.xml file which I placed inside src/java/main/resources the project fails to
deploy to my JBoss AS 7.1.1.Final instance. I get hibernate exceptions complaining about
not been able to parse the .cfg.xml file. Several Googling has not really helped either.
I have attached the hibernate.cfg.xml file and the persistence.xml file as well. Here is
the error stack trace :
00:46:38,421 WARN [org.jboss.as.dependency.private] (MSC service thread 1-5) JBAS018567:
Deployment "deployment.LibConsole.war" is using a private module
("org.jboss.as.server:main") which may be changed or removed in future versions
without notice.
00:46:38,532 INFO [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002:
Processing weld deployment LibConsole.war
00:46:38,943 INFO [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016005: Starting
Services for CDI deployment: LibConsole.war
00:46:38,992 INFO [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900 1.1.5
(AS71)
00:46:39,030 INFO [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011402: Starting
Persistence Unit Service 'LibConsole.war#LibConsole'
00:46:39,259 INFO [org.hibernate.annotations.common.Version] (MSC service thread 1-7)
HCANN000001: Hibernate Commons Annotations {4.0.1.Final}
00:46:39,268 INFO [org.hibernate.Version] (MSC service thread 1-7) HHH000412: Hibernate
Core {4.0.1.Final}
00:46:39,271 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000206:
hibernate.properties not found
00:46:39,273 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000021:
Bytecode provider name : javassist
00:46:39,369 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-7)
HHH000204: Processing PersistenceUnitInfo [
name: LibConsole
...]
00:46:39,452 INFO [org.hibernate.cfg.Configuration] (MSC service thread 1-7) HHH000043:
Configuring from resource: hibernate.cfg.xml
00:46:39,452 INFO [org.hibernate.cfg.Configuration] (MSC service thread 1-7) HHH000040:
Configuration resource: hibernate.cfg.xml
00:46:39,513 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC00001: Failed
to start service jboss.persistenceunit."LibConsole.war#LibConsole":
org.jboss.msc.service.StartException in service
jboss.persistenceunit."LibConsole.war#LibConsole": Failed to start service
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[rt.jar:1.7.0_13]
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[rt.jar:1.7.0_13]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]
Caused by: org.hibernate.HibernateException: Could not parse configuration:
hibernate.cfg.xml
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2010)
at org.hibernate.cfg.Configuration.configure(Configuration.java:1922)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1042)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:692)
at
org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)
at
org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at
org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746)
[jboss-msc-1.0.2.GA.jar:1.0.2.GA]
... 3 more
Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to
org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to
org.dom4j.DocumentFactory
at org.dom4j.io.SAXReader.read(SAXReader.java:484)
at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2002)
... 11 more
00:46:39,735 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870:
Deploy of deployment "LibConsole.war" was rolled back with failure message
{"JBAS014671: Failed services" =>
{"jboss.persistenceunit.\"LibConsole.war#LibConsole\"" =>
"org.jboss.msc.service.StartException in service
jboss.persistenceunit.\"LibConsole.war#LibConsole\": Failed to start
service"}}
00:46:39,797 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877:
Stopped deployment LibConsole.war in 62ms
00:46:39,800 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774:
Service status report
JBAS014777: Services which failed to start: service
jboss.persistenceunit."LibConsole.war#LibConsole":
org.jboss.msc.service.StartException in service
jboss.persistenceunit."LibConsole.war#LibConsole": Failed to start service
00:46:39,805 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads -
1) {"JBAS014653: Composite operation failed and was rolled back. Steps that
failed:" => {"Operation step-2" => {"JBAS014671: Failed
services" =>
{"jboss.persistenceunit.\"LibConsole.war#LibConsole\"" =>
"org.jboss.msc.service.StartException in service
jboss.persistenceunit.\"LibConsole.war#LibConsole\": Failed to start
service"}}}}
--------------------------------------------------------------
Reply to this message by going to Community
[
https://community.jboss.org/message/798688#798688]
Start a new discussion in JBoss Tools at Community
[
https://community.jboss.org/choose-container!input.jspa?contentType=1&...]