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 / August 2004

Tip: Looking for answers? Try searching our database.

ABSTRACT_SCHEMA problem with ejb-ql

Thread view: 
harshi2003 - 18 Aug 2004 06:42 GMT
hello,

In my application i want to implement a wild card search. for that i
planned to use LIKE key word with ejb-ql. i have used the follwoing query
(as instructed in the forum ) i have overload the ejbql query with
jboss-query.

following shows the queries i defined

* @ejb.finder signature = "java.util.Collection
findByConsigneeStatus(java.lang.String consigneeRef,java.lang.String
orderStatus)"
* query = "SELECT OBJECT(o) FROM Order o WHERE o.consigneeReference LIKE
'?1%' AND o.workflowStatus = ?2"
*
*@jboss.query signature = "java.util.Collection
findByConsigneeStatus(java.lang.String consigneeRef,java.lang.String
orderStatus)"
* query = "SELECT OBJECT(o) FROM Order o WHERE o.consigneeReference LIKE
?1 AND o.workflowStatus = ?2"
*

when i run the xdoclet it doesnot give any errors. but when i deploy the
application i get following error.

"Order" at line 1, column 23.
Was expecting one of:
"IN" ...
<ABSTRACT_SCHEMA> ...
)]

could pls tell me what do i need to do to over com this problem.

is there anyother where i can implement a wild card search

i have checked the table names. there are similar as above. i am using
jboss3.2.3 with mysql as the database.

thanks in advance.
PhilEsch - 22 Aug 2004 14:24 GMT
>hello,
>
[quoted text clipped - 35 lines]
>
>thanks in advance.

First, I the EQL syntax should be "Order AS o" (not "Order o").

Second, I don't believe you want to use the % wildcard, I think that the
processor handles this behind the scenes.

And you may or may not have an issue using a table name "Order", as that is
also a reserved word.

Let us know how you do.

... Phil


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.