2 Replies Latest reply on Oct 21, 2002 2:05 PM by Alex Bereshny

    Problems with JBoss3.0.3 and EJB-QL

    pedro Newbie

      Hello,

      I'm trying to learn J2EE and I have decided to do a simple application which uses CMP Entity Beans. This application has a cmp entity bean called "Category" which is related to itself with a bidirectional one-to-many relationship. Until here all work correctly. The problem appears when I create the next find method using EJB-QL:

      "SELECT OBJECT(c) FROM Category WHERE c.padre=?1"

      It's too easy, isn't it?

      Well, when I try to deploy my application in JBoss 3.0.3 the next error appears:

      2002-10-21 14:23:32,188 INFO [org.jboss.ejb.plugins.cmp.jdbc.JDBCStartCommand.Category] Created table 'CATEGORY' successfully.
      2002-10-21 14:23:32,208 WARN [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:jndiName=Category,service=EJB
      org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 53.
      Was expecting one of:
      <IDENTIFICATION_VARIABLE> ...
      <ENTITY_VALUED_PARAMETER> ...
      <ENTITY_VALUED_PATH> ...
      )
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:44)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:218)
      ...

      (The exception is tooooooo large)

      Does anybody know the problem and the solution?

      Thank you very much and sorry for my poor English.