RE: [JBoss-user] ejb-ql problem

2004-01-27 Thread Boulatian, Misak

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.(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.
<>

RE: [JBoss-user] ejb-ql problem

2004-01-27 Thread Alexey Loubyansky
Not yet. The spec does not allow to select more than one field. 

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Tuesday, January 27, 2004 5:31 PM
> 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.(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
> 
> 


---
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


[JBoss-user] ejb-ql problem

2004-01-27 Thread hernan . terzian
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.(JDBCEJBQLQuery.java:46)
at
org.jboss.ejb.plugins.cmp.jdbc.JDBCCommandFactory.createEJBQLQuery(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


Re: [JBoss-user] EJB-QL problem

2002-08-28 Thread Dain Sundstrom

I don't believe that JBoss parses the EJB-QL if JBossQL is present, but 
I would not recommend putting invalid EJB-QL in the compliant 
ejb-jar.xml file.  You should just leave the ejb-ql element empty, which 
will signify to the application deployer that this query requires 
non-complient ejb-ql (and will need to port it).

In my experience, developers just want to know what they are up against 
when porting an application.

BTW how would your application be portable if you are using 
non-complient EJB-QL?

-dain

Patrick Golec wrote:
> JBoss complains about the following finder EJB-QL query:
>  
> SELECT DISTINCT OBJECT(o) FROM Customer o WHERE o.searchName LIKE ?1
>  
> I understand that JBoss doesn't accept the parameters in the LIKE 
> operator, so I have overridden it with the JBossQL (same query), which 
> is cool.
>  
> However, I want to maintain the portability of the application, so I 
> would like to have both: EJB-QL in the ejb-jar.xml and JBossQL in the 
> jbosscmp-jdbc.xml.
>  
> My question is: is there any way to turn off EJB-QL query parsing when 
> JBossQL query is present? So that the app deploys with the EJB-QL 
> unmodified?
>  
> Thanks!
> 
> ---
>  
> Patrick Golec
> Software Architect
> Arachne Prime Inc.
>  



---
This sf.net email is sponsored by: Jabber - The world's fastest growing 
real-time communications platform! Don't just IM. Build it in! 
http://www.jabber.com/osdn/xim
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user



[JBoss-user] EJB-QL problem

2002-08-28 Thread Patrick Golec



JBoss complains about the following finder 
EJB-QL query:
 
SELECT DISTINCT OBJECT(o) FROM Customer o 
WHERE o.searchName LIKE ?1
 
I understand that JBoss doesn't accept the 
parameters in the LIKE operator, so I have overridden it with the JBossQL (same 
query), which is cool. 
 
However, I want to maintain the portability 
of the application, so I would like to have both: EJB-QL in the ejb-jar.xml and 
JBossQL in the jbosscmp-jdbc.xml.
 
My question is: is there any way to turn 
off EJB-QL query parsing when JBossQL query is present? So that the app deploys 
with the EJB-QL unmodified?
 
Thanks!
---
 
Patrick GolecSoftware ArchitectArachne Prime Inc.
 
 


[JBoss-user] EJB QL Problem

2002-01-16 Thread Christofer Sandberg

When deploying an app with the following query Jboss
throws an java.lang.NullPointerException at 
org.jboss.ejb.plugins.cmp.jdbc.SQLUtil.getJoinClause(SQLUtil.java:311)

SELECT OBJECT(p) FROM productcategory AS c, IN (c.products) AS p 
WHERE p.id = ?1

The relation is many to many.

The nullpointer exception is being thrown somewhere around where JBoss 
returns the lists of pkFields and fkFields for the where clause in the SQL.

I'm sure i'm doing something stupid and it's probably way past bedtime, but 
has anybody else run into this problem?

Thanks,
Chris

___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user