0 Replies Latest reply on Aug 12, 2002 11:33 AM by Fabricio

    Query Method not Found Exception - puzzled!

    Fabricio Newbie

      I have a very simple CMP entity bean (2.0), which has the following declaration in its LocalHome:

      public EmpleadoLocal findByUsuario(String username) throws FinderException;


      I have also declared the corresponding getter/setter methods in EmpleadoBean:

      public abstract String getUsuario();
      public abstract void setUsuario(String username);

      Finally, i have also declared the method in ejb-jar.xml

      <![CDATA[SELECT ENTITY(a) FROM Empleado a WHERE a.usuario = ?1]]>

      At deployment time, i get the following error:

      10:56:15,591 ERROR [EjbModule] Initialization failed
      org.jboss.deployment.DeploymentException: Query method not found: findByUsuario

      And a list of nested exceptions which i will not include here...

      Any ideas? I have not been able to solve this problem so far... Thanks in advance!