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;
(Empleado=Employee)
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
<query-method>
<method-name>findByUsuario</method-name>
<method-params>java.lang.String</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT ENTITY(a) FROM Empleado a WHERE a.usuario = ?1]]>
</ejb-ql>
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!