Christian: Your excuse is granted ;-)
Javi: What is identity.username? Could you check that it indeed is set to some value, and that that value exists in the database?
Christian Bauer wrote on Feb 20, 2008 01:39 PM:
OK, my bad. I didn't realize this is the crappy javax.persistence exception. So yes, the query is returning nothing.
The correct message should beno entity instance found for query, because entity depicts a type, not a value. As an excuse I can only offer that the native Hibernate exception for a missing mapped entity would becan not find entity.
Oh!
I found it.
Oks, this is the information to resolve the problem. Before this error I use admin
in front of identity.username
and it works. But with ...No entity found for query
I supose there was a problem with Components of Seam.
But the problem was this:
identity.username returns the username of the loged user, and with it I put in the query to get the type of the loged user.
Well, the problem was that in firts of all noone is loged and identity.username returns null
and, obviously, query returns null.
Thank you very much for the help.
Good to hear. Happy Seaming! :-)