Home > Archive > Java Beans > January 2006 > ejbql.ParseException
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
ejbql.ParseException
|
|
| Stefan Theusner 2006-01-09, 9:00 pm |
| Hi,
maybe someone could help me at this.
I defined two ejb finder mehtods using xdoclet:
---
* @ejb.finder
* description="finding vehicle type by primary key"
* signature="de.brockhaus.training.cmp.interfaces.VehicleTypeLocal
findByPrimaryKey(java.lang.Integer primaryKey)"
* query="SELECT Object(o) FROM vehicletype AS o WHERE o.IDENT = ?1"
*
* @ejb.finder
* description="finding all vehicle types"
* signature="java.util.Collection findAll()"
* query="SELECT Object(a) FROM vehicletype AS a"
---
After deploying my generated *jar i got an:
org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered
"vehicletype" at line 1, column 23.
Was expecting one of:
"IN" ...
<ABSTRACT_SCHEMA> ...
If i delete the findAll xdoclet deployment will work fine.
I tried some other EJB-QL Statements but only findByPrimaryKey is working...
Using JBoss 4.0.2 (default)
Any ideas?
thx
stefan
| |
| Frank Langelage 2006-01-09, 9:00 pm |
| Stefan Theusner wrote:
> ---
> * @ejb.finder
> * description="finding vehicle type by primary key"
> * signature="de.brockhaus.training.cmp.interfaces.VehicleTypeLocal
> findByPrimaryKey(java.lang.Integer primaryKey)"
> * query="SELECT Object(o) FROM vehicletype AS o WHERE o.IDENT = ?1"
> *
> * @ejb.finder
> * description="finding all vehicle types"
> * signature="java.util.Collection findAll()"
> * query="SELECT Object(a) FROM vehicletype AS a"
> ---
>
> After deploying my generated *jar i got an:
>
> org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered
> "vehicletype" at line 1, column 23.
> Was expecting one of:
> "IN" ...
> <ABSTRACT_SCHEMA> ...
>
>
> If i delete the findAll xdoclet deployment will work fine.
>
> I tried some other EJB-QL Statements but only findByPrimaryKey is
> working...
>
> Using JBoss 4.0.2 (default)
>
> Any ideas?
>
Defining the findByPrimaryKey() is not necessary. It's generated
automatically.
Did you specify "ejb.bean schema" ? If not, what's the value for
"ejb.bean name" ?
This is used as "abstract-schema" in the ejb-jar.xml and this must be
used for the from clause as the error message says.
Regards,
Frank
| |
| Stefan Theusner 2006-01-09, 9:00 pm |
| Frank Langelage wrote:
> Did you specify "ejb.bean schema" ? If not, what's the value for
> "ejb.bean name" ?
> This is used as "abstract-schema" in the ejb-jar.xml and this must be
> used for the from clause as the error message says.
Hi Frank,
thanks a lot.
Adding schema to ejb.bean works.
ejb.bean name is VehicleType
and
ejb.bean schema is know vehicletyp
Regards,
Stefan
|
|
|
|
|