3 Replies Latest reply on Aug 7, 2005 4:20 PM by Frank Langelage

    what's the error with such EJB-QL : SELECT Object(o) FROM ro

    steven Zhong Newbie

      Jboss 4.02
      Simple CMP roomeabn. with "String name (PK)", "int Capacity"

      In a finder named findRoomWithCapacityGreaterThan(), I defined
      the query as follows:

      SELECT Object(o) FROM room as o where o.capacity=?1


      However, I got a deploy error like below:
      ____________________________________________________
      8:02:50,014 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at line 1, column 50.
      Was expecting one of:
      "ABS" ...
      "LENGTH" ...
      "LOCATE" ...
      "SQRT" ...
      "MOD" ...
      "(" ...
      "+" ...
      "-" ...
      <INTEGER_LITERAL> ...
      <FLOATING_POINT_LITERAL> ...
      <NUMERIC_VALUED_PARAMETER> ...
      <NUMERIC_VALUED_PATH> ...

      18:02:50,024 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.generateParseException(EJBQLParser.java:4573)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.jj_consume_token(EJBQLParser.java:4454)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticPrimary(EJBQLParser.java:1771)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticFactor(EJBQLParser.java:1700)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticTerm(EJBQLParser.java:1624)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ArithmeticExpression(EJBQLParser.java:1570)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ScalarExpression(EJBQLParser.java:1562)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.SingleValueDesignator(EJBQLParser.java:1558)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ComparisonExpression(EJBQLParser.java:1493)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.SimpleCondExpression(EJBQLParser.java:864)
      18:02:50,034 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalPrimary(EJBQLParser.java:821)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalTest(EJBQLParser.java:789)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.ConditionalFactor(EJBQLParser.java:766)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereConditionalTerm(EJBQLParser.java:613)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereExpression(EJBQLParser.java:568)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.WhereClause(EJBQLParser.java:532)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.EJBQL(EJBQLParser.java:117)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.ejbql.EJBQLParser.parse(EJBQLParser.java:65)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler.compileEJBQL(JDBCEJBQLCompiler.java:153)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:43)
      18:02:50,044 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JDBCCommandFactory.java:60)
      18:02:50,054 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManager.java:272)
      18:02:50,054 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:490)
      18:02:50,054 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:381)