Oliver,
You are trying to access the findNom method by passing a parameter that does
not exist. So, in the ejb-jar method where you have declared findNom,
replace the code with:
<query-method>
<method-name>findNom</method-name>
<method-params>
<method-param>java.lang.Integer</method-param>
</method-params>
</query-method>
<ejb-ql>SELECT Object(o) FROM Client9 o WHERE o.nom = ?1</ejb-ql>
Assuming that nom is an integer.
-D
-----Original Message-----
From: och [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 14, 2003 6:12 PM
To: Chadha, Devesh
Subject: Re: Re: No method found for XML query element
Here it is :
the probleme is due to findNom method
findAll generate no problems. I believe it's append when i put a where
clause .... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE ejb-jar PUBLIC
"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
"http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>ClientAdr</display-name>
<enterprise-beans>
<session>
<display-name>Gestion</display-name>
<ejb-name>Gestion</ejb-name>
<home>info.GestionHome</home>
<remote>info.Gestion</remote>
<ejb-class>info.GestionBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
<entity>
<display-name>Adresse9</display-name>
<ejb-name>Adresse9</ejb-name>
<local-home>info.LocalAdresse9Home</local-home>
<local>info.LocalAdresse9</local>
<ejb-class>info.Adresse9Bean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.math.BigDecimal</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>Adresse9</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>rue</field-name>
</cmp-field>
<cmp-field>
<field-name>ville</field-name>
</cmp-field>
<cmp-field>
<field-name>pays</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
</entity>
<entity>
<display-name>Client9</display-name>
<ejb-name>Client9</ejb-name>
<home>info.Client9Home</home>
<remote>info.Client9</remote>
<local-home>info.LocalClient9Home</local-home>
<local>info.LocalClient9</local>
<ejb-class>info.Client9Bean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.math.BigDecimal</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>Client9</abstract-schema-name>
<cmp-field>
<field-name>num</field-name>
</cmp-field>
<cmp-field>
<field-name>nom</field-name>
</cmp-field>
<primkey-field>num</primkey-field>
<ejb-local-ref>
<ejb-ref-name>ejb/Adresse9</ejb-ref-name>
<ejb-ref-type>Entity</ejb-ref-type>
<local-home>info.LocalAdresse9Home</local-home>
<local>info.LocalAdresse9</local>
<ejb-link>Adresse9</ejb-link>
</ejb-local-ref>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params/>
</query-method>
<ejb-ql>SELECT Object(o) FROM Client9 o</ejb-ql>
</query>
<query>
<query-method>
<method-name>findNom</method-name>
<method-params/>
</query-method>
<ejb-ql>SELECT Object(o) FROM Client9 o WHERE o.nom = ?1</ejb-ql>
</query>
</entity>
</enterprise-beans>
<relationships>
<ejb-relation>
<ejb-relation-name>Client-Adresse</ejb-relation-name>
<ejb-relationship-role>
<ejb-relationship-role-name>Client</ejb-relationship-role-name>
<multiplicity>Many</multiplicity>
<cascade-delete/>
<relationship-role-source>
<ejb-name>Client9</ejb-name>
</relationship-role-source>
<cmr-field>
<cmr-field-name>adresse</cmr-field-name>
</cmr-field>
</ejb-relationship-role>
<ejb-relationship-role>
<ejb-relationship-role-name>Adresse</ejb-relationship-role-name>
<multiplicity>One</multiplicity>
<relationship-role-source>
<ejb-name>Adresse9</ejb-name>
</relationship-role-source>
</ejb-relationship-role>
</ejb-relation>
</relationships>
<assembly-descriptor>
<container-transaction>
<description>This value was set as a default by Sun ONE
Studio.</description>
<method>
<ejb-name>Adresse9</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<description>This value was set as a default by Sun ONE
Studio.</description>
<method>
<ejb-name>Client9</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
<container-transaction>
<description>This value was set as a default by Sun ONE
Studio.</description>
<method>
<ejb-name>Gestion</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
>Oliver,
>
>Could you send your finder method and a copy of the ejb-jar.xml file.
>That should help in figuring out the problem.
>
>-D
>
>-----Original Message-----
>From: och [mailto:[EMAIL PROTECTED]
>Sent: Tuesday, October 14, 2003 2:20 PM
>To: [EMAIL PROTECTED]
>Subject: No method found for XML query element
>
>
>Hello i have resolved my probleme about deployment. This is ok only if
>i don't create finder method. If have finder method there is this
>probleme during deployment : Deployment error (...) Fatal error ejbc
>(....) cause : No method found for XML query element : ambigous or
>invalid <query-method> What is the problem exactly ? Can somebody help
>me please ? Thank's a lot olivier
>
>=======================================================================
>====
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff EJB-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
>
>-----------------------------------------------------------------------
>-------
>This message is intended only for the personal and confidential use of the
>designated recipient(s) named above. If you are not the intended recipient
of
>this message you are hereby notified that any review, dissemination,
>distribution or copying of this message is strictly prohibited. This
>communication is for information purposes only and should not be regarded
as
>an offer to sell or as a solicitation of an offer to buy any financial
>product, an official confirmation of any transaction, or as an official
>statement of Lehman Brothers. Email transmission cannot be guaranteed to
be
>secure or error-free. Therefore, we do not represent that this information
is
>complete or accurate and it should not be relied upon as such. All
>information is subject to change without notice.
>
>=======================================================================
>====
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff EJB-INTEREST". For general help, send email to
>[EMAIL PROTECTED] and include in the body of the message "help".
------------------------------------------------------------------------------
This message is intended only for the personal and confidential use of the
designated recipient(s) named above. If you are not the intended recipient of
this message you are hereby notified that any review, dissemination,
distribution or copying of this message is strictly prohibited. This
communication is for information purposes only and should not be regarded as
an offer to sell or as a solicitation of an offer to buy any financial
product, an official confirmation of any transaction, or as an official
statement of Lehman Brothers. Email transmission cannot be guaranteed to be
secure or error-free. Therefore, we do not represent that this information is
complete or accurate and it should not be relied upon as such. All
information is subject to change without notice.
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".