Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Pras Tiwari
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic