Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / JavaBeans / March 2004

Tip: Looking for answers? Try searching our database.

EJB-QL - Problem with LIKE Statement

Thread view: 
Bonkers - 05 Mar 2004 13:11 GMT
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 - 05 Mar 2004 13:39 GMT
> * @ejb.finder
>  *    query="SELECT OBJECT(a) FROM minfo a where a.filename LIKE ?1"  
[quoted text clipped - 6 lines]
>     <STRING_LITERAL> ...
>     )]

You need to use JBossQL for like.

-marek
Bonkers - 05 Mar 2004 17:03 GMT
thank U
is there no way to use ejb-ql with the same result?
Marek Lange - 05 Mar 2004 16:57 GMT
> thank U
> is there no way to use ejb-ql with the same result?

No.

-marek


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.