Hi,
I'm trying to get this to work for a few days now without success. I've got an entitybean Users, which defines a finder method: findbypassword.
I first tried to place the query in the ejb-jar.xml and later in the standardjbosscmp-jdbc.xm file both unsuccesfull.
The entry for standardjbosscmp-jdbc is:
<ejb-name>test/User</ejb-name>
find-By-Password
<query-method>
<method-name>findByPassword</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<jboss-ql><![CDATA[
SELECT OBJECT(O)
FROM users o
WHERE o.name= ?1 AND o.password= ?2
]]></jboss-ql>
and the error I keep on getting is:
Depends On Me: org.jboss.deployment.DeploymentException: Error compiling JBossQ
L statement 'SELECT OBJECT(O)
FROM users o
WHERE o.name= ?1 AND o.password= ?2'; - nested throwable: (org.jb
oss.ejb.plugins.cmp.ejbql.ParseException: Encountered "users" at line 2, column
21.
Was expecting one of:
"IN" ...
<ABSTRACT_SCHEMA> ...
)]
I tried many things, and as last this resource. Hopefully somebody can point me in the right direction..
tia & regards,
Jeroen.
You haven't defined the abstract schema
name for your entity?
<jboss-ql> goes in a file called jbosscmp-jdbc.xml
Regards,
Adrian