-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Deploy Hibernate 4.3.x on JBoss EAP 6.1 (7.2.0.Final)
PostPosted: Tue Dec 10, 2013 10:49 am 
Newbie

Joined: Tue Dec 10, 2013 10:29 am
Posts: 3
Location: Freiburg, Germany
Hello,

I'm trying to deploy my application ear on JBoss EAP 6.1 with a custom version of Hibernate (version 4.3.x).
I have created a jboss-deployment-structure.xml that looks like this:

Code:
<?xml version='1.0' encoding='UTF-8'?>
<jboss-deployment-structure>
  <deployment>
    <dependencies>
      <module name="org.slf4j" />
      <module name="org.hibernate.validator" />
      <module name="org.infinispan" />
    </dependencies>
    <exclusions>
      <module name="org.hibernate" />
    </exclusions>
  </deployment>
</jboss-deployment-structure>


However, when I try to deploy the EAR file to the AS I receive the following exception on deployment:
Code:
Unable to instantiate Scanner class: class org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:103) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
   at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
   at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.0.Final-redhat-1.jar:2.1.0.Final-redhat-1]
Caused by: javax.persistence.PersistenceException: [PersistenceUnit: xxx] Unable to instantiate Scanner class: class org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.persistenceException(EntityManagerFactoryBuilderImpl.java:1225)
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.locateOrBuildScanner(EntityManagerFactoryBuilderImpl.java:767)
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.scan(EntityManagerFactoryBuilderImpl.java:720)
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:219)
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:186)
   at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:45)
   at org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:57)
   at org.hibernate.jpa.HibernatePersistenceProvider.createContainerEntityManagerFactory(HibernatePersistenceProvider.java:150)
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.createContainerEntityManagerFactory(PersistenceUnitServiceImpl.java:200) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl.access$600(PersistenceUnitServiceImpl.java:57) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
   at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:99) [jboss-as-jpa-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
   ... 4 more
Caused by: java.lang.ClassCastException: org.jboss.as.jpa.hibernate4.HibernateAnnotationScanner cannot be cast to org.hibernate.jpa.boot.scan.spi.Scanner
   at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.locateOrBuildScanner(EntityManagerFactoryBuilderImpl.java:764)
   ... 14 more


In the persistence.xml of the application i have configured:
Code:
<property name="jboss.as.jpa.adapterModule" value="org.jboss.as.jpa.hibernate:4" />

which seems not to be compatible with Hibernate 4.3.x

However, I do not know where I can obtain a compatible version of org.jboss.as.jpa.hibernate4.

Any ideas on this?

Thanks,
Felix


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.