I don't think you can have more than one variable in the SELECT clause (per
EJB 2.0 spec, section 11.2.8: 'The SELECT clause contains either a single
range variable that ranges over an entity bean abstract schema type or a
single valued path expression. In the case of a finder method, the SELECT
clause is restricted to contain either a single range variable or a single
valued path expression that evaluates to the abstract schema type of the
entity bean for which the finder method is defined.').

I hope this helps,
Misak


> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 27, 2004 9:22 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] ejb-ql problem
> 
> 
> Hi all, I�m trying to do this with ejb-ql but I cannot get it works:
> 
> 'SELECT DISTINCT a.phone_oper, a.oper_description FROM
> Dyt_orc_area_off_cSchema as a'
> 
> when I deploy the bean it drops:
> 
> 12:25:53,522 ERROR [EntityContainer] Starting failed
> org.jboss.deployment.DeploymentException: Error compiling 
> EJB-QL statement
> 'SELECT DISTINCT a.phone_oper, a.oper_description FROM
> Dyt_orc_area_off_cSchema as a'; - nested throwable:
> (org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered 
> "," at line 1,
> column 29.
> Was expecting:
> "FROM" ...
> )
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLQuery.<init>(JDBCEJBQL
> Query.java:46)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQ
> uery(JDBCComma
> ndFactory.java:53)
> 
> If I get only 1 field it works.
> Is there any way to do what I want?
> 
> 
> Regards,
> Hern�n.
> 
> 
> -------------------------------------------------------
> The SF.Net email is sponsored by EclipseCon 2004
> Premiere Conference on Open Tools Development and Integration
> See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
> http://www.eclipsecon.org/osdn
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 

_
This message and any attachments are intended only for the use of the addressee and
may contain information that is privileged and confidential. If the reader of the 
message is not the intended recipient or an authorized representative of the
intended recipient, you are hereby notified that any dissemination of this
communication is strictly prohibited. If you have received this communication in
error, please notify us immediately by e-mail and delete the message and any
attachments from your system.

<<application/ms-tnef>>

Reply via email to