• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate 3

 
Greg Or
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Getting java.lang.NoClassDefFoundError: net/sf/ehcache/CacheException. I'm not reference anything with net/... I appreciate any suggestion on how I go about finding where this class is being referenced.

Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ditto, I got that too.

I was completely a ClassPath issue. the ehcache-1.1.jar file needs to be in your classpath. If this is coming from JBoss you want to put this into your server directory under all, default, or minimum /lib directory. depending on which server type you are using.

Mark
 
Greg Or
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Mark,

I'm using hibernate 3 - ehcache-1.1.jar references net/sf/ehcache...

From hibernate.org:

"Be careful if you use external software that references Hibernate packages. For example, EHCache has its own CacheProvider in net.sf.ehcache.hibernate.Provider. Until all external software updates its references, you might have to patch and work around this issue. For EHCache you may also use the built-in provider in Hibernate: org.hibernate.cache.EhCacheProvider"

Do I need to be using org.hibernate.cach.EhCacheProvider instead? If so, how do I go about this?

Thanks
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, in our app, we don't specifically call the ehCache classes, it is part of the configuration, so all we need to do is have the jar file in the classpath.

Mark
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic