This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman 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 Building Microservices this week in the Design 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: 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: 17046
    
  26

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Tomcat cannot find persistence / jar files
 
It's not a secret anymore!