Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The original configuration you had posted (jboss-web.xml and jboss-classloading.xml) works for me on EAP-5.12. </p> <p>Apparently the jboss-web.xml's </p> <pre><code>java2ClassLoadingCompliance="false" </code></pre> <p>and/or </p> <pre><code> &lt;loader-repository-config&gt; java2ParentDelegation=false &lt;/loader-repository-config&gt; </code></pre> <p>are being ignored by Jboss. See <a href="http://docs.jboss.org/jbossesb/docs/4.10/manuals/html/Getting_Started_Guide/index.html#sect-scoped_deploy" rel="nofollow">http://docs.jboss.org/jbossesb/docs/4.10/manuals/html/Getting_Started_Guide/index.html#sect-scoped_deploy</a> where this is mentioned (community edition, but apparently also valid for the blessed edition of jboss)</p> <p>I had been struggling w/ this for a long time. Then gave up. Then recently revisited it and stumbled on the jboss-classloading.xml solution. </p> <p>Without it, I would get ClassCastException:</p> <p>java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence cannot be cast to javax.persistence.spi.PersistenceProvider</p> <p>I have a later version (3.6.0.Final) of hibernate-entitymanager in the war than what is used by Jboss.</p> <pre><code> &lt;dependency&gt; &lt;groupId&gt;org.hibernate&lt;/groupId&gt; &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt; &lt;version&gt;3.6.0.Final&lt;/version&gt; &lt;type&gt;jar&lt;/type&gt; &lt;scope&gt;compile&lt;/scope&gt; &lt;/dependency&gt; </code></pre> <p>What's great about this, now that it works, is I can deploy same war on tomcat and jboss. (tomcat in the cloud for a backup solution, and jboss on the "ground".)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload