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.