1 Reply Latest reply on Aug 27, 2002 1:32 PM by Dain Sundstrom

    query method in CMP2.0

    hongmei Newbie

      Hi, all.

      I am using Jboss3.0.0+Jetty, and I met a problem when I wrote deploy descriptor for query methods. Here is a example of mine in ejb-jar.xml, but I can not deploy to jboss successfully. It kept saying " a.urlid was expecting one of ... or ... or or...". Looks like after a.urlid it was expecting some operation. It's wild. Could anybody tell me what's wrong? What's relationship among ejb-jar.xml, jboss.xml and jbosscmp-jdbc.xml?

      in ejb-jar.xml:

      <![CDATA[SELECT OBJECT(b) FROM UrlConcept AS b WHERE b.urlid = ?1 AND b.conceptid = ?2]]>

      <![CDATA[SELECT OBJECT(a) FROM UrlConcept AS a WHERE a.conceptid = ?1]]>


      and the error message is:

      org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwa
      ble: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "a.urlid" at l
      ine 2, column 85.
      Was expecting one of:
      "ABS" ...
      "LENGTH" ...
      "LOCATE" ...
      "SQRT" ...
      "(" ...
      "+" ...
      "-" ...
      "NOT" ...
      "CONCAT" ...
      "SUBSTRING" ...
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.j
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(JD
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.start(JDBCQueryManage
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManage
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManag
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:793)
      at org.jboss.ejb.EntityContainer.invoke(EntityContainer.java:1055)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:491)
      at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl


        • 1. Re: query method in CMP2.0
          Dain Sundstrom Master

          What is the query that is breaking? It will be the one containing 'a.urlid'. If you can't determin the query, turn the log level for category org.jboss.ejb.plugins.cmp up to DEBUG in the log4j.xml file.

          This looks like you are trying to compare a number to a string which is not allowed by EJB-QL.