Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Deploytool 1.3.1 is unable to package bean with finder methods

843833Sep 27 2002 — edited Oct 1 2002
I am gettting the following error message while trying to deploy a Local bean finder methods in LocalHome


/******
Exception during packaging:
Unknown packaging error
java.lang.RuntimeException: No method found for XML query element: Ambiguous or
invalid <query-method>
at com.sun.enterprise.deployment.xml.EjbNode.parseQueries(EjbNode.java:6
17)
at com.sun.enterprise.deployment.xml.EjbNode.completeLoadingDescriptor(E


jbNode.java:590)
at com.sun.enterprise.deployment.xml.EjbBundleNode.completeLoadingDescri
ptor(EjbBundleNode.java:468)
at com.sun.enterprise.deployment.EjbBundleArchivist.createPackage(EjbBun
dleArchivist.java:189)
at com.sun.enterprise.tools.packager.ComponentPackager.packageEjbArchive
(ComponentPackager.java:155)
at com.sun.enterprise.tools.packager.Main.main(Main.java:88)

*/

My deployment descriptor looks like this

/**
<entity>
<display-name>DataTypeBean</display-name>
<ejb-name>DataTypeBean</ejb-name>
<local-home>com.ohioedge.j2ee.api.attribute.ejb.DataTypeHome</local-home>
<local>com.ohioedge.j2ee.api.attribute.ejb.DataType</local>
<ejb-class>com.ohioedge.j2ee.api.attribute.ejb.DataTypeEJB</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>com.ohioedge.j2ee.api.attribute.ejb.DataTypePK</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>DataType</abstract-schema-name>
<cmp-field>
<description>no description</description>
<field-name>name</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>lastModifiedBy</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>description</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>dataTypeID</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>sqlType</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>javaType</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>createdBy</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>lastModifiedOn</field-name>
</cmp-field>
<cmp-field>
<description>no description</description>
<field-name>createdOn</field-name>
</cmp-field>
<resource-ref>
<res-ref-name>jdbc/DataTypeDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<query>
<description></description>
<query-method>
<method-name>findAll</method-name>
<method-params />
</query-method>
<result-type-mapping>Local</result-type-mapping>
<ejb-ql><![CDATA[SELECT OBJECT(o) FROM DataType AS o]]></ejb-ql>
</query>
<query>
<description></description>
<query-method>
<method-name>findByName</method-name>
<method-params><method-param>java.lang.String</method-param></method-params>
</query-method>
<result-type-mapping>Local</result-type-mapping>
<ejb-ql>SELECT OBJECT(o) FROM DataType AS o WHERE o.name LIKE ?1</ejb-ql>
</query>
</entity>
*/

The error occurs at the second finder method (findByName). Can someone point me in the right direction?

Thanks,
Sandeep
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 29 2002
Added on Sep 27 2002
1 comment
163 views