问题
Using oracle xe with glassfish and eclipselink. Problems with persisting objects arise. After fresh restart of glassfish app works ok. If app is recompiled and redeployed via admin interface. Persisting objects stops working. The error is:
Internal Exception: java.sql.SQLException: ORA-17041: (no message for error) 1 Error Code: 17041
What am I doing wrong?
EDIT: Pasted logs http://pastebin.com/qC01ztkx
回答1:
Found the problem. I had a reference to ojdbc6.jar in my app. I have removed the reference and supplied glassfish with ojdbc6.jar by copying said jar to glassfish/lib
回答2:
It's generally a good idea to always restart the server after deploying. You can run out of perm gen space, and have other weird issues as well.
Since you're saying it works after restarting, I would chalk it up to that.
来源:https://stackoverflow.com/questions/4557815/jpa-stops-working-after-redeploy-in-glassfish