1 2 Previous Next 17 Replies Latest reply on Feb 20, 2008 3:55 PM by danielc.roth Go to original post
      • 15. Re: Problem. Code error. ...No entity found for query

        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?

        • 16. Re: Problem. Code error. ...No entity found for query
          pericles

          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 be no 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 be can 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.

          • 17. Re: Problem. Code error. ...No entity found for query

            Good to hear. Happy Seaming! :-)

            1 2 Previous Next