Board index » jbuilder » Error compiling 'Order By' in EJBQL

Error compiling 'Order By' in EJBQL


2004-02-11 03:49:38 AM
jbuilder10
Hi,
As per EJB 2.1 specs, the ordering clause is 'ORDER BY'. But
when I use that, JBuilder gives me the following error. But if
I join both the words to 'OrderBy' then it works fine. Am I
missing out something here ???
I am using JBuilder Enterprise ver X.
Thanks.
Peter
Error Trace for 'Order By'
--------------------------
EJBQL : "select object(e)
from Enrollments e
order by e.enrollmentId"
"FirstQLEJBModule.jar": [J2EE:160121]Errors encountered while compiling module 'D:\MyProjects\FirstQL\FirstQLEJBModule.jar.jar':
"FirstQLEJBModule.jar": [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
"FirstQLEJBModule.jar":
"FirstQLEJBModule.jar": Query:
"FirstQLEJBModule.jar": EJB Name: Enrollments
"FirstQLEJBModule.jar": Method Name: findAllEnrollments
"FirstQLEJBModule.jar": Parameter Types: ()
"FirstQLEJBModule.jar": select object(e) from Enrollments e =>>order <<= by e.enrollmentId
"FirstQLEJBModule.jar": EJB QL Parser Error.
"FirstQLEJBModule.jar": line 3:12: unexpected token: order
"FirstQLEJBModule.jar": .
 
 

Re:Error compiling 'Order By' in EJBQL

Peter Vennel wrote:
Quote
Hi,

As per EJB 2.1 specs, the ordering clause is 'ORDER BY'. But when I
use that, JBuilder gives me the following error. But if I join both
the words to 'OrderBy' then it works fine. Am I missing out something
here ???

Yup. The error is produced by WebLogic, not JBuilder. And WebLogic
uses "ORDERBY" not "ORDER BY"
e-docs.bea.com/wls/docs81/ejb/EJB-QL.html
You'll need to take up WebLogic's non-standard implementation of EJB 2.x
with BEA.
--
Regards,
Lori Olson (TeamB)
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html
 

Re:Error compiling 'Order By' in EJBQL

Thanks Lori. You are right.
It looks like even though the query is in ejb-jar.xml, when I build the file, the error trace mentions that the query is from 'weblogic-cmp-rdbms-jar.xml'.
Looks like some bug there. I have posted this to weblogic newsgroup. Might get some answers there.
Peter.
"Lori M Olson (TeamB)" wrote:
Quote
Peter Vennel wrote:

>Hi,
>
>As per EJB 2.1 specs, the ordering clause is 'ORDER BY'. But when I
>use that, JBuilder gives me the following error. But if I join both
>the words to 'OrderBy' then it works fine. Am I missing out something
>here ???
>

Yup. The error is produced by WebLogic, not JBuilder. And WebLogic
uses "ORDERBY" not "ORDER BY"

e-docs.bea.com/wls/docs81/ejb/EJB-QL.html

You'll need to take up WebLogic's non-standard implementation of EJB 2.x
with BEA.

--

Regards,

Lori Olson (TeamB)

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
www.google.ca/advanced_group_search
Other Newsgroup Searches:
www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
www.visi.com/~gyles19/fom-serve/cache/1.html

 

{smallsort}

Re:Error compiling 'Order By' in EJBQL

ORDERBY is not standard EJB 2.0 QL. It's a Weblogic specific extension and
needs to be defined in the weblogic descriptor.
"Peter Vennel" < XXXX@XXXXX.COM >wrote in message
Quote

Hi,

As per EJB 2.1 specs, the ordering clause is 'ORDER BY'. But
when I use that, JBuilder gives me the following error. But if
I join both the words to 'OrderBy' then it works fine. Am I
missing out something here ???

I am using JBuilder Enterprise ver X.

Thanks.

Peter


Error Trace for 'Order By'
--------------------------

EJBQL : "select object(e)
from Enrollments e
order by e.enrollmentId"

"FirstQLEJBModule.jar": [J2EE:160121]Errors encountered while compiling
module 'D:\MyProjects\FirstQL\FirstQLEJBModule.jar.jar':
"FirstQLEJBModule.jar": [EJB:011017]Error while reading
'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
"FirstQLEJBModule.jar":
"FirstQLEJBModule.jar": Query:
"FirstQLEJBModule.jar": EJB Name: Enrollments
"FirstQLEJBModule.jar": Method Name: findAllEnrollments
"FirstQLEJBModule.jar": Parameter Types: ()
"FirstQLEJBModule.jar": select object(e) from Enrollments e =>>order
<<= by e.enrollmentId
"FirstQLEJBModule.jar": EJB QL Parser Error.
"FirstQLEJBModule.jar": line 3:12: unexpected token: order
"FirstQLEJBModule.jar": .



 

Re:Error compiling 'Order By' in EJBQL

Ok fine, but I am not using Weblogic Ouery here. I understand that if I use 'order by' clause in <weblogic-ql>of weblogic-cmp-rdbms-jar.xml, then it should build.But I am using plain <ejb-ql>in ejb-jar. If JBuilderX does not support EJB2.1, then should I not get error for 'orderby' clause too while building, since that is not EJB 2.0 specs?
"Lata Amujuri" < XXXX@XXXXX.COM >wrote:
Quote
ORDERBY is not standard EJB 2.0 QL. It's a Weblogic specific extension and
needs to be defined in the weblogic descriptor.
"Peter Vennel" < XXXX@XXXXX.COM >wrote in message
news:402935d2$ XXXX@XXXXX.COM ...
>
>Hi,
>
>As per EJB 2.1 specs, the ordering clause is 'ORDER BY'. But
>when I use that, JBuilder gives me the following error. But if
>I join both the words to 'OrderBy' then it works fine. Am I
>missing out something here ???
>
>I am using JBuilder Enterprise ver X.
>
>Thanks.
>
>Peter
>
>
>Error Trace for 'Order By'
>--------------------------
>
>EJBQL : "select object(e)
>from Enrollments e
>order by e.enrollmentId"
>
>"FirstQLEJBModule.jar": [J2EE:160121]Errors encountered while compiling
module 'D:\MyProjects\FirstQL\FirstQLEJBModule.jar.jar':
>"FirstQLEJBModule.jar": [EJB:011017]Error while reading
'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
>"FirstQLEJBModule.jar":
>"FirstQLEJBModule.jar": Query:
>"FirstQLEJBModule.jar": EJB Name: Enrollments
>"FirstQLEJBModule.jar": Method Name: findAllEnrollments
>"FirstQLEJBModule.jar": Parameter Types: ()
>"FirstQLEJBModule.jar": select object(e) from Enrollments e =>>order
<<= by e.enrollmentId
>"FirstQLEJBModule.jar": EJB QL Parser Error.
>"FirstQLEJBModule.jar": line 3:12: unexpected token: order
>"FirstQLEJBModule.jar": .
>
>
>


 

Re:Error compiling 'Order By' in EJBQL

Peter,
EJB 2.0 does [not] define an "ORDER BY" clause. The EJB 2.1
specification does.
WLS 8.1 is only J2EE 1.3 compliant (EJB 2.0) and uses its own
proprietary extensions to the EJB 2.0 specification's EJB-QL.
e-docs.bea.com/wls/docs81/ejb/EJB-QL.html
In this case, you'd define the EJB-QL as a non-standard one, but
in the standard ejb-jar.xml deployment descriptor.
The errors you see are not those from JBuilder. JBuilder will happily
accept any text you enter in the EJB-QL text area. It is up to the
AppServer vendor to validate the QL at compile/deploy/run time
and generate the SQL equivalent (this is the error you are seeing).
Of course, if you were using Borland Enterprise Server, you could
use the EJB 2.1 standard "ORDER BY" in our J2EE 1.3 compliant
product :)
Vendor lock-in anyone? *grin*
-krish
"Peter Vennel" < XXXX@XXXXX.COM >wrote in message news:402a2e1f$ XXXX@XXXXX.COM ...
Quote

Ok fine, but I am not using Weblogic Ouery here. I understand that if I use 'order by' clause in <weblogic-ql>of
weblogic-cmp-rdbms-jar.xml, then it should build.But I am using plain <ejb-ql>in ejb-jar. If JBuilderX does not support EJB2.1,
then should I not get error for 'orderby' clause too while building, since that is not EJB 2.0 specs?
 

Re:Error compiling 'Order By' in EJBQL

Krish,
Thanks for the enlightment. Now I get the gist of it. ;->
I am using Weblogic, because I have been using it earlier and found it simple to setup. I am fairly new to BES and currently do not want to spend time learnig it, as I am hardpressed for time.
But I will do try that once I am out of this busy schedule.
Meanwhile HATS OFFS to JBuilder Enterprise X. Awesome product. I am switching back to Java IDE after 4 years. Really feel I missed out on all these comforts then. (:->
Peter Vennel.
"Krishnan Subramanian" < XXXX@XXXXX.COM >wrote:
Quote
Peter,

EJB 2.0 does [not] define an "ORDER BY" clause. The EJB 2.1
specification does.

WLS 8.1 is only J2EE 1.3 compliant (EJB 2.0) and uses its own
proprietary extensions to the EJB 2.0 specification's EJB-QL.
e-docs.bea.com/wls/docs81/ejb/EJB-QL.html

In this case, you'd define the EJB-QL as a non-standard one, but
in the standard ejb-jar.xml deployment descriptor.

The errors you see are not those from JBuilder. JBuilder will happily
accept any text you enter in the EJB-QL text area. It is up to the
AppServer vendor to validate the QL at compile/deploy/run time
and generate the SQL equivalent (this is the error you are seeing).

Of course, if you were using Borland Enterprise Server, you could
use the EJB 2.1 standard "ORDER BY" in our J2EE 1.3 compliant
product :)

Vendor lock-in anyone? *grin*

-krish

"Peter Vennel" < XXXX@XXXXX.COM >wrote in message news:402a2e1f$ XXXX@XXXXX.COM ...
>
>Ok fine, but I am not using Weblogic Ouery here. I understand that if I use 'order by' clause in <weblogic-ql>of
weblogic-cmp-rdbms-jar.xml, then it should build.But I am using plain <ejb-ql>in ejb-jar. If JBuilderX does not support EJB2.1,
then should I not get error for 'orderby' clause too while building, since that is not EJB 2.0 specs?