PLEASE HELP ME TO RESOLVE THIS SUBQUERY ISSUE
My subquery is giving problem, I tried on both JBoss 4.0.3SP1 & JBoss 4.0.4RC1.
I am using java version "1.5.0_06".
In jbosscmp-jdbc.xml
--------------------------
<cmp-field><field-name>creationDate</field-name><column-name>CREATION_DATE</column-name></cmp-field>
anonymous wrote : ==> In Oracle db CREATION_DATE field type is DATE
In ejb-jar.xml
-----------------
<query-method>
<method-name>findByBarIdAndProcessName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[
SELECT OBJECT(B)
FROM BTS_WAF_SLICE_REJECTS B
WHERE B.process = ?1 AND B.barId = ?2 AND B.creationDate = (SELECT
MAX(A.creationDate) FROM BTS_WAF_SLICE_REJECTS A WHERE A.process = ?1 AND
A.barId = ?2)
]]>
</ejb-ql>
I am getting exception in the console:-
14:01:12,187 ERROR [STDERR] org.jboss.ejb.plugins.cmp.ejbql.ParseException:
Encountered "(" at line 3, column 72.
Was expecting one of:
<DATETIME_VALUED_PARAMETER> ...
<DATETIME_VALUED_PATH> ...
.
.
14:01:12,750 WARN [ServiceController] Problem starting service
jboss.j2ee:jndiName=bts/ejb/BtsWafSliceRejectHistoryHome,service=EJB
org.jboss.deployment.DeploymentException: Error compiling EJB-QL statement
'SELECT OBJECT(B)
FROM BTS_WAF_SLICE_REJECTS_HISTORY B
WHERE B.process = ?1 AND B.barId = ?2 AND B.creationDate = (SELECT
MAX(A.creationDate) FROM BTS_WAF_SLICE_REJECTS_HISTORY A WHERE A.process = ?1
AND A.barId = ?2)'; - nested throwable:
(org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "(" at line 3,
column 72.
Was expecting one of:
<DATETIME_VALUED_PARAMETER> ...
<DATETIME_VALUED_PATH> ...
)
.
.
.
14:01:15,031 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
--- MBeans waiting for other MBeans ---
ObjectName: jboss.j2ee:jndiName=bts/ejb/BtsWafSliceRejectHistoryHome,service=EJB
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error compiling EJB-QL
statement 'SELECT OBJECT(B)
FROM BTS_WAF_SLICE_REJECTS_HISTORY B
WHERE B.process = ?1 AND B.barId = ?2 AND B.creationDate = (SELECT
MAX(A.creationDate) FROM BTS_WAF_SLICE_REJECTS_HISTORY A WHERE A.process = ?1
AND A.barId = ?2)'; - nested throwable:
(org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "(" at line 3,
column 72.
Was expecting one of:
<DATETIME_VALUED_PARAMETER> ...
<DATETIME_VALUED_PATH> ...
)
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: jboss.j2ee:jndiName=bts/ejb/BtsWafSliceRejectHistoryHome,service=EJB
State: FAILED
Reason: org.jboss.deployment.DeploymentException: Error compiling EJB-QL
statement 'SELECT OBJECT(B)
FROM BTS_WAF_SLICE_REJECTS_HISTORY B
WHERE B.process = ?1 AND B.barId = ?2 AND B.creationDate = (SELECT
MAX(A.creationDate) FROM BTS_WAF_SLICE_REJECTS_HISTORY A WHERE A.process = ?1
AND A.barId = ?2)'; - nested throwable:
(org.jboss.ejb.plugins.cmp.ejbql.ParseException: Encountered "(" at line 3,
column 72.
Was expecting one of:
<DATETIME_VALUED_PARAMETER> ...
<DATETIME_VALUED_PATH> ...
)
.
.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3932426#3932426
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3932426
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user