Facing syntax error while calling stored procedure

hi
iam calling a stored procedure which is a sybase USP.my code is as follows
clsm3=CommonLib.cnClient.prepareCall("{call SYB1103.SIFGSYS..USP_Ins_ShipmentInvLines_Tmp "+coid+",'"+invclass+"',"+newsysno+","+productcd+",'"+batchno+"',"+qty+","+productrate+","+assrate+","+expercent+","+examt+","+saleed+","+bonused+",'"+recby+"',"+linestat+","+brno+","+prinvno+","+invno+","+recno+"}");
clsm3.executeUpdate();
where clsm3 is an object of CallableStatement.but it is giving me a syntax error saying
"Invalid JDBC escape syntax at line position 84 '}' character expected"
please reply as soon as possible

clsm3=CommonLib.cnClient.prepareCall("{call
{call SYB1103.SIFGSYS..USP_Ins_ShipmentInvLines_Tmp
"+coid+",'"+invclass+"',"+newsysno+","+productcd+",'"+
batchno+"',"+qty+","+productrate+","+assrate+","+exper
cent+","+examt+","+saleed+","+bonused+",'"+recby+"',"+
linestat+","+brno+","+prinvno+","+invno+","+recno+"}")
;clsm3=CommonLib.cnClient.prepareCall("call <PROCEDURE_NAME>(?,?,?,....)
clsm3.setString(1,coid);
clsm3.setInt(2,invclass);
and so on...
Try the above. The syntax of the call is wrong in your code.

Similar Messages

  • Error while calling stored procedure from Java

    Hi Guys,
    How are you everybody? I hope everything is goin fine on your side. I have one issue in PL/SQL while calling below stored procedures from Java.
    Problem Description: We have a stored procedure PROCEDURE BULK_INSERTS (
    V_SESSION_ID_TAB IN T_SESSION_ID_TAB_TYPE,
    V_SERVICE_TYPE_TAB IN T_SERVICE_TYPE_TAB_TYPE,
    V_SERVICE_LOCATION_TAB IN T_SERVICE_LOCATION_TAB_TYPE,
    V_SERVICE_CALL_NAME_TAB IN T_SERVICE_CALL_NAME_TAB_TYPE,
    V_SERVICE_CALL_START_TIME_TAB IN T_SERVICE_CALL_ST_TAB_TYPE,
    V_SERVICE_CALL_END_TIME_TAB IN T_SERVICE_CALL_ET_TAB_TYPE,
    V_SERVICE_CALL_DURATION_TAB IN T_SERVICE_CALL_DUR_TAB_TYPE,
    V_STATUS_TAB IN T_STATUS_TAB_TYPE,
    V_NOTES_TAB IN T_NOTES_TAB_TYPE
    ) and we are getting ora errors while calling this stored procedure from java.
    All tab types are declared locally, at package level.
    Here is error which occur while calling this sp:
    {call BULK_PKG.BULK_INSERTS(?,?,?,?,?,?,?,?,?)}
    And the parameter types we are using are:
    SESSION_ID - NUM_TAB_TYPE
    SERVICE_TYPE - VAR_TAB_TYPE
    SERVICE_LOCATION - VAR_TAB_TYPE
    SERVICE_CALL_NAME - VAR_TAB_TYPE
    SERVICE_CALL_START_TIME - DATE_TIME_TAB_TYPE
    SERVICE_CALL_END_TIME - DATE_TIME_TAB_TYPE
    SERVICE_CALL_DURATION - NUM_TAB_TYPE
    STATUS - VAR_TAB_TYPE
    NOTES - VAR_TAB_TYPE
    And the Exception stack trace is:
    ERROR (com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServi
    ceCallDAO.java:143)@ExecuteThread: '252' for queue: 'weblogic.kernel.Default') {Error attempting to save collected ESC data}
    java.sql.SQLException: ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'BULK_INSERTS'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:455)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:413)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:1030)
    at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:191)
    at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:944)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1222)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3381)
    at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3482)
    at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:3856)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1373)
    at weblogic.jdbc.wrapper.PreparedStatement.execute(PreparedStatement.java:98)
    at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.doBulkInsert(ExternalServiceCallDAO.java:220)
    at com.att.retail.r2d2.persistence.dao.ExternalServiceCallDAO.saveExternalServiceCallInfo(ExternalServiceCallDAO.java:138)
    Please help my guys out of this. I will really appreciate all suggestions and advices.
    Thank you everybody.

    I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 12
    Here is example for my test procedure:
    declare
    v_session_id_tab SESSION_ID_TAB_TYPE;
    v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
    v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
    v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
    v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
    v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
    v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
    v_status_tab STATUS_TAB_TYPE;
    v_notes_tab NOTES_TAB_TYPE;
    begin
    v_session_id_tab(1) := 1;
    v_service_type_tab(1) := 'db';
    v_service_location_tab(1) := 'local';
    v_service_call_name_tab(1) := 'Name of call';
    v_service_call_start_time_tab(1) := SYSDATE;
    v_service_call_end_time_tab(1) := SYSDATE;
    v_service_call_duration_tab(1) := 100;
    v_status_tab(1) := 'Z';
    v_notes_tab(1) := 'NOTES';
    BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
    v_service_call_duration_tab, v_status_tab, v_notes_tab);
    end;
    I declare all types at schema level.
    Please give your comments.
    Thank you

  • Error while calling stored procedure from apps adapter

    Hi,
    I am calling Oracle applications standard api to create ar invoice (XX_BPEL_TEST_APPS_ADAPTER_PKG is the name of wrapper package created by adapter) from apps adapter but getting the following error:
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'test_apps_adapter' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG.AR_INVOICE_API_PUB$CREATE_SIN API. An error occurred while preparing and executing the APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG.AR_INVOICE_API_PUB$CREATE_SIN API. Cause: java.sql.SQLException: ORA-06531: Reference to uninitialized collection ORA-06512: at "APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG", line 199 ORA-06512: at "APPS.XX_BPEL_TEST_APPS_ADAPTER_PKG", line 909 ORA-06512: at line 1 Check to ensure that the API is defined in the database and that the parameters match the signature of the API. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-6531" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Just wondering if anyone has faced a similar problem?

    I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 12
    Here is example for my test procedure:
    declare
    v_session_id_tab SESSION_ID_TAB_TYPE;
    v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
    v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
    v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
    v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
    v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
    v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
    v_status_tab STATUS_TAB_TYPE;
    v_notes_tab NOTES_TAB_TYPE;
    begin
    v_session_id_tab(1) := 1;
    v_service_type_tab(1) := 'db';
    v_service_location_tab(1) := 'local';
    v_service_call_name_tab(1) := 'Name of call';
    v_service_call_start_time_tab(1) := SYSDATE;
    v_service_call_end_time_tab(1) := SYSDATE;
    v_service_call_duration_tab(1) := 100;
    v_status_tab(1) := 'Z';
    v_notes_tab(1) := 'NOTES';
    BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
    v_service_call_duration_tab, v_status_tab, v_notes_tab);
    end;
    I declare all types at schema level.
    Please give your comments.
    Thank you

  • JCA Error while calling Stored Procedure containing cursors in BPEL/OSB

    Hi,
    I created JCA DBAdapter in Jdeveloper for calling remote stored procedure which contains cursors as OUT parameters.
    I'm getting below exception when i try to call the database via BPEL/OSB.the same remote procedure call is working on Invoking with WLI .
    Kindly sugggest !!!
    The invocation resulted in an error: I*nvoke JCA outbound service failed with connection error, exception: com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceBus/BusinessServices/IsdnSiebelConn [ IsdnSiebelConn_ptt::IsdnSiebelConn(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'IsdnSiebelConn' failed due to: Get object error.*
    Error retrieving the value of a parameter R_NON_CNF_ATTR_CURSOR.
    An error occurred when retrieving the value of parameter R_NON_CNF_ATTR_CURSOR after invoking the SIEBEL.ISDN_OBT_INS_DET.OBTAINASSETDETAILS API. Cause: java.sql.SQLException: Cursor is closed.
    *; nested exception is:*
    BINDING.JCA-11810
    Get object error.
    Error retrieving the value of a parameter R_NON_CNF_ATTR_CURSOR.
    An error occurred when retrieving the value of parameter R_NON_CNF_ATTR_CURSOR after invoking the SIEBEL.ISDN_OBT_INS_DET.OBTAINASSETDETAILS API. Cause: java.sql.SQLException: Cursor is closed.
    Check to ensure that the parameter has been correctly registered as a valid IN/OUT or OUT parameter of the API. This exception is considered retriable, likely due to a communication failure. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers.
    com.bea.wli.sb.transports.jca.JCATransportException: oracle.tip.adapter.sa.api.JCABindingException: oracle.tip.adapter.sa.impl.fw.ext.org.collaxa.thirdparty.apache.wsif.WSIFException: servicebus:/WSDL/ServiceBus/BusinessServices/IsdnSiebelConn [ IsdnSiebelConn_ptt::IsdnSiebelConn(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'IsdnSiebelConn' failed due to: Get object error.
    Error retrieving the value of a parameter R_NON_CNF_ATTR_CURSOR.
    An error occurred when retrieving the value of parameter R_NON_CNF_ATTR_CURSOR after invoking the SIEBEL.ISDN_OBT_INS_DET.OBTAINASSETDETAILS API. Cause: java.sql.SQLException: Cursor is closed.
    ; nested exception is:
    BINDING.JCA-11810
    Get object error.
    Error retrieving the value of a parameter R_NON_CNF_ATTR_CURSOR.
    An error occurred when retrieving the value of parameter R_NON_CNF_ATTR_CURSOR after invoking the SIEBEL.ISDN_OBT_INS_DET.OBTAINASSETDETAILS API. Cause: java.sql.SQLException: Cursor is closed.
    Check to ensure that the parameter has been correctly registered as a valid IN/OUT or OUT parameter of the API. This exception is considered retriable, likely due to a communication failure. To classify it as non-retriable instead add property nonRetriableErrorCodes with value "0" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers.
    at com.bea.wli.sb.transports.jca.binding.JCATransportOutboundOperationBindingServiceImpl.invoke(JCATransportOutboundOperationBindingServiceImpl.java:153)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.sendRequestResponse(JCATransportEndpoint.java:209)
    at com.bea.wli.sb.transports.jca.JCATransportEndpoint.send(JCATransportEndpoint.java:170)
    at com.bea.wli.sb.transports.jca.JCATransportProvider.sendMessageAsync(JCATransportProvider.java:571)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.bea.wli.sb.transports.Util$1.invoke(Util.java:83)
    at $Proxy127.sendMessageAsync(Unknown Source)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageAsync(LoadBalanceFailoverListener.java:148)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToServiceAsync(LoadBalanceFailoverListener.java:603)
    at com.bea.wli.sb.transports.LoadBalanceFailoverListener.sendMessageToService(LoadBalanceFailoverListener.java:538)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageToService(TransportManagerImpl.java:558)
    at com.bea.wli.sb.transports.TransportManagerImpl.sendMessageAsync(TransportManagerImpl.java:426)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send0(ServiceMessageSender.java:377)
    at com.bea.wli.sb.test.service.ServiceMessageSender.access$000(ServiceMessageSender.java:76)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:134)
    at com.bea.wli.sb.test.service.ServiceMessageSender$1.run(ServiceMessageSender.java:132)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
    at com.bea.wli.sb.security.WLSSecurityContextService.runAs(WLSSecurityContextService.java:55)
    at com.bea.wli.sb.test.service.ServiceMessageSender.send(ServiceMessageSender.java:137)
    at com.bea.wli.sb.test.service.ServiceProcessor.invoke(ServiceProcessor.java:454)
    at com.bea.wli.sb.test.TestServiceImpl.invoke(TestServiceImpl.java:172)
    at com.bea.wli.sb.test.client.ejb.TestServiceEJBBean.invoke(TestServiceEJBBean.java:167)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl.invoke(TestService_sqr59p_EOImpl.java:353)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at com.bea.wli.sb.test.client.ejb.TestService_sqr59p_EOImpl_1033_WLStub.invoke(Unknown Source)
    at com.bea.alsb.console.test.TestServiceClient.invoke(TestServiceClient.java:174)
    at com.bea.alsb.console.test.actions.DefaultRequestAction.invoke(DefaultRequestAction.java:117)
    at com.bea.alsb.console.test.actions.DefaultRequestAction.execute(DefaultRequestAction.java:70)
    at com.bea.alsb.console.test.actions.ServiceRequestAction.execute(ServiceRequestAction.java:143)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.access$201(PageFlowRequestProcessor.java:97)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor$ActionRunner.execute(PageFlowRequestProcessor.java:2044)
    at org.apache.beehive.netui.pageflow.interceptor.action.internal.ActionInterceptors.wrapAction(ActionInterceptors.java:91)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processActionPerform(PageFlowRequestProcessor.java:2116)
    at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.processActionPerform(SBConsoleRequestProcessor.java:91)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.processInternal(PageFlowRequestProcessor.java:556)
    at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:853)
    at com.bea.alsb.console.common.base.SBConsoleRequestProcessor.process(SBConsoleRequestProcessor.java:191)
    at org.apache.beehive.netui.pageflow.AutoRegisterActionServlet.process(AutoRegisterActionServlet.java:631)
    at org.apache.beehive.netui.pageflow.PageFlowActionServlet.process(PageFlowActionServlet.java:158)
    at com.bea.console.internal.ConsoleActionServlet.process(ConsoleActionServlet.java:256)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    at com.bea.console.internal.ConsoleActionServlet.doGet(ConsoleActionServlet.java:133)
    at com.bea.alsb.console.common.base.SBConsoleActionServlet.doGet(SBConsoleActionServlet.java:49)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1199)
    at org.apache.beehive.netui.pageflow.PageFlowUtils.strutsLookup(PageFlowUtils.java:1129)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.executeAction(ScopedContentCommonSupport.java:687)
    at com.bea.portlet.adapter.scopedcontent.ScopedContentCommonSupport.processActionInternal(ScopedContentCommonSupport.java:142)
    at com.bea.portlet.adapter.scopedcontent.StrutsStubImpl.processAction(StrutsStubImpl.java:76)
    at com.bea.portlet.adapter.NetuiActionHandler.raiseScopedAction(NetuiActionHandler.java:111)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:181)
    at com.bea.netuix.servlets.controls.content.NetuiContent.raiseScopedAction(NetuiContent.java:167)
    at com.bea.netuix.servlets.controls.content.NetuiContent.handlePostbackData(NetuiContent.java:225)
    at com.bea.netuix.nf.ControlLifecycle$2.visit(ControlLifecycle.java:180)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:324)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walkRecursive(ControlTreeWalker.java:334)
    at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:130)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
    at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:352)
    at com.bea.netuix.nf.Lifecycle.runInbound(Lifecycle.java:184)
    at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:159)
    at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
    at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
    at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:199)
    at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3684)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    You need to open all the cursors in the PLSQL ie., cursors should be initialized in your PLSQL package. JCA DB Adapter tries to open the cursor without checking whether its there or not..If you cant change the PLSQL package, raise a SR with Oracle for a patch.This would be considered as Enhancement Request.
    Regards
    Sesha

  • Error While calling stored procedure with array

    I am getting following error
    java.sql.SQLException: Fail to construct descriptor: Invalid arguments
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
    at oracle.sql.StructDescriptor.createDescriptor(StructDescriptor.java:85)
    at oracle.sql.STRUCT.toSTRUCT(STRUCT.java:322)
    at oracle.jdbc.oracore.OracleTypeADT.toDatum(OracleTypeADT.java:253)
    at oracle.jdbc.oracore.OracleTypeADT.toDatumArray(OracleTypeADT.java:296)
    at oracle.jdbc.oracore.OracleTypeUPT.toDatumArray(OracleTypeUPT.java:137)
    at oracle.sql.ArrayDescriptor.toOracleArray(ArrayDescriptor.java:750)
    while executing following code
    com.brocade.wwn.params.AuthParams ap = new com.brocade.wwn.params.AuthParams();
    ap.setAuthKey("1");
    ap.setAuthValue("1.1");
    com.brocade.wwn.params.AuthParams ap1 = new com.brocade.wwn.params.AuthParams();
    ap.setAuthKey("11");
    ap.setAuthValue("1.11");
    //com.brocade.wwn.params.AuthParams[] arrAP = new com.brocade.wwn.params.AuthParams[1];
    //Object[] arrAP = new Object[1];
    //arrAP[0] = ap;
    com.brocade.wwn.params.AuthParams[] arrAP = {ap,ap1};
    System.out.println(" >>> Creating Array Descriptor .... ");
    oracle.sql.ArrayDescriptor arraydesc =
    oracle.sql.ArrayDescriptor.createDescriptor("WWP.AUTH_ENTRIES", conn);
    System.out.println (" ----> " + arraydesc.getBaseName());
    System.out.println (" ----> " + arraydesc.getName());
    System.out.println (" ----> " + arraydesc.getSQLName());
    System.out.println (" ----> " + arraydesc.getSchemaName());
    System.out.println (" ----> " + arraydesc.getTypeName());
    System.out.println (" ----> " + arraydesc.getMaxLength());
    System.out.println (" ----> " + arraydesc.getArrayType());
    System.out.println ( arraydesc.TYPE_VARRAY + " : " + arraydesc.TYPE_NESTED_TABLE );
    // Object[] tObj = arraydesc.toArray(arrAP);
    //tObj = new String[2];
    //tObj[0] = "sdaf";
    //tObj[1] = "sdaf1";
    // tObj[0] = ap;
    System.out.println(" >>> Array Descriptor Created .... ");
    oracle.sql.ARRAY array = new oracle.sql.ARRAY(arraydesc, conn, arrAP);
    My database is Oracle 8i and I am using oracle 9i thin drivers.
    Can anybody help me on this ....
    thanks

    I am trying to pass parameter to test my procedure but it is giving this error : ORA-06531: Reference to uninitialized collection
    ORA-06512: at line 12
    Here is example for my test procedure:
    declare
    v_session_id_tab SESSION_ID_TAB_TYPE;
    v_service_type_tab SERVICE_TYPE_TAB_TYPE ;
    v_service_location_tab SERVICE_LOCATION_TAB_TYPE ;
    v_service_call_name_tab SERVICE_CALL_NAME_TAB_TYPE;
    v_service_call_start_time_tab SERVICE_CALL_ST_TAB_TYPE;
    v_service_call_end_time_tab SERVICE_CALL_ET_TAB_TYPE;
    v_service_call_duration_tab SERVICE_CALL_DUR_TAB_TYPE;
    v_status_tab STATUS_TAB_TYPE;
    v_notes_tab NOTES_TAB_TYPE;
    begin
    v_session_id_tab(1) := 1;
    v_service_type_tab(1) := 'db';
    v_service_location_tab(1) := 'local';
    v_service_call_name_tab(1) := 'Name of call';
    v_service_call_start_time_tab(1) := SYSDATE;
    v_service_call_end_time_tab(1) := SYSDATE;
    v_service_call_duration_tab(1) := 100;
    v_status_tab(1) := 'Z';
    v_notes_tab(1) := 'NOTES';
    BULK_INSERTS (v_session_id_tab,v_service_type_tab, v_service_location_tab,v_service_call_name_tab,v_service_call_start_time_tab,v_service_call_end_time_tab,
    v_service_call_duration_tab, v_status_tab, v_notes_tab);
    end;
    I declare all types at schema level.
    Please give your comments.
    Thank you

  • Error while fetching Stored procedure from JDev DB Adapter

    Hello
    I am facing a problem while configuring stored procedures from Jdeveloper using DB Adapter. I am using Sql Server 2005 as my database,Jdeveloper version is 10.1.3.1.Bpel Version is 10.1.3.3. Connection to the Sqlserver 2005 database is fine, but it shows only views and tables. I get the following error message when I try to add the sql stored procedure call
    "An error occured while obtaining the database schemas.Verify that the database connection is valid , and is supported"
    Can someone help me please.
    Thanks,
    Phani
    Edited by: Phani on Oct 28, 2008 11:30 AM

    I think you have two problems here. First, JDeveloper 10.1.3.1 doesn't support SQL Server stored procedures. There is a command-line utility that you can use to generate the required BPEL artifacts (WSDL and XSD). Second, you're using a 10.1.3.1 design-time with a 10.1.3.3 runtime. These are not compatible so you will likely run into namespace issues when you try to run your BPEL processes. You should upgrade your JDeveloper to 10.1.3.3. JDeveloper will support third-party databases in 11.1.1 including SQL Server 2005 (but not 2000), IBM DB2 v8.x and v9.x, DB2 AS/400, and MySQL. JDeveloper will support MySQL v5.2.6 and above because the INFORMATION_SCHEMA.PARAMETERS table was added at that time. The PARAMETERS table does not exist in MySQL versions prior to v5.2.6 so you will have to use the command-line utility.

  • Conversion of java Array to oracle SQL Array while calling Stored Procedure

    How java Array can be converted to oracle SQL array while calling Stored procedure with callable statement.
    i.e java Array ---> Sql Array in Oracle while setting the datatypes to callable statement arguments.

    Look at:
    http://forum.java.sun.com/thread.jsp?forum=48&thread=376735&tstart=0&trange=15
    Paul

  • ORA-17002 and ORA-17009 while calling Stored Procedures

    Hi,
    We are developing a JDBC application using WebLogic 6.0 as AppServer. When we
    rolled out the application in production, things work fine for about a day or
    so, then calls to Stored Procedures start giving ORA-17002 (io exception) and
    ORA-17009 (Closed Statement) exceptions while calling Stored Procedures. Restarting
    the server 'fixes' the problem for one more day.... We are not able to reproduce
    this behaviour in test or development servers.
    Can anybody suggest something.....
    Regards,
    Usman.

    Usman wrote:
    >
    Hi,
    We are developing a JDBC application using WebLogic 6.0 as AppServer. When we
    rolled out the application in production, things work fine for about a day or
    so, then calls to Stored Procedures start giving ORA-17002 (io exception) and
    ORA-17009 (Closed Statement) exceptions while calling Stored Procedures. Restarting
    the server 'fixes' the problem for one more day.... We are not able to reproduce
    this behaviour in test or development servers.
    Can anybody suggest something.....
    Regards,
    Usman.Hi. Describe how you are obtaining and using pool connections. Also, do download the
    latest thin driver from Oracle, because they have recently fixed some serious
    bugs in it.
    Let me know,
    Joe

  • Error ORABPEL-11802 while calling Stored Procedure

    Hi,
    I am trying to call a stored proc in oracle through DB adapter in BPEL services.
    The procedure accepts custom data types only. I am able to assign values to each element in the custom data type but while executing the same it is throwing the error:
    ORABPEL-11802
    Unable to convert the XSD element db:THENUMBERRANGE whose user defined type is NUMBERRANGE. Cause: java.sql.SQLException: invalid name pattern: XYZ.NUMBERRANGE [Caused by: invalid name pattern: XYZ.NUMBERRANGE]
    The Stored Procedure code is as follows:
    --PROCEDURE setNumberStatus (
    --theNumberRange IN NumberRange,
    --theNumberStatus IN numberstatus,
    --userID IN userid,
    --returnStatus OUT CallStatus );
    --TYPE NumberRange is OBJECT (
    --StartNumber Varchar2(40),
    --EndNumber Varchar2(40),
    Please suggest me how to input data for object NumberRange.
    Any help on this is highly appreciated.
    Thanks,

    Hi,
    I have the same issue, but in my case I hae done all the accesses still i was getting the error, However finally what I figured out is that the JNDI name was wrong, so unable to make a databse connection at runtime. So Basically it was unable to find the object .... and causing the same error. Hope this tip also may be helpful for some body.
    --Khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Error while calling Strored procedure in HR Module

    Hi,
    I have a composite which picks up a file and use that data to call API's in HR module and do some database lookups. I have done development in one instance and done with testing. So, in the same SOA instance, we want to test the composite against a different oracle database instance. So connection factories for oracle apps and database adpater have been created. I wrote the config plan, replaced the JNDi names for both the adapters and deployed the composite to the same SOA instance. I am getting this error at runtime...
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'CreateUSEmp' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the APPS.XX_BPEL_CREATEUSEMP.HR_EMPLOYEE_API$CREATE_US_EMP API. An error occurred while preparing and executing the APPS.XX_BPEL_CREATEUSEMP.HR_EMPLOYEE_API$CREATE_US_EMP API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'APPS.XX_BPEL_CREATEUSEMP' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Check to ensure that the API is defined in the database and that the parameters match the signature of the API. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-6550" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Actually, in the next instance, the API is there and also it has the same signature in both the database instances, the user credentials used in creating the datasource has access to the package in the oracle database instance... Can somebody please help me with the solution, what is causing the error here...
    Thanks in Advance,
    Naresh

    it looks like not all objects are created for XX_BPEL_CREATEUSEMP
    synonyms and all grants are there ?

  • Error while calling Strored procedure in HR Module from BPEL

    Hi,
    I have a composite which picks up a file and use that data to call API's in HR module and do some database lookups. I have done development in one instance and done with testing. So, in the same SOA instance, we want to test the composite against a different oracle database instance. So connection factories for oracle apps and database adpater have been created. I wrote the config plan, replaced the JNDi names for both the adapters and deployed the composite to the same SOA instance. I am getting this error at runtime...
    Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'CreateUSEmp' failed due to: Stored procedure invocation error. Error while trying to prepare and execute the APPS.XX_BPEL_CREATEUSEMP.HR_EMPLOYEE_API$CREATE_US_EMP API. An error occurred while preparing and executing the APPS.XX_BPEL_CREATEUSEMP.HR_EMPLOYEE_API$CREATE_US_EMP API. Cause: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'APPS.XX_BPEL_CREATEUSEMP' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Check to ensure that the API is defined in the database and that the parameters match the signature of the API. This exception is considered not retriable, likely due to a modelling mistake. To classify it as retriable instead add property nonRetriableErrorCodes with value "-6550" to your deployment descriptor (i.e. weblogic-ra.xml). To auto retry a retriable fault set these composite.xml properties for this invoke: jca.retry.interval, jca.retry.count, and jca.retry.backoff. All properties are integers. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
    Actually, in the next instance, the API is there and also it has the same signature in both the database instances, the user credentials used in creating the datasource has access to the package in the oracle database instance... Can somebody please help me with the solution, what is causing the error here...
    Thanks in Advance,
    Naresh

    Cause: java.sql.SQLException: ORA-06550: line 1, column 7: PLS-00201: identifier 'APPS.XX_BPEL_CREATEUSEMP' must be declared ORA-06550: line 1, column 7: PL/SQL: Statement ignored Check to ensure that the API is defined in the database and that the parameters match the signature of the API.This has nothing to do with the connection pool you have created (as the BPEL process connects to the new database), and most likely it is something to do with the API/Package you are using. Please double check the code of the package (make sure it is valid and it is identical to the one you have in the other instance).
    Thanks,
    Hussein

  • Error while invoking stored procedure from BPEL process

    Hi Folks,
    I am facing the below mentioned issue while invoking a stored procedure in BPEL process :
    I am trying to invoke a stored procedure from a BPEL process. The process runs fine for the first/second time, but gives the below error after that whenever i try to run the process :
    file:/oracle/orasoa/bpel/domains/default/tmp/.bpel_ProvisionOrderASAPReqABCSImpl_1.0_50dd1595129e9bbb00560e31e7c18cef.tmp/DB_CALL_GetPendingSubscriptionProc.wsdl [ DB_CALL_GetPendingSubscriptionProc_ptt::DB_CALL_GetPendingSubscriptionProc(InputParameters,OutputParameters) ] - WSIF JCA Execute of operation 'DB_CALL_GetPendingSubscriptionProc' failed due to: Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the PROC_GET_PENDING_SUBSCR API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
    ; nested exception is:
    ORABPEL-11811
    Error while trying to prepare and execute an API.
    An error occurred while preparing and executing the PROC_GET_PENDING_SUBSCR API. Cause: java.sql.SQLException: Io exception: Connection reset [Caused by: Io exception: Connection reset]
    Check to ensure that the API is defined in the database and that the parameters match the signature of the API. Contact oracle support if error is not fixable.
    I am not getting how the BPEL is referring to the DB wsdl from the tmp folder. To resolve this issue, we have to stop the SOA server, delete the tmp files, and restart the server.
    Any pointers in this regard will be really helpful.

    First of all does this scenario occur again.
    "Works first/second time. Later gives this error."
    After you restart the SOA server are you able to reproduce this scenario?
    As already pointed out and from the error message, database connection is reset.
    If you find this error again, try this out.
    em -> home / oc4j_soa -> Administration -> JDBC Resources
    Use the "Test Connection" option for the Connection Pool that you are using for your database JNDI.
    It comes back and say "Connection to "XYZCP" established successfully." it is good to use.
    Run the BPEL process again and once you find the error, come back and test the connection.
    If it comes back with Error, diagnose based on the error message received.
    Cheers
    Kalidass Mookkaiah
    http://oraclebpelindepth.blogspot.com/

  • Error while invoking Stored Procedure.

    Hi,
    I am trying to invoke a stored procedure which has one input parameter and 3 output parameters. In the procedure, I am selecting 3 columns from a table based on the input parameter. I have generated a WSDL from database, along with wsdl an xsd has been created. I have used this WSDL in creating partner link on the target side. For source side partner link, I have created WSDL based on the xsd which is created from database. I have deployed this BPEL process and when I try to debug the flow it is failing while invoking the stored procedure I am getting below soap fault.
    {color:#3366ff}<?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="{color}{color:#3366ff}" xmlns:xsd="{color}{color:#3366ff}" xmlns:xsi="{color}{color:#3366ff}" xsi:schemaLocation="{color}{color:#3366ff} {color}{color:#3366ff}">
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode xmlns="">SOAP-ENV:Server</faultcode>
    <faultstring xmlns="">BPCOR-6135:A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0&;quot; encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0&;quot; xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>Error occured while executing SQL.call GETRESULTS(?,?,?,?) Reason: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012</jbi:part></jbi:message>. Sending errors for the pending requests in the process scope before terminating the process instance</faultstring>
    <faultactor xmlns="">sun-bpel-engine</faultactor>
    <detail xmlns="">
    <detailText>BPCOR-6135:A fault was not handled in the process scope; Fault Name is {http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling}systemFault; Fault Data is <?xml version="1.0&;quot; encoding="UTF-8"?><jbi:message xmlns:sxeh="http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/ErrorHandling" type="sxeh:faultMessage" version="1.0&;quot; xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"><jbi:part>Error occured while executing SQL.call GETRESULTS(?,?,?,?) Reason: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012</jbi:part></jbi:message>. Sending errors for the pending requests in the process scope before terminating the process instance
    Caused by: BPCOR-6131:An Error status was received while doing an invoke (partnerLink=StoreProc, portType={http://j2ee.netbeans.org/wsdl/Storedproc}jdbcPortType, operation=execute)
    BPCOR-6129:Line Number is 30
    BPCOR-6130:Activity Name is Invoke1
    Caused by: Error occured while executing SQL.call GETRESULTS(?,?,?,?) Reason: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012
    Caused by: Unable to convert normalized message content to Procedure, Error occured during populating Procedure.Reason: Parameter Type Conflict: sqlType=12 SQLState: null ErrorCode:17012
    Caused by: Parameter Type Conflict: sqlType=12</detailText>
    </detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    {color:#000000}Plz help me to fix this issue.
    Thanks,
    Srinivas{color}{color}

    First of all does this scenario occur again.
    "Works first/second time. Later gives this error."
    After you restart the SOA server are you able to reproduce this scenario?
    As already pointed out and from the error message, database connection is reset.
    If you find this error again, try this out.
    em -> home / oc4j_soa -> Administration -> JDBC Resources
    Use the "Test Connection" option for the Connection Pool that you are using for your database JNDI.
    It comes back and say "Connection to "XYZCP" established successfully." it is good to use.
    Run the BPEL process again and once you find the error, come back and test the connection.
    If it comes back with Error, diagnose based on the error message received.
    Cheers
    Kalidass Mookkaiah
    http://oraclebpelindepth.blogspot.com/

  • Error in calling stored procedure in sender JDBC adapter

    Hi Experts,
    I am working on MySQl to SAP scenario. I have to use stored procedure in sender JDBC adapter.
    I am calling SP as fallows: execute proc_dtdc_booking_interface_sd
    But it returned following error,
    Database-level error reported by JDBC driver while executing statement 'execute proc_dtdc_booking_interface_sd'. The JDBC driver returned the following error message: 'java.sql.SQLException: Unknown prepared statement handler (proc_dtdc_booking_interface_sd) given to EXECUTE'. For details, contact your database server vendor.
    the way i called SP is correct ??
    please suggest me how to resolve the issue ??
    Regards,
    Bhuvan.

    Hi
    Below is the code , when we are using this code directly in the mySQl command promp, it fetches 10 record but when the same code is called through XI adapter  its fetching only one record
    DELIMITER $$
    DROP PROCEDURE IF EXISTS `proc_dtdc_booking_interface_sd` $$
    CREATE DEFINER=`root`@`localhost` PROCEDURE `proc_dtdc_booking_interface_sd`()
    BEGIN
    declare done int(1);
    declare v_dsr_booked_by char(1) ;
    declare v_dsr_branch_code char(3) ;
    declare v_dsr_cust_code varchar(7) ;
    declare v_dsr_booking_date date ;
    declare v_dsr_cnno char(9) ;
    declare v_dsr_cn_type char(3) ;
    declare v_dsr_cn_weight decimal(8,3) ;
    declare v_dsr_dest char(3) ;
    declare v_dsr_mode char(2) ;
    declare v_dsr_amt decimal(10,2) ;
    declare v_dsr_dox char(1) ;
    declare v_office_code char(3) ;
    declare v_dsr_status char(1) ;
    declare v_dsr_remarks varchar(25) ;
    declare v_dsr_refno varchar(20) ;
    declare v_dsr_transmf_no varchar(10) ;
    declare v_dsr_trans_status_xi char(1) ;
    declare v_ndsr_cnno char(9) ;
    declare v_ndsr_product char(3) ;
    declare v_ndsr_sercharge decimal(8,3) ;
    declare v_ndsr_ins_amt decimal(8,3) ;
    declare v_ndsr_others decimal(8,3) ;
    declare v_dr_amt_type decimal(2,0) ;
    declare v_dr_extra_amt decimal(10,2) ;
    declare v_sales_document varchar(2) ;
    declare bookcur CURSOR for
    SELECT *
    FROM dtdcdb_rw.dtdc_booking_interface_sd
    LIMIT 10;
    DECLARE CONTINUE HANDLER FOR NOT FOUND SET DONE=1;
    set done=0;
    OPEN bookcur;
    bookloop: loop
    FETCH bookcur
    INTO
    v_dsr_booked_by ,
    v_dsr_branch_code,
    v_dsr_cust_code,
    v_dsr_booking_date,
    v_dsr_cnno,
    v_dsr_cn_type,
    v_dsr_cn_weight,
    v_dsr_dest,
    v_dsr_mode,
    v_dsr_amt,
    v_dsr_dox,
    v_office_code,
    v_dsr_status,
    v_dsr_remarks,
    v_dsr_refno,
    v_dsr_transmf_no,
    v_dsr_trans_status_xi,
    v_ndsr_cnno,
    v_ndsr_product,
    v_ndsr_sercharge,
    v_ndsr_ins_amt,
    v_ndsr_others,
    v_dr_amt_type,
    v_dr_extra_amt,
    v_sales_document ;
    IF DONE=1 THEN
    LEAVE bookloop;
    END IF;
    select
    v_dsr_booked_by As dsr_booked_by,
    v_dsr_branch_code As dsr_branch_code,
    v_dsr_cust_code As dsr_cust_code,
    v_dsr_booking_date As dsr_booking_date,
    v_dsr_cnno As dsr_cnno,
    v_dsr_cn_type As dsr_cn_type,
    v_dsr_cn_weight As dsr_cn_weight,
    v_dsr_dest As dsr_dest,
    v_dsr_mode As dsr_mode,
    v_dsr_amt As dsr_amt,
    v_dsr_dox As dsr_dox,
    v_office_code As office_code,
    v_dsr_status As dsr_status,
    v_dsr_remarks As dsr_remarks,
    v_dsr_refno As dsr_refno,
    v_dsr_transmf_no As dsr_transmf_no,
    v_dsr_trans_status_xi As dsr_trans_status_xi,
    v_ndsr_cnno As ndsr_cnno,
    v_ndsr_product As ndsr_product,
    v_ndsr_sercharge As ndsr_sercharge,
    v_ndsr_ins_amt As ndsr_ins_amt,
    v_ndsr_others As ndsr_others,
    v_dr_amt_type As dr_amt_type,
    v_dr_extra_amt As dr_extra_amt,
    v_sales_document As sales_document;
    update dtdcdb_rw.dsr_table
    set dsr_trans_status_xi='T'
    where dsr_cnno=v_dsr_cnno;
    end loop;
    SELECT *
    FROM dtdcdb_rw.dtdc_booking_interface_sd
    LIMIT 10;
    END $$
    DELIMITER ;
    Please help
    Regards
    Bhuvan

  • Getting error when calling stored procedure

    I have created 2 stored procedures as follows
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER PROCEDURE [dbo].[REAL_PUSH_UPDATE_REPORTS] AS
    BEGIN TRANSACTION
         DECLARE @cursor_contact_id bigint;
         DECLARE cursorContactId Cursor FOR SELECT distinct(contact_id) FROM [dbo].credit_reports WHERE loan_id IS NULL;
         OPEN cursorContactId;
         Fetch NEXT FROM cursorContactId INTO @cursor_contact_id;
    IF(@@FETCH_STATUS <> 0)
    PRINT 'There are no LOAN contacts are there with loan ID null, May be you have already executed this procedure'
         WHILE(@@FETCH_STATUS =0)
         BEGIN
    PRINT @cursor_contact_id;
              EXECUTE REAL_UPDATE_REPORTS @cursor_contact_id;
              Fetch NEXT FROM cursorContactId INTO @cursor_contact_id
         END
         CLOSE cursorContactId;
         DEALLOCATE cursorContactId;
         IF (@@Error = 0)
              BEGIN
                   COMMIT TRANSACTION;
              END
         ELSE
              BEGIN
                   ROLLBACK TRANSACTION;
              END
    set ANSI_NULLS ON
    set QUOTED_IDENTIFIER ON
    go
    ALTER PROCEDURE [dbo].[REAL_UPDATE_REPORTS] @initial_contact_id bigint AS
    BEGIN TRANSACTION
         DECLARE @loan_count bigint;
         DECLARE cursorLoanID Cursor FOR (SELECT l.loan_id loanIDList FROM (([dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
    ON lr.loan_id=l.loan_id
    AND lr.contact_id = l.primary_borrower_id)
    LEFT OUTER JOIN [dbo].loan_codes lc
    ON l.loan_code_id = lc.loan_code_id) 
    WHERE (l.primary_borrower_id=@initial_contact_id)
    AND l.active=1  UNION  SELECT l.loan_id 
    FROM   [dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
    ON lr.loan_id=l.loan_id LEFT OUTER JOIN [dbo].contacts c
    ON c.contact_id =l.primary_borrower_id
    WHERE (l.loan_id IN
    (SELECT cb.loan_id FROM coborrowers cb where contact_id =@initial_contact_id and active = 1))
    UNION
    SELECT l.loan_id 
    FROM   [dbo].loans l LEFT OUTER JOIN [dbo].loan_requests lr
    ON lr.loan_id=l.loan_id LEFT OUTER JOIN [dbo].contacts c
    ON c.contact_id =l.primary_borrower_id
    WHERE (l.loan_id IN (SELECT cs.loan_id
    FROM cosigners   cs where contact_id =@initial_contact_id and active = 1)) UNION
    SELECT g.loan_id  FROM   [dbo].groups g, [dbo].group_members gm,
    [dbo].loan_requests lr WHERE gm.group_id = g.group_id
    AND lr.loan_id = g.loan_id
    AND lr.contact_id = gm.secondary_borrower_id
    AND gm.secondary_borrower_id=@initial_contact_id and gm.active = 1) 
    ORDER BY loanIDList DESC;
         OPEN cursorLoanID;
         SET @loan_count = @@CURSOR_ROWS;
    PRINT @loan_count;
         IF(@loan_count > 0)     BEGIN
              DECLARE @loans_loan_id bigint;
              Fetch NEXT FROM cursorLoanID INTO @loans_loan_id;
              DECLARE @my_count bigint;
              SET @my_count=1;
              WHILE(@@FETCH_STATUS =0)
              BEGIN
                   DECLARE @temp_contact_id bigint;
                   DECLARE @temp_loan_id bigint;
                   SET @temp_contact_id = @initial_contact_id;
                   SET @temp_loan_id = @loans_loan_id;
                   IF(@my_count=@loan_count)
                        BEGIN
                             UPDATE [dbo].credit_reports SET loan_id = @temp_loan_id WHERE
    loan_id IS NULL AND contact_id = @initial_contact_id 
    AND NOT EXISTS (SELECT * FROM  [dbo].credit_reports
    WHERE contact_id = @initial_contact_id  AND
    loan_id=@temp_loan_id);
                        END
                   ELSE
                        BEGIN
                             INSERT INTO [dbo].credit_reports(contact_id,credit_bureau_id, credit_score, thirty_days_late,
    sixty_days_late, ninety_days_late, currently_negative, amount_past_due,
    inquiries_six_mos, public_records, collections, total_accounts_balance,
    total_mthly_pymts, report_file, report_gu_id, data_entry_by, data_entry_date,
    loan_id)  SELECT contact_id,credit_bureau_id, credit_score, thirty_days_late,
    sixty_days_late, ninety_days_late, currently_negative, amount_past_due,
    inquiries_six_mos, public_records, collections, total_accounts_balance,
    total_mthly_pymts, report_file, report_gu_id, data_entry_by,
    data_entry_date,@temp_loan_id   FROM [dbo].credit_reports WHERE contact_id
    = @initial_contact_id AND loan_id IS NULL
    AND NOT EXISTS (SELECT * FROM
    [dbo].credit_reports WHERE contact_id=@initial_contact_id AND
    loan_id=@temp_loan_id);
    END
    Fetch NEXT FROM cursorLoanID INTO @loans_loan_id;               
    SET @my_count = @my_count + 1;
              END
    close cursorLoanID
    deallocate cursorLoanID
              IF (@@Error = 0)
                   BEGIN
                        COMMIT TRANSACTION;
                        PRINT 'Success for contactID :'+CONVERT(varchar(50),@initial_contact_id);
                   END
              ELSE
                   BEGIN
                        ROLLBACK TRANSACTION;
                        PRINT 'Failed for contactID :'+CONVERT(varchar(50),@initial_contact_id);
                   END
         END
         ELSE
         BEGIN
              ROLLBACK;
              PRINT 'NO Loans For the contactID :'+CONVERT(varchar(50),@initial_contact_id);
         ENDnow the problem is
    i have executed 2 procedures saperately thn its ok while im calling im getting
    Msg 16915, Level 16, State 1, Procedure REAL_UPDATE_REPORTS, Line 5
    A cursor with the name 'cursorLoanID' already exists.
    Msg 16905, Level 16, State 1, Procedure REAL_UPDATE_REPORTS, Line 6
    The cursor is already open.Please let me know the reason...
    Thank you.
    Message was edited by:
    User71408

    What the heck, that's fun..
    I for one, have never seen T-sql or whatever it's called.
    Looking at it, it seems that a
    close cursorLoanID
    deallocate cursorLoanID
    is missing from the ELSE section doing the rollback.
    But, only guessing
    Fun, fun, fun

Maybe you are looking for

  • Cannot install Adobe AIR 2.0 on Windows 7 64.

    Each time I run the Adobe Installer I get the same error. An error occured while Installing Adobe AIR. Installation may not be allowed by your administrator. Please contact your administrator. I am the administrator and I uninstalled the older versio

  • Raising of CONTROL_FLUSH_ERROR during background execution of RBDMIDOC

    Hi I run program RBDMIDOC in the background job for automatic transport of data. I’m sure that RBDMIDOC supports  background executing, but background job is canceled  with runtime error “RAISE_EXCEPTION” and following description: Exception conditio

  • 2 VPN tunnels for failover

    I am looking at turning up an amazon AWS windows server 2008 r2 datacenter  instance and want to enable failover for a VPN tunnel in case one ISP goes down. 2 VPN tunnels from the server to a Dual WAN cisco router over 2 different ISPs - so that if o

  • Remove/delete duplicate cash flows on facility

    Hi all Due to a error in SAP std, for a facility a number of duplicate commision flows are created when drawing a contract against a facility. The issue is solved with the implementation of SAP note 1389873 so no more duplicates are created.  Is ther

  • BAPI to Post MIGO deatils with Excise Deatils

    Is there any BAPI in SAP which can do both Goods Movement (101 ) and  posting of Excise details.? BAPI_GOODS_MOVEMENT_CREATE. doesn't have excise details.