JDO75202: Syntax error unexpected token 'LIKE' URGENT PLEASE

Hi!

I am trying to deploy a cmp-bean that has the following select method defined in its ejb-jar.xml file as...

<ejb-ql> SELECT OBJECT(v) FROM TVia AS v, IN (v.tViaSt) AS st WHERE (st.dataInizio < ?4 OR st.dataInizio = ?4) AND (st.dataFine = ?4 OR st.dataFine > ?4 OR st.dataFine IS NULL) AND st.descrizione LIKE CONCAT(?1,'%') AND st.tTipoVia = ?2 AND v.tComune = ?3 ></ejb-ql>

when I try to deploy it I get the following error. Can someone help me here?

Sun application server 8.2 used

JDO75006: Invalid EJBQL query Bean: TVia Method: java.util.Collection findByDescrizioneAndTipoViaAndComuneAsRadiceSt(java.lang.String,it.deltadator.k ernel.ejb.ent.TTipoViaLocal,it.deltadator.kernel.ejb.ent.TComuneLocal,java.sql.D ate) EJBQL: SELECT OBJECT(v) FROM TVia AS v, IN (v.tViaSt) AS st WHERE (st.dataInizio < ?4 OR st.dataInizio = ?4) AND (st.dataFine = ?4 OR st.dataFine > ?4 OR st.dataFine IS NULL) AND st.descrizione LIKE CONCAT(?1,'%') AND st.tTipoVia = ?2 AND v.tComune = ?3 Error: column(188): JDO75202: Syntax error unexpected token 'LIKE'

Message was edited by:

__Taha__

Message was edited by:

__Taha__

[1204 byte] By [__Taha__] at [2007-11-26 8:35:07]
# 1
Seems like a limitation of EJB QL when it comes to LIKE expression. Have a lokk at the following thread for possible workarounds: http://forum.java.sun.com/thread.jspa?threadID=199459&messageID=1890804
Sultal at 2007-7-6 22:03:40 > top of Java-index,Application & Integration Servers,Application Servers...
# 2
Yes I had seen this topic and I am doing the same thing. With jboss 3.2.6 it works but while trying to test the portability of the application with sun application server it did not work.Any suggestions ?'?Thanks
__Taha__ at 2007-7-6 22:03:40 > top of Java-index,Application & Integration Servers,Application Servers...