Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

EJB-QL - Problem with LIKE Statement
Hi,

i use Jboss 3.2.1 and eclipse with lomboz. i tried to add the following quer
y 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 filenam
e)"


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'; - ne
sted 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!



Report this thread to moderator Post Follow-up to this message
Old Post
Bonkers
03-20-04 01:46 AM


Re: EJB-QL - Problem with LIKE Statement
Bonkers wrote:
> * @ejb.finder
>  *    query="SELECT OBJECT(a) FROM minfo a where a.filename LIKE ?1"
>  *    signature="java.util.Collection findByFilename(java.lang.String file
name)"
> 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

Report this thread to moderator Post Follow-up to this message
Old Post
Marek Lange
03-20-04 01:46 AM


Re: EJB-QL - Problem with LIKE Statement
thank U
is there no way to use ejb-ql with the same result?


Report this thread to moderator Post Follow-up to this message
Old Post
Bonkers
03-20-04 01:46 AM


Re: EJB-QL - Problem with LIKE Statement
Bonkers wrote:

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

No.

-marek

Report this thread to moderator Post Follow-up to this message
Old Post
Marek Lange
03-20-04 01:46 AM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 11:37 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.