aspose file tools*
The moose likes JBoss/WildFly and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark ""declared-sql" query problem in jbosscmp-jdbc.xml..." Watch ""declared-sql" query problem in jbosscmp-jdbc.xml..." New topic
Author

"declared-sql" query problem in jbosscmp-jdbc.xml...

Pras Tiwari
Ranch Hand

Joined: Nov 07, 2005
Posts: 186
Hi,
I got stuck with My application based on EJB2.1 using CMP2.0 spec. due to following "declared-sql" in my jboss-cmp:-
-------------------
<query>
<description/>
<query-method>
<method-name>ejbSelectbean</method-name>
<method-params>
</method-params>
</query-method>

<declared-sql>
<select>
<ejb-name><![CDATA[OrderMaster]]></ejb-name>
<field-name><![CDATA[orderno]]></field-name>
<additional-columns><![CDATA[COUNT(orderno)]]>
</additional-columns>
</select>
<where><![CDATA[orderid like '%%' GROUP BY orderno]]> </where>
</declared-sql>
</query>
---------------------
now I am able to deploy it successfully to JBOSS4.0.3 server. But when I am accessing this query in my application, I am getting fllowing error.
-------------------------
12:44:06,015 INFO [STDOUT] javax.ejb.FinderException: Find failed: java.sql.SQLException: ERROR: function ordernocount(character varying) does not exist
12:44:06,015 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:245)
12:44:06,015 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractQueryCommand.execute(JDBCAbstractQueryCommand.java:128)
12:44:06,015 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.execute(JDBCSelectorBridge.java:99)
12:44:06,015 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCSelectorBridge.invoke(JDBCSelectorBridge.java:70)
12:44:06,015 INFO [STDOUT] at org.jboss.ejb.plugins.cmp.bridge.EntityBridgeInvocationHandler.invoke(EntityBridgeInvocationHandler.java:91)
12:44:06,140 INFO [STDOUT] at org.jboss.proxy.compiler.Runtime.invoke(Runtime.java:62)
----------------------------

PLease help me.
Whay I am getting this error?
Thank you.
Pras


********Deserve Before You Desire********
 
 
subject: "declared-sql" query problem in jbosscmp-jdbc.xml...