- This topic has 3 replies, 2 voices, and was last updated 19 years, 6 months ago by
Riyad Kalla.
-
AuthorPosts
-
JimOHearnMemberMy environment:
Windows XP sp2
Eclipse v3.0.2
MyEclipse v3.8.4
JBoss v4.0.2I get the following after Jboss deploys my entity beans:
15:14:16,609 INFO [STDOUT] org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered “x.ID” at line 1, column 46.
Was expecting one of:
“NOT” …
“(” …
(rest of text omitted)Here is the offending finder method:
@ejb.finder view-type=”local”
description=”Component finder by id”
signature=”java.util.Collection findByID(com.xxx.model.ComponentPK ID)”
query=”Select OBJECT(x) FROM Component x WHERE x.ID = ?1″
method-intf=”LocalHome”Here is the get method for the attribute:
/**
* @ejb.interface-method view-type=”both”
* @ejb.persistence column-name=”C_ID”
*
* @return Primary Key
*/
public abstract com.xxx.model.ComponentPK getID();I get similar parse exception errors on all of the finder methods I defined on all my entity beans.
Is this an XDoclet configuration problem? I don’s see an ejbql syntax error here.
I appreciate any insights you can give.
Thanks.
January 9, 2006 at 9:55 am #244175
Riyad KallaMemberMoving to OT > Soft Dev
Should that statement just be SELECT x
minus the parens?
January 10, 2006 at 12:32 pm #244260
JimOHearnMemberUsing SELECT x generates the following:
Caused by: org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered “x” at line 1, column 8.
Was expecting one of:
“DISTINCT” …
“OBJECT” …
“COUNT” …
“MAX” …
“MIN” …
“AVG” …
“SUM” …
<NUMERIC_VALUED_PATH> …
<STRING_VALUED_PATH> …
<DATETIME_VALUED_PATH> …
<BOOLEAN_VALUED_PATH> …
<ENTITY_VALUED_PATH> …
<VALUE_CLASS_VALUED_PATH> …I knew that the ejbql parser wouldn’t like that either, since SELECT needs to operate on something other than a variable (e.g. OBJECT(x) rather than x)
I am still scratching my head on this. Could my problem be related to the version of JBoss or MyEclipse that I’m using?
January 10, 2006 at 12:34 pm #244261
Riyad KallaMemberIt may be the version of JBoss. MyEclipse doesn’t mind, it’s all JavaDoc/XDoclet to it.
I don’t keep up with the EJB spec so I don’t know what version supports which version of the QL, sorry.
-
AuthorPosts