3 Replies Latest reply on Jul 26, 2003 6:36 AM by Vishal Sharma

    EJB ql doenot work

    parul Newbie

      Hello,

      select object(p) from Product p where p.appName LIKE CONCAT('%',CONCAT(?1,'%') ) and p.subCategory.category=?2 and p.cost>=?3 and p.cost<=?4

      does not work with jboss why??

      it throws exception at deploy time??


      org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'select object(p) from Product p where p.appName LIKE CONCAT('%',CONCAT(?1,'%') ) and p.subCategory.category=?2 and p.cost>=?3 and p.cost<=?4'; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "CONCAT" at line 1, column 56.
      Was expecting:
      <STRING_LITERAL> ...
      )
      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)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.startStoreManager(JDBCStoreManager.java:463)
      at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:369)
      at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:198)
      at org.jboss.ejb.EntityContainer.start(EntityContainer.java:376)
      at org.jboss.ejb.Container.invoke(Container.java:782)