File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes hibernate 3 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate 3" Watch "hibernate 3" New topic
Author

hibernate 3

Greg Or
Greenhorn

Joined: Aug 29, 2005
Posts: 2
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Greg Or
Greenhorn

Joined: Aug 29, 2005
Posts: 2
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

Joined: Feb 05, 2001
Posts: 17250
    
    6

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate 3