Java EE Glassfish error compiling non existing named query

239 views Asked by At

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.

1

There are 1 answers

0
cw3le On

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.