0 Replies Latest reply on Jul 1, 2003 11:09 AM by 2000

    EJB-CMP : sql error on findAll during create

    2000 Newbie

      This is the EJB-CMP exercise from mastering EJB II (Ed Roman). I am using JBOSS 3.2 and hypersonic.

      I can deploy my EJB fine but when I test it I get the following error :

      javax.ejb.CreateException: Error checking if entity exists:java.sql.SQLException: Unexpected token: in statement [SELECT COUNT(*) FROM PRODUCTS WHERE ]

      javax.ejb.FinderException: Find failed: java.sql.SQLException: Unexpected token: FROM in statement [SELECT FROM PRODUCTS t0_a WHERE t0_a.productid IS NOT NULL]

      and this is the query definition in the ejb-jar.xml file :

      <method-params> </method-params>
      <![CDATA[SELECT OBJECT(a) FROM ProductBean as a WHERE a.productID IS NOT NULL]]>

      if someone has a clue, thanks very much for your hints !