[Persistence, JBoss/CMP, Hibernate, Database] - Strange IllegalAccessError with JBoss + Hibernate
by gbilodeau
Hi guys,
I'm getting the following error when loading up my application on JBoss 4.0.5:
java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Mappings.<init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/List;Lorg/hibernate/cfg/NamingStrategy;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/List;Ljava/util/Map;Ljava/util/Map;)V from class org.hibernate.cfg.ExtendedMappings
| at org.hibernate.cfg.ExtendedMappings.<init>(ExtendedMappings.java:65)
| at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:166)
| at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:254)
| at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1039)
| at org.hibernate.ejb.Ejb3Configuration.buildMappings(Ejb3Configuration.java:1211)
| at org.hibernate.ejb.EventListenerConfigurator.configure(EventListenerConfigurator.java:154)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:847)
| at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:385)
| at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:126)
|
This application is running fine on Tomcat 5.5 and Glassfish (Sun JSAS 9.0), but not on JBoss.
Looking at the code, I see that the two classes (Mappings and ExtendedMappings) are declared to be in the same package (org.hibernate.cfg) but are located in 2 different JARs (Hibernate and Annotations). Maybe this is enforced more strictly by JBoss?
I'm running on Java 5, JBoss 4.0.5GA, Hibernate 3.2GA, Hibernate Annotations 3.2GA and Hibernate EntityManager 3.2GA. All the libraries are correctly deployed and there is no mistake in using a release candidate instead of the final release.
Any ideas?
Thanks,
GB
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981003#3981003
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3981003
19 years, 6 months
[JBossCache] - Re: NPE when using optimistic locking with JbossCache 1.4.0.
by pkorros
Thanks for your reply!
I just had the time to test this again using the OptimisticTreeCacheProvider and I also silenced the NPE by setting the TxInterceptor log level to WARN.
Now the system works ok with a single user but under load I get the following errors...
16:01:36,991 ERROR [StdServerSession] failed to commit/rollback
org.jboss.tm.JBossRollbackException: Unable to commit, tx=TransactionImpl:XidImpl[FormatId=257, GlobalId=pkor/28, BranchQual=, localId=28] status=STATUS_NO_TRANSACTION; - nested throwable: (java.lang.RuntimeException: )
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:372)
at org.jboss.tm.TxManager.commit(TxManager.java:240)
at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:351)
at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:905)
at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:170)
at org.jboss.mq.SpySession.run(SpySession.java:323)
at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:194)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.RuntimeException:
at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1091)
at org.jboss.cache.interceptors.OrderedSynchronizationHandler.beforeCompletion(OrderedSynchronizationHandler.java:75)
at org.jboss.tm.TransactionImpl.doBeforeCompletion(TransactionImpl.java:1491)
at org.jboss.tm.TransactionImpl.beforePrepare(TransactionImpl.java:1110)
at org.jboss.tm.TransactionImpl.commit(TransactionImpl.java:324)
... 8 more
Caused by: org.jboss.cache.CacheException: Real node for /com/oakgrovesystems/reactor/processMediation/hibernate/HibProcess/com.oakgrovesystems.reactor.processMediation.hibernate.HibProcess#101709 is null, and this wasn't newly created in this tx!
at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.simpleValidate(OptimisticValidatorInterceptor.java:122)
at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.validateNodes(OptimisticValidatorInterceptor.java:101)
at org.jboss.cache.interceptors.OptimisticValidatorInterceptor.invoke(OptimisticValidatorInterceptor.java:66)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.OptimisticLockingInterceptor.invoke(OptimisticLockingInterceptor.java:95)
at org.jboss.cache.interceptors.Interceptor.invoke(Interceptor.java:68)
at org.jboss.cache.interceptors.TxInterceptor.runPreparePhase(TxInterceptor.java:804)
at org.jboss.cache.interceptors.TxInterceptor$LocalSynchronizationHandler.beforeCompletion(TxInterceptor.java:1069)
... 12 more
What does that mean? any clues?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980999#3980999
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980999
19 years, 6 months