<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Hibernate Configuration Issues
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="https://community.jboss.org/people/chaluwa">Charles Odili</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/message/798688#798688">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>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.</p><p>I have attached the hibernate.cfg.xml file and the persistence.xml file as well. Here is the error stack trace :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>00:46:38,421 WARN&#160; [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.</p><p>00:46:38,532 INFO&#160; [org.jboss.weld.deployer] (MSC service thread 1-4) JBAS016002: Processing weld deployment LibConsole.war</p><p>00:46:38,943 INFO&#160; [org.jboss.weld.deployer] (MSC service thread 1-6) JBAS016005: Starting Services for CDI deployment: LibConsole.war</p><p>00:46:38,992 INFO&#160; [org.jboss.weld.Version] (MSC service thread 1-6) WELD-000900 1.1.5 (AS71)</p><p>00:46:39,030 INFO&#160; [org.jboss.as.jpa] (MSC service thread 1-7) JBAS011402: Starting Persistence Unit Service 'LibConsole.war#LibConsole'</p><p>00:46:39,259 INFO&#160; [org.hibernate.annotations.common.Version] (MSC service thread 1-7) HCANN000001: Hibernate Commons Annotations {4.0.1.Final}</p><p>00:46:39,268 INFO&#160; [org.hibernate.Version] (MSC service thread 1-7) HHH000412: Hibernate Core {4.0.1.Final}</p><p>00:46:39,271 INFO&#160; [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000206: hibernate.properties not found</p><p>00:46:39,273 INFO&#160; [org.hibernate.cfg.Environment] (MSC service thread 1-7) HHH000021: Bytecode provider name : javassist</p><p>00:46:39,369 INFO&#160; [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-7) HHH000204: Processing PersistenceUnitInfo [</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;name: LibConsole</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;...]</p><p>00:46:39,452 INFO&#160; [org.hibernate.cfg.Configuration] (MSC service thread 1-7) HHH000043: Configuring from resource: hibernate.cfg.xml</p><p>00:46:39,452 INFO&#160; [org.hibernate.cfg.Configuration] (MSC service thread 1-7) HHH000040: Configuration resource: hibernate.cfg.xml</p><p>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</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_13]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_13]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_13]</p><p>Caused by: org.hibernate.HibernateException: Could not parse configuration: hibernate.cfg.xml</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2010)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.cfg.Configuration.configure(Configuration.java:1922)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:1042)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:692)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:72)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:162)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.start(PersistenceUnitServiceImpl.java:85)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;... 3 more</p><p>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</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.dom4j.io.SAXReader.read(SAXReader.java:484)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2002)</p><p>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;... 11 more</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>00:46:39,735 INFO&#160; [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "LibConsole.war" was rolled back with failure message {"JBAS014671: Failed services" =&gt; {"jboss.persistenceunit.\"LibConsole.war#LibConsole\"" =&gt; "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"LibConsole.war#LibConsole\": Failed to start service"}}</p><p>00:46:39,797 INFO&#160; [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015877: Stopped deployment LibConsole.war in 62ms</p><p>00:46:39,800 INFO&#160; [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report</p><p>JBAS014777:&#160;&#160; Services which failed to start:&#160;&#160;&#160;&#160;&#160; service jboss.persistenceunit."LibConsole.war#LibConsole": org.jboss.msc.service.StartException in service jboss.persistenceunit."LibConsole.war#LibConsole": Failed to start service</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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:" =&gt; {"Operation step-2" =&gt; {"JBAS014671: Failed services" =&gt; {"jboss.persistenceunit.\"LibConsole.war#LibConsole\"" =&gt; "org.jboss.msc.service.StartException in service jboss.persistenceunit.\"LibConsole.war#LibConsole\": Failed to start service"}}}}</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="https://community.jboss.org/message/798688#798688">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>