Bug 849706 - Hibernate 3 on EAP 6.0: java.lang.ClassCastException: org.hibernate.ejb.EntityManagerFactoryImpl cannot be cast to org.hibernate.ejb.HibernateEntityManagerFactory
Hibernate 3 on EAP 6.0: java.lang.ClassCastException: org.hibernate.ejb.Entit...
Status: CLOSED WONTFIX
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5 (Show other bugs)
BRMS 5.3.0.GA
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Geoffrey De Smet
Jiri Svitak
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-20 12:19 EDT by Jiri Svitak
Modified: 2015-06-01 21:34 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-29 02:16:50 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
server.log (20.37 KB, text/plain)
2012-08-20 12:19 EDT, Jiri Svitak
no flags Details
business-central-server persistence.xml (1.80 KB, text/plain)
2012-08-20 12:24 EDT, Jiri Svitak
no flags Details
jbpm-human-task persistence.xml (2.39 KB, text/plain)
2012-08-20 12:25 EDT, Jiri Svitak
no flags Details
jboss-deployment-structure.xml (195 bytes, text/plain)
2012-08-20 12:25 EDT, Jiri Svitak
no flags Details
standalone.xml (16.26 KB, text/plain)
2012-08-20 12:27 EDT, Jiri Svitak
no flags Details

  None (edit)
Description Jiri Svitak 2012-08-20 12:19:14 EDT
Created attachment 605731 [details]
server.log

"java.lang.ClassCastException: org.hibernate.ejb.EntityManagerFactoryImpl cannot be cast to org.hibernate.ejb.HibernateEntityManagerFactory" is thrown when using Hibernate 3 on EAP 6.0. Default Hibernate version in EAP 6.0 is 4, so to use Hibernate 3, then you have to disable it for your .war file manually by creating
app.war/WEB-INF/jboss-deployment-structure.xml. Setting up of my environment is described in this document:
https://docspace.corp.redhat.com/docs/DOC-111367

However Hibernate 4 detects persistence configuration of my .war files and throws the exception attached in server.log. I have tested human task with a simple test and the human task appears in business-central and it's possible to complete it, data passing in HT was not tested. So it's possible that Hibernate 4 has no effect on the deployed BRMS .war files that uses Hibernate 3, but it may bother server admins. To disable the error the only solution I have found is to disable whole JPA module and subsystem in standalone/configuration/standalone.xml of EAP 6.0, however that affects all other deployed applications which use Hibernate 4.

My environment:
EAP 6.0
BRMS 5.3.0 GA patch 01
PostgreSQL 9
Comment 1 Jiri Svitak 2012-08-20 12:24:22 EDT
Created attachment 605733 [details]
business-central-server persistence.xml
Comment 2 Jiri Svitak 2012-08-20 12:25:20 EDT
Created attachment 605735 [details]
jbpm-human-task persistence.xml
Comment 3 Jiri Svitak 2012-08-20 12:25:56 EDT
Created attachment 605736 [details]
jboss-deployment-structure.xml
Comment 4 Jiri Svitak 2012-08-20 12:27:05 EDT
Created attachment 605738 [details]
standalone.xml
Comment 6 Geoffrey De Smet 2012-08-24 07:03:39 EDT
When does this error happen? During deployment? What's the easiest way to reproduce?
Comment 8 Geoffrey De Smet 2012-08-24 10:04:48 EDT
Lukas has asked to me to stall working on this bugzilla, they are revising it.

Note You need to log in before you can comment on or make changes to this bug.