Amit_Mudgal
asked on
Problem with Cursor in Weblogic
HI We are using weblogic 7 with oracle 9i with JDK 1.4.1
The problem is that when I use cursor in my query and execute it through JDBC (Java) I get following error
at weblogic.db.oci.OciCursor. getCDAExce ption(OciC ursor.java :259)
at weblogic.jdbc.oci.Statemen t.executeQ uery(State ment.java: 907)
at weblogic.jdbc.pool.Prepare dStatement .executeQu ery(Prepar edStatemen t.java:54)
at com.atroad.clientadmin.dao .UserListP ageDAO.get AllUsers(U serListPag eDAO.java: 441)
at com.atroad.clientadmin.bo. UserListPa geBO.getAl lUsers(Use rListPageB O.java:80)
at com.atroad.clientadmin.act ion.UserLi stAction.l oadData(Us erListActi on.java:74 )
at com.atroad.clientadmin.act ion.BasePa geAction.l oad(BasePa geAction.j ava:192)
at com.atroad.clientadmin.act ion.BasePa geAction.d oSearch(Ba sePageActi on.java:13 0)
at sun.reflect.NativeMethodAc cessorImpl .invoke0(N ative Method)
at sun.reflect.NativeMethodAc cessorImpl .invoke(Na tiveMethod AccessorIm pl.java:39 )
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:32 4)
at org.apache.struts.actions. DispatchAc tion.dispa tchMethod( DispatchAc tion.java: 280)
at org.apache.struts.actions. DispatchAc tion.execu te(Dispatc hAction.ja va:216)
at org.apache.struts.action.R equestProc essor.proc essActionP erform(Req uestProces sor.java:4 84)
We are using prepared statements and simply setting some Integers and Strings only. The query is attached as a code snippet. Please let us know why this happens and whats the solution.
The problem is that when I use cursor in my query and execute it through JDBC (Java) I get following error
at weblogic.db.oci.OciCursor.
at weblogic.jdbc.oci.Statemen
at weblogic.jdbc.pool.Prepare
at com.atroad.clientadmin.dao
at com.atroad.clientadmin.bo.
at com.atroad.clientadmin.act
at com.atroad.clientadmin.act
at com.atroad.clientadmin.act
at sun.reflect.NativeMethodAc
at sun.reflect.NativeMethodAc
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at org.apache.struts.actions.
at org.apache.struts.actions.
at org.apache.struts.action.R
We are using prepared statements and simply setting some Integers and Strings only. The query is attached as a code snippet. Please let us know why this happens and whats the solution.
private static final String searchOrgUsersByCapabilitiesQry = "select U.ID AS ID, U.USERNAME AS USERNAME, U.FIRST_NAME AS FIRST_NAME, U.LAST_NAME AS LAST_NAME,"
+ " U.LAST_NAME ||','|| U.FIRST_NAME AS USERS, U.TITLE AS TITLE, U.DEPARTMENT AS DEPARTMENT,"
+ " U.EMAIL_ADDRESS AS EMAIL_ADDRESS, U.CLIENT_ID, "
+ " Cursor(select ounit.ID AS ORG_ID, ounit.NAME AS ORG_NAME, ounit.ID ||'|'|| ounit.NAME AS FMT_ORG"
+ " from Org_user ou,org_unit ounit"
+ " Where U.ID = ou.USER_ID(+)"
+ " AND ounit.ID(+) = ou.ORG_UNIT_ID ) ORG_RS"
+ " from users U "
+ " where U.id in ("
+ " select User_id from RBAC.RBAC_USER_ROLES"
+ " where role_id in (select Role_id from RBAC.RBAC_ROLE_CAPABILITIES"
+ " where capability_id in (select ID from RBAC.RBAC_CAPABILITY RC "
+ " Where NLS_UPPER(Capability_name) LIKEC :searchText)))"
+ " And client_id = :client_id And username not LIKEC :apiuser";
It appears you have a mal-formed query.
ASKER
Hi Mike
Can you please correct me that where I might be wrong? Any help on this will be really great!!
Thanks in Advance!
Can you please correct me that where I might be wrong? Any help on this will be really great!!
Thanks in Advance!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Mike,
Thanks for your comment... I will investigate on this further and will update the thread if the problem is solved or I find something interesting.
Thanks for your help once again!!
Amit
Thanks for your comment... I will investigate on this further and will update the thread if the problem is solved or I find something interesting.
Thanks for your help once again!!
Amit
What is this "Cursor(..." thing ??????:
Open in new window