This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
Marshal

Joined: Mar 22, 2005
Posts: 41587
    
  54
What do you mean by "referenced jars"? Where are they? WEB-INF/lib would be a good place.


Ping & DNS - my free Android networking tools app
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: 16019
    
  20

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.
 
 
subject: Tomcat cannot find persistence / jar files