This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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


Win a copy of Head First Android this week in the Android forum!
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: 42956
    
  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: 16887
    
  26

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


Customer surveys are for companies who didn't pay proper attention to begin with.
 
wood burning stoves
 
subject: Tomcat cannot find persistence / jar files
 
It's not a secret anymore!