My application is a web service. The code works from my IDE (which doesn't use the persistence.xml file at all, but instead seems to use a datasource configuration of some sort) but fails once it is deployed.
It looks like persistence.xml is supposed to be in the web service's META-INF directory. But I get the error above. I've also added it to the root, to WEB-INF, and even to /lib just to see if something will happen. The error message never changes.
I'd be cool with an error related to configuration as at least that would represent some progress!
Does anyone have any insight into where the persistence.xml file should be, or additional things necessary to make a web service use it?
posted 7 years ago
your persistence.xml file should be inside the META-INF directory which is present inside a jar file...
Now you can place this jar file in following locations....
1. WEB-INF/lib directory...
2. root of .ear file
3. root of ejb-jar file ... - preferable
Please let me know where you have placed your jar file...
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads