2 Replies Latest reply on Oct 11, 2003 8:36 AM by Klaus Kaal

    CMP - Does not like my QL

    Klaus Kaal Newbie

      Hi,

      I try (for the first time :-)) to create a CMP2.0 bean. Everything seems all right, but depoying it to JBoss, it complains:

      ---JBOSS log-------------------------------------------------------------
      14:16:12,958 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:

      MBeans waiting for classes:

      MBeans waiting for other MBeans:
      [ObjectName: jboss.j2ee:jndiName=cosi/userdata,service=EJB
      state: FAILED
      I Depend On:
      Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(udata) FROM usrdata AS udata WHERE ( udata.REGNAME=?1 and udata.PASSWORD=?2 )'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "usrdata" at line 1, column 27.
      Was expecting one of:
      "IN" ...
      <ABSTRACT_SCHEMA> ...
      )]

      ------ END log --------------------------------------

      This im my XDoclet declaration:

      -------------------------------------------------------

      /**
      * @ejb.bean
      * name="user_data"
      * jndi-name="cosi/userdata"
      * cmp-version="2.x"
      * type="CMP"
      * view-type="remote"
      * description="Entity bean for working with data of user-mgr"
      * primarykey-field="id"
      * schema="alluser"
      *
      * @ejb.value-object
      * name="userobject"
      * match="*"
      *
      * @ejb.ejb-ref
      * ejb-name="user_data"
      * ref-name="ejb/cosi/userdata"
      *
      * @jboss.ejb-ref-jndi
      * jndi-name="cosi/userdata"
      * ref-name="cosi/userdata"
      *
      * @ejb.persistence table-name="usrdata"
      *
      * @jboss.create-table "true"
      *
      * @jboss.remove-table "true"
      *
      * @jboss.tuned-updates "true"
      *
      * @jboss.read-only "true"
      *
      * @jboss.time-out "100"
      *
      * @ejb.finder
      * method-intf="Home"
      * signature="java.util.Collection findByNameAndPassword( java.lang.String regname, java.lang.String pw )"
      * query="SELECT OBJECT(udata) FROM usrdata AS udata WHERE ( udata.regname=?1 and udata.password=?2 )"
      *
      **/

      -----------------------------------------------------------

      Example of declarations in bean:

      -----------------------------------------------------------


      /**
      * @ejb.pk-field
      * @ejb.interface-method
      *
      * @ejb.persistence
      * column-name="id"
      * jdbc-type="INTEGER"
      * sql-type="integer"
      *
      * @jboss.auto-increment
      *
      */
      public abstract Integer getId();

      public abstract void setId(Integer id);

      /**
      * @ejb.persistence
      * column-name="name"
      * jdbc-type="VARCHAR"
      * sql-type="varchar(50)"
      * @return
      */
      public abstract java.lang.String getName();

      public abstract void setName(java.lang.String name);


      --------------------------------------------------------

      Can anybody explain, what I am doing wrong?

      Thanks for your help

      Klaus