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

    Named query not known

    lasansue.jeremy.girard.satives.fr

      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 :
      '
      @Name(spaceAction)
      @Scope(ScopeType.STATELESS)
      @NamedQuery(name=test, query=select s from Space s where s.user.login = :userLogin)
      public class SpaceService {


           
           @In
           private EntityManager entityManager;


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


      Thanks in advance,