my dog learned polymorphism
The moose likes Tomcat and the fly likes Tomcat cannot find persistence / jar files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat cannot find persistence / jar files" Watch "Tomcat cannot find persistence / jar files" New topic
Author

Tomcat cannot find persistence / jar files

Edward Nunez
Ranch Hand

Joined: Sep 25, 2013
Posts: 39
Hey, I'm trying to reference some persistence objects in a servlet. But, TomCat explodes because "java.lang.ClassNotFoundException: javax.persistence.Persistence". These classes are in my referenced jars and not causing any compilation or runtime problems within my non-server Java classes. I'm not sure what the problem is. Should the Jars be somewhere else too?
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42958
    
  73
What do you mean by "referenced jars"? Where are they? WEB-INF/lib would be a good place.
Edward Nunez
Ranch Hand

Joined: Sep 25, 2013
Posts: 39
You know something, that IS a good place. I was expecting TomCat to check my project's lib folder but it does not.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17145
    
  27

Tomcat could care less about your IDE. Your IDE plugs into tomcat, not the other way around.


An IDE is no substitute for an Intelligent Developer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat cannot find persistence / jar files
 
jQuery in Action, 3rd edition