houcun wrote:
Dave:

From roller 1.2 until 3.1 , We use jboss application server and postgresql , but you tell us,
Roller 4.0 doesn't support Hibernate &Jobss , I am hard hit. :(~~~
Do you want join OpenJPA team and PK Hibernate &Jboss ?

The best approach is to figure out how to allow Roller to use the
OpenJPA 0.9.7 jars that are shipped with Roller. Roller 4.0 was never
successfully tested with Hibernate/JPA.

I'm still not completely clear on how JPA determines which provider to
instantiate... but from what I've seen, if you have the jars for two
different providers available, it gets confused and causes errors like this. Unfortunately JBoss provides the hibernate jars as part of the app server itself, and this seems to cause problems deploying Roller with OpenJPA on JBoss.

What I do is this, and it seems to work fine. Bundle the roller war into an ear file, and in the ear file put a jboss-app.xml
with the following:


<?xml version="1.0" ?>

<jboss-app>
  <loader-repository>
  org.openqabal:loader=roller-ear.ear
     <loader-repository-config>
     java2ParentDelegation=false
     </loader-repository-config>
  </loader-repository>
</jboss-app>


This limits the classloader scoping to the ear and turns off
parent delegation (eg, searching container supplied classes first).

Note that if you do this, you'll need an application.xml as well,and both that and the jboss-app.xml should go in the META-INF dir of the ear file.


TTYL,


--
Phillip Rhodes
Chief Architect - OpenQabal
https://openqabal.dev.java.net
LinkedIn: http://www.linkedin.com/in/philliprhodes

Reply via email to