J2EE CMP EJB Error compiling ejbql FROM not found
murdoch Mar 31, 2004 6:47 AMHi,
I work with Eclipse Lomboz Plugin (XDoclet und ANT) and get following error (short: "FROM not found"), when I try to deploy my Container Managed Persistence EJBs on my JBoss 3.2.0 RC2:
13:35:44,616 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=VerbindungstypBean,service=EJB
org.jboss.deployment.DeploymentException: Error compiling ejbql; - nested throwable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: FROM not found)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.(JDBCEJBQLQuery.java:46)
What can I do, to solve this problem. The FROM clause of the EJBQL-Query of the Entity Bean (CMP) in the ejb-jar.xml links to a DB-Schema which links again to the actual database table.
Here's the code part with the EJBQL-query of my ejb-jar.xml:
<entity > <description><![CDATA[]]></description> <ejb-name>Verbindungstyp</ejb-name> <home>com.business.verbindung.ejb.VerbindungstypHome</home> <remote>com.business.verbindung.ejb.Verbindungstyp</remote> <local-home>com.business.verbindung.ejb.VerbindungstypLocalHome</local-home> <local>com.business.verbindung.ejb.VerbindungstypLocal</local> <ejb-class>com.business.verbindung.ejb.VerbindungstypCMP</ejb-class> <persistence-type>Container</persistence-type> <prim-key-class>java.lang.Integer</prim-key-class> <reentrant>False</reentrant> <cmp-version>2.x</cmp-version> <abstract-schema-name>verbindungstypSchema</abstract-schema-name> <cmp-field > <description><![CDATA[Returns the id]]></description> <field-name>id</field-name> </cmp-field> <cmp-field > <description><![CDATA[Returns the name]]></description> <field-name>name</field-name> </cmp-field> <cmp-field > <description><![CDATA[Returns the parentId]]></description> <field-name>parentId</field-name> </cmp-field> <primkey-field>id</primkey-field> <query> <query-method> <method-name>findRoots</method-name> <method-params> </method-params> </query-method> <ejb-ql><![CDATA[ SELECT OBJECT(vt) FROM verbindungstypSchema vt WHERE vt.parentId = 0]]></ejb-ql> </query> <query> <query-method> <method-name>findByParentId</method-name> <method-params> <method-param>java.lang.Integer</method-param> </method-params> </query-method> <ejb-ql><![CDATA[ SELECT OBJECT(vt) FROM verbindungstypSchema vt WHERE vt.parentId = ?1]]></ejb-ql> </query> <!-- Write a file named ejb-finders-VerbindungstypBean.xml if you want to define extra finders. --> </entity>
I look forward to your replies :))
MfG Murdoch!