Bug 849706 - Hibernate 3 on EAP 6.0: java.lang.ClassCastException: org.hibernate.ejb.EntityManagerFactoryImpl cannot be cast to org.hibernate.ejb.HibernateEntityManagerFactory
Summary: Hibernate 3 on EAP 6.0: java.lang.ClassCastException: org.hibernate.ejb.Entit...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: Geoffrey De Smet
QA Contact: Jiri Svitak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-20 16:19 UTC by Jiri Svitak
Modified: 2015-06-02 01:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-29 06:16:50 UTC
Type: Bug
Embargoed:


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

Description Jiri Svitak 2012-08-20 16:19:14 UTC
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 16:24:22 UTC
Created attachment 605733 [details]
business-central-server persistence.xml

Comment 2 Jiri Svitak 2012-08-20 16:25:20 UTC
Created attachment 605735 [details]
jbpm-human-task persistence.xml

Comment 3 Jiri Svitak 2012-08-20 16:25:56 UTC
Created attachment 605736 [details]
jboss-deployment-structure.xml

Comment 4 Jiri Svitak 2012-08-20 16:27:05 UTC
Created attachment 605738 [details]
standalone.xml

Comment 6 Geoffrey De Smet 2012-08-24 11:03:39 UTC
When does this error happen? During deployment? What's the easiest way to reproduce?

Comment 8 Geoffrey De Smet 2012-08-24 14:04:48 UTC
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.