2 Replies Latest reply on Jan 10, 2002 11:29 AM by Maurizio Giunti

    CMP 2 Relations and JBoss

    Maurizio Giunti Newbie


      I am trying to implement a simple One to Many relation using Jboss 3.0 Alpha and a tool named EjbGen (http://www.beust.com/cedric/ejbgen/) which speeds up EJB creation and maintanance.
      I can create the correct sources (Beans, Local interfaces, ejb-jar.xml), compile and delpoy, but when I try to use the relation I get an exception like the following:

      Column not found: UTENTEEJB_ACCESSI_NAME in statement [SELECT numero FROM AccessoEJB WHERE UtenteEJB_accessi_name='giunti']; nested exception is:
      javax.ejb.EJBException: FindByForeignKey failed

      I am not a CMP 2.0 guru, but it seems that JBoss assume the existence of a the field UtenteEJB_accessi_home in the table Accessi, but it does not really create it (both Accesso and Utente are CMP 2.0 Entity Beans).

      Here follows a snippet from the ejb-jar.xml which seems correct to me:


      I can post sources too if you need.
      Can anybody help me?
      Thanks in advance.