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

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

  • 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.

  • 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

  • Calling Stored Procedure with CLOB parameter

    Hi,
    i have one procedure with IN parameter CLOB which is taking xml file and stored in one table column and this table column datatype is also CLOB. And this procedure called by .Net program but problem is when the file will come more than 32KB calling procedure failed. But as i know CLOB can stored up to 4GB data.
    Is that Limitation of oracle or .Net version
    please let me know the solution for that,
    Create Procedure Insert_File(P_XMLFILE IN CLOB)
    as
    begin
    insert into instances
    values(p_xmlfile);
    commit;
    end;
    regards,
    Madan

    Hi Thanks for your reply,
    Actually this procedure called by .net program and the XML file has passed in that parameter which come from some FTP(its inbound) and this files we are storing into above mentioned table.
    Error has come while calling stored procedure Through .net
    Error Details:
    Error calling stored procedure. 0 retry attemps has failed. Error: System.Exception: Error while calling stored procedure on Oracle: INSERT_FILE: System.Data.OracleClient.OracleException: ORA-01460: unimplemented or unreasonable conversion requested

  • How to call stored procedure with multiple parameters in an HTML expression

    Hi, Guys:
    Can you show me an example to call stored procedure with multiple parameters in an HTML expression? I need to rewrite a procedure to display multiple pictures of one person stored in database by clicking button.
    The orginal HTML expression is :
    <img src="#OWNER#.dl_sor_image?p_offender_id=#OFFENDER_ID#" width="75" height="75">which calls a procedure as:
    procedure dl_sor_image (p_offender_id IN NUMBER)now I rewrite it as:
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number)could anyone tell me the format for the html expression to pass multiple parameters?
    Thanks a lot.
    Sam

    Hi:
    Thanks for your help! Your question is what I am trying hard now. Current procedure can only display one picture per person, however, I am supposed to write a new procedure which displays multiple pictures for one person. When user click a button on report, APEX should call this procedure and returns next picture of the same person. The table is SOR_image. However, I rewrite the HTML expression as follows to test to display the second image.
    <img src="#OWNER#.Sor_Display_Current_Image?p_n_Offender_id=#OFFENDER_ID#&p_n_image_Count=2" width="75" height="75"> The procedure code is complied OK as follows:
    create or replace
    PROCEDURE Sor_Display_Current_Image(p_n_Offender_id IN NUMBER, p_n_image_Count in number) AS
        v_mime_type VARCHAR2(48);
        v_length NUMBER;
        v_name VARCHAR2(2000);
        v_image BLOB;
        v_counter number:=0;
        cursor cur_All_Images_of_Offender is
          SELECT 'IMAGE/JPEG' mime_type, dbms_lob.getlength(image) as image_length, image
          FROM sor_image
          WHERE offender_id = p_n_Offender_id;
        rec_Image_of_Offender cur_All_Images_of_Offender%ROWTYPE;
    BEGIN
        open cur_All_Images_of_Offender;
        loop
          fetch cur_All_Images_of_Offender into rec_Image_of_Offender;
          v_counter:=v_counter+1;
          if (v_counter=p_n_image_Count) then
            owa_util.mime_header(nvl(rec_Image_of_Offender.mime_type, 'application/octet'), FALSE);
            htp.p('Content-length: '||rec_Image_of_Offender.image_length);
            owa_util.http_header_close;
            wpg_docload.download_file (rec_Image_of_Offender.image);
          end if;
          exit when ((cur_All_Images_of_Offender%NOTFOUND) or (v_counter>=p_n_image_Count));
        end loop;
        close cur_All_Images_of_Offender;
    END Sor_Display_Current_Image; The procedure just open a cursor to fetch the images belong to the same person, and use wpg_docload.download_file function to display the image specified. But it never works. It is strange because even I use exactly same code as before but change procedure name, Oracle APEX cannot display an image. Is this due to anything such as make file configuration in APEX?
    Thanks
    Sam

  • Calling Stored Procedure with TestStand to SQL 2000

    When I run the Stored Procedure in the query analyzer it returns the recordset fine. I am not specifying any parameters. I am Using TestStand 2.01 and SQL Server 2000. I am using the OPEN SQL STATEMENT step to call the SP. When I run the SP in TestStand I get no data returned. If I run the SQL statment in TestStand I get the data that I am requesting. Does TestStand not support stored procedures.

    Hi,
    The instructions that I posted were for TestStand 3.0. In version 3.0 you can call stored procedures with input/output paramateres and to support this functionality the data operation step support several new modes.
    TestStand 2.0.1 does not support parameters on stored procedures, but it does support calling stored procedures that do not take parameters. To be able to access the data back from the database you need to set the cursor location (in the Advanced tab of the Open SQL Statement step) to Client (http://digital.ni.com/public.nsf/websearch/0EF68BF97AB1A61F86256B8E007D70C0?OpenDocument).
    By changing the cursor to Client I was able to succesfully call a stored procedure from TestStand 2.0.1 and to read back the recordse
    t return by the database. Please let me know if you are still experiencing dificulties.
    Best regards,
    Alejandro del Castillo
    National Instruments

  • 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 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.

  • Calling stored procedures with parameters with the Database Connectivi​ty Toolkit

    Hi all,
    I am new to the forum and am having difficulty finding a solution to a particular problem I am having regarding using the LabVIEW Database Connectivity Toolkit on a project I am currently working on at my job.  I have a database in which I have tables and stored procedures with parameters.  Some of these stored procedures have input, output, and return parameters.
    I have been trying to follow this example but to no avail:  http://digital.ni.com/public.nsf/allkb/07FD1307460​83E0686257300006326C4?OpenDocument
    One such stored procedure I am working on implementing is named "dbo.getAllowablePNs", which executes "SELECT * from DeviceType" (DeviceType is the table).  In this case, it does not require an input parameter, it has an output parameter that generates the table [cluster], and has a return parameter which returns an integer value (execution status code) to show if an error occurred.  The DeviceType table has 3 columns; ID (PK, int, not null), PN (nvarchar(15), null), and NumMACAddresses (int, null).  I have gone over many examples and have talking to NI support to try to implement this and similar stored procedures in LabVIEW but have not been successful.  I am able to connect to the database with the Open Connection VI without error, but am running into some confusion following this step.  I am then trying to use the Create Parameterized Query VI to call the stored procedure and set the parameters.  I assume I would then use the Set Parameter Value VI for each parameter that is wired into the parameters input on the previous Parameterized Query VI?  I am also having some confusion during and following these steps as well.  I would greatly appreciate any advice or suggestions anyone might have in regards to this situation as I am not a SQL expert.  Also, I would be happy to provide any more information that would be helpful.
    Regards,
    Jon
    Solved!
    Go to Solution.

    Also, I don't know if this would be helpful but here is the actual stored procedure in SQL:
    CREATEPROCEDURE [dbo].[getLastSequenceNumber]
    @p1 nvarchar(10)='WO-00000'
    AS
    BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SETNOCOUNTON;
    -- Insert statements for procedure here
    selectmax(SequenceNumber)from Devices where WorkOrderNumber= @p1
    END
    GO

  • Calling stored procedure with output parameters in a different schema

    I have a simple stored procedure with two parameters:
    PROCEDURE Test1(
    pOutRecords OUT tCursorRef,
    pIdNumber IN NUMBER);
    where tCursorRef is REF CURSOR.
    (This procedure is part of a package with REF CURSOR declared in there)
    And I have two database schemas: AppOwner and AppUser.
    The above stored procedure is owned by AppOwner, but I have to execute this stored procedure from AppUser schema. I have created a private synonym and granted the neccessary privileges for AppUser schema to execute the package in the AppUser schema.
    When I ran the above procedure from VB using ADO and OraOLEDB.Oracle.1 driver, I got the following error when connecting to the AppUser schema:
    ORA-06550: line 1, column 7:
    PLS-00306: wrong number or types of arguments in call to 'TEST1'
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    but when I was connecting to the AppOwner schema, everything is running correctly without errors.
    Also, when I switch to the microsoft MSDAORA.1 driver, I can execute the above procedure without any problems even when connecting to the AppUser schema.
    I got this error only when I am trying to execute a stored procedure with an output parameter. All other procedures with only input parameters have no problems at all.
    Do you know the reason for that? Thanks!

    If anyone has figured this one out let me know. I'm getting the same problem. Only in my case I've tried both the "OraOLEDB.Oracle" provider and the "MSDAORA" provider and I get an error either way. Also my procedure has 2 in parameters and 1 out parameter. At least now I know I'm not the only one with this issue. :)
    '*** the Oracle procedure ***
    Create sp_getconfiguration(mygroup in varchar2, myparameter in varchar2, myvalue out varchar2)
    AS
    rec_config tblconfiguration.configvalue%type;
    cursor cur_config is select configvalue from tblconfiguration where configgroup = mygroup and configparameter = myparameter;
    begin
    open cur_config;
    fetch cur_config into rec_config;
    close cur_config;
    myvalue := rec_config;
    end;
    '** the ado code ****
    dim dbconn as new adodb.connection
    dim oCmd as new adodb.connection
    dim ors as new adodb.recordset
    dbconn.provider = "MSDAORA" 'or dbconn.provider = "OraOLEDB.Oracle"
    dbconn.open "Data Source=dahdah;User ID=didi;Password=humdy;PLSQLRSet=1;"
    set ocmd.activeconnection = dbconn
    cmd.commandtext = "{call fogle.sp_getconfiguration(?,?)}"
    'i've also tried creating a public synonym called getconfiguration and just refering to procedure by that.
    ' "{call getconfiguration(?, ?)}"
    ' "{call getconfiguration(?,?, {resultset 1, myvalue})}"
    'and numerous numerous other combinations
    set oPrm = cmd.createparameter("MYGROUP", advarchar, adparaminput, 50, strGrouptoPassIn$)
    cmd.parameters.append oPrm
    set oPrm = cmd.createParameter("MYPARAMETER", advarchar, adParamInput, 50, strParameterToPassIn$)
    cmdParameters.append oPrm
    set rs = cmd.execute

  • JDBC-Adapter-Receiver Calling Stored Procedure with Input-Typ Record

    Hallo,
    I´ m trying calling a stored-procedure with two input-parameter; one of typ record (oracle) and one of type tabel of records. Is this possible (I think there are only types like string, integer etc. possible)? When not is there another possibility to work with that type?
    Thanks in advance,
    Frank

    Hi Frank,
    I think stored procedures will not take Array of Records as a Input. If you want to make a loop funtionality etc then JDBC adapter will work accordingly. You need to just call the stored procedure from the JDBC adapter. It will work for the array of records(multiple occurences).
    Receiver JDBC Procedures.
    /people/siva.maranani/blog/2005/05/21/jdbc-stored-procedures
    Alternative option is you can make use of Java Proxy and from there you can call stored procedure ..I think it is possible.. not tried.
    Hope this helps
    Regards,
    Moorthy

  • Call stored procedure(with parameters) via odbc

    In my application I like to use the below statement to call a stored procedure with parameter and return a result set.
    {CALL PP.getPerson('daniel')}
    but this will just return errors to my application.
    If I change the statement to:
    {CALL PP.getPerson(?')}
    and bind a parameter and its value, it will work.
    My question is, is it possible to call a stored procedure via ODBC without binding parameters in application? I mean, what will be my SQL equivalent if I don't want to do parameter binding in my application?
    Thanks in advance. I appreciate any help :-)

    hi 
    Please see the e.g bellow
    create proc proc_test(@SchoolNumber int,@SchoolName
    varchar(100),@StudentNumber int, @StudnentName
    varchar(100)output ,
    @StudentAddress varchar(100) output,
    @Studentbirthdate datetime output,
    @StudentPhoneNumber varchar(100) output,
    @GuardianName varchar(100) output)
    as
    begin
    select @StudnentName varchar=StudnentName ,
    @StudentAddress =StudentAddress,
    @Studentbirthdate =Studentbirthdate ,
    @StudentPhoneNumber =StudentPhoneNumber,
    @GuardianName =GuardianName
    from table where schoolno=@SchoolNumber
    and SchoolName=@SchoolName
    and StudentNumber=@StudentNumber
    return
    end
    http://technet.microsoft.com/en-us/library/ms187004(v=sql.105).aspx
    http://www.lynda.com/SQL-Server-tutorials/Using-input-output-parameters/104964/113058-4.html
    Please mark answered if I've answered your question and vote for it as helpful to help other user's find a solution quicker

Maybe you are looking for