The EJB spec requires you to have an ejb-ql element, but if the query is not implemented in ejb-ql, just leave the element empty. It is a signal when porting the application to another platform that a query is not portable.

-dain

On Wednesday, February 19, 2003, at 03:05 PM, Frank Morton wrote:

Moving from jboss 3.0.2 to 3.0.6, now getting deployment errors on all finder methods:

Bean : Profile
Method : public abstract Profile findByProfileHandle(String) throws FinderException
Section: 10.5.6
Warning: Every finder method except findByPrimaryKey(key) must be associated with a query element in the deployment descriptor.

So, I thought this meant I needed to include something like the following in ejb-jar.xml
or jbosscmp-jdbc.xml like the docs describe for the bean:

<query>
<query-method>
<method-name>findByProfileHandle</method-name>
<method-params><method-param>java.lang.String</method-param></method- params>
</query-method>
<declared-sql>
<where><![CDATA[ profilehandle = ?1 ]]></where>
<order></order>
</declared-sql>
</query>

Neither made a difference. In ejb-jar.xml it insists on a <ejb-ql> tag, so I added the
following to ejb-jar.xml instead, which still generated the same problem:

<query>
<query-method>
<method-name>findProfileHandle</method-name>
<method-params><method-param>String</method-param></method-params>
</query-method>
<ejb-ql><![CDATA[
SELECT OBJECT(p)
FROM profile p
WHERE p.profileHandle = ?1
]]></ejb-ql>
</query>

What is the cause of this error?



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to