When attempting a FindByPrimaryKey on a CMP2 Entity Bean receiving ORA-00936: missing expression
Issue
-
The following exception is raised when attempting to fid an entity bean:
2010-02-25 12:47:01,359 ERROR [org.jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand.YdmOrderAddressEJB] Error checking if entity exists java.sql.SQLException: ORA-00936: missing expression -
After adding DEBUG logging to the org.jboss.ejb.plugins.cmp.jdbc package, it appears the find by primary key SQL generated by the EJB deployer is missing the predicate clause, see log message below.
2010-02-26 14:01:49,875 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCFindByPrimaryKeyQuery.YdmOrderAddressEJB#findByPrimaryKey] SQL: SELECT FROM YDM_ORDER_ADDRESS t0_YdmOrderAddressEJB WHERE 2010-02-26 14:01:49,875 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCQueryManager.YdmOrderAddressEJB] Added findByPrimaryKey query command for local home interface
Environment
- Enterprise Application Platform (EAP)
- 4.3.0 CP06
- Container Managed Persistence 2.0 (CMP 2.0)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
