Thanks, I added backport jar to my testing lib, and openejb works fine. What 
confused me is my ear without this jar can still work fine in the Weblogic 
server (and I searched Weblogic and I didn't find a backport jar there). Could 
it be the way HibernatePersistence invoked by openejb somehow different from 
when it's loaded from the server that made the difference? I agree with you on 
Hibernate/EHCache seems to be using it of course.
 
Regards,
- John

________________________________

From: David Blevins [mailto:david.blev...@visi.com]
Sent: Mon 10/25/2010 5:22 PM
To: users@openejb.apache.org
Subject: Re: how to adjust classpath - version 3.1.2



Trimmed down the stack trace to the 'Caused by' clause and it looks 
Hibernate/EHCache related.

On Oct 25, 2010, at 1:28 PM, Yu, Xiaohui wrote:

> Caused by: java.lang.NoClassDefFoundError: 
> edu/emory/mathcs/backport/java/util/concurrent/BlockingQueue
>
> at 
> net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:401)
>
> at 
> net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:334)
>
> at net.sf.ehcache.CacheManager.configure(CacheManager.java:293)
>
> at net.sf.ehcache.CacheManager.init(CacheManager.java:225)
>
> at net.sf.ehcache.CacheManager.<init>(CacheManager.java:212)
>
> at net.sf.ehcache.CacheManager.create(CacheManager.java:381)
>
> at 
> net.sf.ehcache.hibernate.SingletonEhCacheProvider.start(SingletonEhCacheProvider.java:123)
>
> at 
> org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge.start(RegionFactoryCacheProviderBridge.java:72)
>
> at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:215)
>
> at 
> org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
>
> at 
> org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
>
> at 
> org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
>
> at 
> org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:132)
>
> at 
> org.apache.openejb.assembler.classic.PersistenceBuilder.createEntityManagerFactory(PersistenceBuilder.java:185)
>
> at 
> org.apache.openejb.assembler.classic.Assembler.createApplication(Assembler.java:490)
>
> ... 31 more

My guess is you need this jar: http://backport-jsr166.sourceforge.net 
<http://backport-jsr166.sourceforge.net/> 

We used to include that in 3.1.2 as it was needed by ActiveMQ 4.  Now we use 
ActiveMQ 5 and that jar is no longer required for any code we ship, but it 
looks like Hibernate still uses it via EHCache.


-David



Reply via email to