Hi guys,

One of our users in ODE is trying to deploy on JBoss. There seems to be some
configuration problems, most probably related to the presence of Hibernate
in the server. He's having the following stacktrace (I trimmed the non
relevant bits):

13:15:29,343 INFO  [STDOUT] ERROR - ODEServer.initDAO(413) | Error
instantiating
DAO Connection Factory class org.apache.ode.dao.jpa.BPELDAO
ConnectionFactoryImp
l.
javax.persistence.PersistenceException: Provider error. Provider:
org.hibernate.
ejb.HibernatePersistence
      at javax.persistence.Persistence.createFactory(Persistence.java:175)
      at javax.persistence.Persistence.createEntityManagerFactory
(Persistence.
java:111)
      at org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.init
(BPELDAOConne
ctionFactoryImpl.java:108)
      at org.apache.ode.il.dbutil.Database.createDaoCF(Database.java:267)
      at org.apache.ode.axis2.ODEServer.initDAO(ODEServer.java:410)
      at org.apache.ode.axis2.ODEServer.init(ODEServer.java:144)
      ....
13:15:31,078 INFO  [STDOUT] ERROR - StandardContext.loadOnStartup(4073) |
Servle
t /ode threw load() exception
java.lang.ClassCastException: org.hibernate.ejb.HibernatePersistence
      at javax.persistence.Persistence.createFactory(Persistence.java:169)
      at javax.persistence.Persistence.createEntityManagerFactory
(Persistence.
java:111)
      at org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl.init
(BPELDAOConne
ctionFactoryImpl.java:108)
      at org.apache.ode.il.dbutil.Database.createDaoCF(Database.java:267)
      at org.apache.ode.axis2.ODEServer.initDAO(ODEServer.java:410)
      at org.apache.ode.axis2.ODEServer.init(ODEServer.java:144)

As you can see there's a ClassCastException in
javax.persistence.Persistence.createFactory which is a bit weird. Note that
we instantiate the factory using a specific name:

_emf = Persistence.createEntityManagerFactory("ode-dao", propMap);

And that our persistence.xml *only* references the OpenJPA persistence
factory. I've looked at the sources of Persistence.java in Glassfish but
couldn't find the right version that seems to be used here (the
createFactory method doesn't seem to exist anymore).

I'm running out of ideas and thought the knowledgeable people would probably
know more about the JBoss environment. Any idea?

Thanks!
Matthieu

Reply via email to