简体   繁体   中英

Java EE Glassfish error compiling non existing named query

My problem is following:

In one entity class I have added NamedQuery that didn't compile well at the time of application deployment to server. The problem was that I was using wrong entity name in it's JPQL statement, so I've decided to remove that problematic NamedQuery for the time being, while I consider some alternative.

So, everything went on normal, the application was working fine, when all of the sudden, I started getting the same error I've got when I tried to deploy entity bean with afore-mentioned problematic NamedQuery. Funny thing is that such NamedQuery does not exist anywhere in my code - I've removed all references to it, so there's no way it could still get deployed to server, but somehow it does. It's like the Glassfish holds it's own copy of those entity beans and keeps deploying them, although they were modified in the meantime.

Feel free to ask me for any additional info regarding this problem.

I've managed to resolve the issue by simply restarting Windows.

Did try undeploying and deploying the application numerous times, did many glassfish server restarts but none of that gave me the results. Looks like glassfish had some kind of it's own cache where it stored the old versions of those entity classes and for some unknown reason refused to deploy new classes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM