For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > March 2004 > EJB-QL - Problem with LIKE Statement









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 EJB-QL - Problem with LIKE Statement
Bonkers

2004-03-19, 8:46 pm

Hi,

i use Jboss 3.2.1 and eclipse with lomboz. i tried to add the following query to my bean:

* @ejb.finder
* query="SELECT OBJECT(a) FROM minfo a where a.filename LIKE ?1"
* signature="java.util.Collection findByFilename(java.lang.String filename)"


and get this error:

Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(a) FROM minfo a where a.filename LIKE ?1'; - nested th
rowable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at lin
e 1, column 53.
Was expecting:
<STRING_LITERAL> ...
)]

I dont understand that, because i have a type string for this.

thanks a lot!


Marek Lange

2004-03-19, 8:46 pm

Bonkers wrote:
> * @ejb.finder
> * query="SELECT OBJECT(a) FROM minfo a where a.filename LIKE ?1"
> * signature="java.util.Collection findByFilename(java.lang.String filename)"
> and get this error:
> Depends On Me: org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement 'SELECT OBJECT(a) FROM minfo a where a.filename LIKE ?1'; - nested th
> rowable: (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "1" at lin
> e 1, column 53.
> Was expecting:
> <STRING_LITERAL> ...
> )]


You need to use JBossQL for like.

-marek
Bonkers

2004-03-19, 8:46 pm

thank U
is there no way to use ejb-ql with the same result?

Marek Lange

2004-03-19, 8:46 pm

Bonkers wrote:

> thank U
> is there no way to use ejb-ql with the same result?


No.

-marek
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com