-
1. Re: @NamedQuery in war file
smarlow May 4, 2012 9:47 AM (in response to srbs)1 of 1 people found this helpfulShow us some more details. Paste or attach your configuration file source (persistence.xml), the java source where you defined the NamedQuery/NamedQueries. Also, get a list of the files in your war (do a "jar tf YourWebApp.war") and attach/paste that here as well.
Then enable TRACE logging for org.hibernate and org.jboss.as.jpa (see troubleshooting guide here for details). After deploying the application and getting the error, attach the AS7/standalone/log/server.log which might give us some ideas.
Lastly, do you know which tool is being used to create the war file (perhaps the Java jar tool)?
Scott
-
2. Re: @NamedQuery in war file
srbs Jun 29, 2012 11:42 PM (in response to smarlow)Hey, sorry for the late response, I forgot all about posting my results since I solved it. Scott, thanks for the advice, the logs help me solve it before I thought about posting the results.
We were searching for Entity classes at runtime during migration from an ancient PHP system. And since the ClassLoader could see the file system class files, searching worked fine. In JBoss, those classes don't exist. I then looked at the scheme for the file URI and got vfs: something. I found https://github.com/jbossas/jboss-vfs/, added it as a dependency, and wrote a solution with VFS & VirtualFile.
Everything works fine now and we don't have to use any <mapped class=".." /> in our configuration file. If anyone is interested in the actual code, I'll see if I can get permission to release it.