Thank you Alexey,
I tried it. But it doesn't work as dynamic-ql.
I put following query in the <ejb-ql>.
----query---
SELECT count(distinct ur.monitorID) FROM UserResponse As
ur where ur.responseData = 'n'
------------
This query return '2' in
SQLServer2000Consol(EnterpriseManager).
And I use query as dynamic-ql in the Bean.
----query---
SELECT count(distinct ur.monitorID) FROM UserResponse As
ur where ur.responseData = '0123'
------------
This query return '1' in
SQLServer2000Consol(EnterpriseManager).
There is no consol error msgs, When it deploied to JBOSS.
But, it returned '2'.
So it doesn't work as dynamic-ql.
The query in the <ejb-ql> is active,
The dynamic-ql in the bean is not active.
(If it work as dynamic-ql, it return '1'.)
please help me..
---jbosscmp-jdbc.xml---
<query>
<query-method>
<method-name>ejbSelectScreeningAbleNumFromUserResponseNum</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.Object[]</method-param>
</method-params>
</query-method>
<dynamic-ql/>
</query>
------------
---ejb-jar.xml---
<query>
<description><![CDATA[]]></description>
<query-method>
<method-name>ejbSelectScreeningAbleNumFromUserResponseNum</method-name>
<method-params>
<method-param>java.lang.String</method-param>
<method-param>java.lang.Object[]</method-param>
</method-params>
</query-method>
<ejb-ql><![CDATA[SELECT count(distinct ur.monitorID) FROM
UserResponse As ur where ur.responseData = 'n']]></ejb-ql>
</query>
------------
---Bean-----
public abstract int
ejbSelectScreeningAbleNumFromUserResponseNum(String
jbossQL, java.lang.Object[] arguments) throws
FinderException;
public int ejbHomeGetScreeningAbleNumFromUserResponseNum()
throws FinderException
{
StringBuffer jbossQL = new StringBuffer();
jbossQL.append("SELECT count(distinct ur.monitorID) FROM
UserResponse As ur where ur.responseData = '0123'");
java.lang.Object[] args = null;
return
ejbSelectScreeningAbleNumFromUserResponseNum(jbossQL.toString(),
args);
}
------------
> -----Original Message-----
> Looks like for some reason it doesn't think that it
> is dynamic. It does
> work for me with DR4. If you put some query in the
> <ejb-ql> will it work
> as dynamic?
>
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On
> Behalf Of ?? ?
> > Sent: Sunday, May 09, 2004 12:22 PM
> > To: [EMAIL PROTECTED]
> > Subject: [JBoss-user] error compiling ejbql
> (dynamicQL):
> > EJB-QL statement '';
> >
> > Hi all
> > I'm trying to use JBoss Dynamic-QL
> >
> > But When I submit the following Dynamic-QL, I get
> the
> > following consol error msgs.
> >
> > ---ConsolErrorMessages---
> > ERROR [EntityContainer] Starting failed
> > org.jboss.deployment.DeploymentException: Error
> compiling
> > EJB-QL statement ''; - nested throwable:
> > (org.jboss.ejb.plugins.cmp.ejbql.ParseException:
> FROM not
> > found)
> > ------------------------
> >
> > in jbosscmp-jdbc.xml tell JBoss that this method
> is dynamic.
> > So, <ejb-ql>value is empty in the ejb-jar.xml.
> >
> > reference is 117/207Page of ejbwJboss.eBook.pdf
>
http://www.univ-orleans.fr/SCIENCES/INFO/RESSOURCES/modules/si
> > r/ejbwJboss.eBook.pdf
> >
> > jboss-4.0.0DR3
> > Does anyone recognize what the problem could be
> here?
> > Any help is appreciated.
> > masaru
-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to
deliver higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user