Bugs item #597656, was opened at 2002-08-20 04:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=597656&group_id=22866

Category: JBossCMP
>Group: v3.0 Rabbit Hole
>Status: Closed
>Resolution: Invalid
Priority: 5
Submitted By: vishal mehta (attachvishal1)
Assigned to: Dain Sundstrom (dsundstrom)
Summary: dynamic-ql

Initial Comment:
I tried tried to implement ejbHomeSelectInStates method 
given with the jBoss 3.0 documentation but jboss is throwing 
ejbql.ParseException exception.I have defined 
ejbSelectGeneric both in ejb-jar.xml(making empty ejb-ql entry) 
and jbosscmp-jdbc.xml(defining method as <dynamic-ql/>) and 
abstract method inside bean taking string and array of object as 
parameters.
Inside the bean i passed array of Long object 
and the dynamic sql.
Thats what Jboss throws the moment it 
starts parsing the sql passed as string to ejbSelectGeneric 
method

09:37:22,484 DEBUG [ejbSelectGeneric] 
DYNAMIC-QL: SELECT OBJECT(o) FROM 
cnConstantSchema AS o WHERE o.cnConstant IN(?1 , ?2 , ?3 
, ?4 , ?5)
09:37:24,078 ERROR [STDERR] 
javax.ejb.FinderException: Error compiling ejbql: 
org.jboss.ejb.plugins.cmp.ejbql.ParseException: 
Encountered "o.cnConstant" at line 1, column 53.
Was 
expecting one of:
    "NOT" ...
    
<STRING_VALUED_PATH> ...
    
<COLLECTION_VALUED_PATH> ...
    "(" ...
    
"CONCAT" ...
    "SUBSTRING" ...
    "UCASE" ...
    
"LCASE" ...
    <BOOLEAN_VALUED_PATH> ...
    
<DATETIME_VALUED_PATH> ...
    
<VALUE_CLASS_VALUED_PATH> ...
    
<ENTITY_VALUED_PATH> ...
    
<IDENTIFICATION_VARIABLE> ...
    
<NUMERIC_VALUED_PATH> ...

09:37:24,265 
ERROR [STDERR]     at 
org.jboss.ejb.plugins.cmp.jdbc.JDBCDynamicQLQuery.execute(JDBCDynamicQLQuery.java:82)
09:37:24,296 
ERROR [STDERR]     at 
org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:64)
09:37:24,312 
ERROR [STDERR]     at 
org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:95)
09:37:24,312 
ERROR [STDERR]     at 
org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:59)
thats 
what i declared in ejb-jar.xml
ejb-jar.xml
<entity>
<ejb-
name>uk.co.isesolutions.apps.ccd.cnconstant.entity.CnConstant</ejb-
name>
<local-home>.......................
<abstract-schema-
name>cnConstantSchema</abstract-schema-
name>
<cmp-field><field-name>cnConstant</field-
name></cmp-field>
<cmp-field><field-
name>activeFlg</field-name></cmp-field>
<cmp-
field><field-name>usedFlg</field-name></cmp-
field>
<cmp-field><field-name>cnConstant_Link</field-
name></cmp-field>
<query>
<query-
method>
<method-name>ejbSelectGeneric</method-
name>
<method-params>
<method-
param>java.lang.String</method-param>
<method-
param>java.lang.Object[]</method-param>
</method-
params>
</query-method>
<ejb-
ql/>
</query>
</entity>

and thats what in 
jbosscmp-jdbc.xml
<entity>
<ejb-
name>uk.co.isesolutions.apps.ccd.cnconstant.entity.CnConstant</ejb-
name>
<table-name>CNCONSTANT</table-
name>
<read-only>true</read-only>
<cmp-
field>
<field-name>cnConstant</field-name>
<column-
name>CNCONSTANT</column-name>
<sql-
type>NUMBER(12)</sql-type>
</cmp-field>
<cmp-
field>
.................



----------------------------------------------------------------------

>Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-09-03 11:20

Message:
Logged In: YES 
user_id=251431

I assume you have fixed your problem as you did not respond
to my question.  

In the newest version of JBoss I added support for other
data types in in clauses.  See change note [ 599955 ]
JBossQL Enhancements for more information.

----------------------------------------------------------------------

Comment By: Dain Sundstrom (dsundstrom)
Date: 2002-08-23 19:27

Message:
Logged In: YES 
user_id=251431

What is the tyoe of o.cnConstant?  

The IN clause only supports Strings, so Longs won't work. 
You could construct a where clause that uses  =s and ORs.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=597656&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by: OSDN - Tired of that same old
cell phone?  Get a new here for FREE!
https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to