2 Replies Latest reply on Feb 22, 2008 10:40 AM by Kenneth Christensen

    Named query not known

    jeremy girard Newbie

      I've got a similar problem, my SMPC is configured, i've a namedQuery annotation on an @entity class.

      I  can't see the binding log a startup and when the request is processed i've  got an Exception :
      'org.hibernate.MappingException: Named query not known: test

      Entity :
      @NamedQuery(name=test, query=select s from Space s where s.user.login = :userLogin)
      public class SpaceService {

           private EntityManager entityManager;

           @Out(scope = ScopeType.SESSION, value = space)
           public Space getSpace() {
                final Query getSpaceQuery = entityManager.createNamedQuery(test);

      Thanks in advance,