Thanks a lot :o)
I'll try this.
Bye


-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] la part de Harkness,
David
Envoye : lundi 21 juillet 2003 19:10
A : [EMAIL PROTECTED]
Objet : RE: [Xdoclet-user] CMR (still them)


JBoss must not support the CONCAT function. For what it's worth, even
WebLogic doesn't support any useful string functions like UPPER. :(
Instead, you must build your search string before using the finder
method.

 [EMAIL PROTECTED]
 *  query="SELECT OBJECT(p) FROM Personne p WHERE p.nomper LIKE ?1"
 *  signature="java.util.Collection findByMorceau(java.lang.String
morceau)"

That should allow you to deploy. Then to use the finder method, do

  String morceau;
  ...
  Collection found = home.findByMorceau('%' + morceau + '%');


David Harkness
Sony Pictures Digital Networks
(310) 482-4756


-----Original Message-----
From: Maxime Chevalier [mailto:[EMAIL PROTECTED] 
Sent: Monday, July 21, 2003 8:16 AM
To: [EMAIL PROTECTED]
Subject: [Xdoclet-user] CMR (still them)


Hello,

I create a CMR 1-N between 2 beans: Etablissement and Personne (an
Etablissement can have several Personnes)

In Etablissement:
   /**
   * @ejb.interface-method
   * @ejb.transaction
   *      type = "Required"
   * @ejb.relation
   *      name = "PersonnesDansUnEtablissement"
   *      role-name = "EtablissementADesPersonnes"
   *      target-role-name = "PersonneDansUnEtablissement"
   *      target-cascade-delete = "no"
   *
   */

  public abstract java.util.Collection getPersonne();

In Personne:
  /**
  * @ejb.interface-method
  * @ejb.transaction
  *      type = "Required"
  *
  * @ejb.relation
  *      name = "PersonnesDansUnEtablissement"
  *      role-name = "PersonneDansUnEtablissement"
  *      target-role-name = "EtablissementADesPersonnes"
  *
  * @jboss.relation
  *      fk-column = "NUMETBPER"
  *      related-pk-field = "numetb"
  *      fk-constraint = "true"
  */

  public abstract Etablissement getEtablissement();

But I have the following problem when I deploy under JBoss:

17:07:47,824 INFO  [EjbModule] Creating
17:07:47,874 INFO  [EjbModule] Deploying Etablissement 17:07:48,305 INFO
[EjbModule] Deploying Personne 17:07:48,345 INFO  [EjbModule] Deploying
PersonneSession 17:07:48,435 INFO  [EjbModule] Deploying
EtablissementSession 17:07:48,685 INFO  [EjbModule] Created 17:07:48,685
INFO  [EjbModule] Starting 17:07:54,143 INFO  [Personne] Table
'PERSONNE' already exists 17:07:54,554 WARN  [ServiceController] Problem
starting service jboss.j2ee:jndiName=Societe,service=EJB
org.jboss.deployment.DeploymentException: Error compiling ejbql; -
nested
throwable: (org.jboss.ejb.plugins.cmp.ejbql.Pa
rseException: Encountered "CONCAT" at line 1, column 54.
Was expecting:
    <STRING_LITERAL> ...

The CMP Personne is described like this:
 /**
 *
 [EMAIL PROTECTED]
 *      type="CMP"
 *      cmp-version="2.x"
 *      name="Personne"
 *      local-jndi-name="Personne"
 *      view-type="local"
 *      primkey-field="numper"
 *
 [EMAIL PROTECTED]
 *      class="java.math.BigDecimal"
 *
 [EMAIL PROTECTED]
 *      generate="local"
 *      local-class="untitled2.PersonneHome"
 *
 [EMAIL PROTECTED]
 *      generate="local"
 *      local-class="untitled2.Personne"
 *
 [EMAIL PROTECTED]:table-name table-name="PERSONNE"
 *
 [EMAIL PROTECTED]
 *      query="SELECT OBJECT(p) FROM Personne p"
 *      signature="java.util.Collection findAllPersonne()"
 *
 [EMAIL PROTECTED]
 *  query="SELECT OBJECT(p) FROM Personne p WHERE p.nomper LIKE
CONCAT(CONCAT('%',?1),'%')"
 *  signature="java.util.Collection findByMorceau(java.lang.String
morceau)"  */

To conclude, I deploy only 1 ear which contains only 1 jar with only one
bean Personne... Any idea ? I don't understand what's going wrong...

Thanks a lot for any response.



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to