IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Invalid Cursor Number or Cursor Context not found

  • 1.  Invalid Cursor Number or Cursor Context not found

    Posted Fri October 18, 2002 03:38 PM

    Hi

    Iam getting error message “Invalid Cursor Number Cursor context not found” when calling the oracle stored procedure .

    If i pass only one paramter (any one) from the webMethods the stored procedure works fine, but when i pass more than one paramter value it throws the Exception "Invaid Cursor Number ".

    The stroed proc works fine from SQL plus.

    Any help will be appreciated.

    Regards
    Shibu


    #Integration-Server-and-ESB
    #broker
    #Universal-Messaging-Broker
    #webMethods


  • 2.  RE: Invalid Cursor Number or Cursor Context not found

    Posted Mon October 21, 2002 04:57 PM

    Hi Shibu,
    I am not sure if I get your problem correct or not…
    but may be this solution will work for you. You may be already knowing this case and your problem is advanced than below.

    When calling Oracle stored procedure from webMethods Enterprise Server, you have to define a cursor type in package specification like following:
    (pls note I am using ! instead of angled brackets to signify name to be replaced)

    CREATE OR REPLACE PACKAGE !pkgName! IS
    Type !recordTypeName! is record
    (
    outField1 !fielddatatype!,
    outField2 !fielddatatype!
    – and so on…
    );

    TYPE !RefCursorType! IS REF CURSOR RETURN !recordTypeName!;

    procedure !myProc!( out_cursor in out !RefCurType!
    , inField1 in !fielddatatype!
    , inField2 in !fielddatatype!
    – and so on
    );
    END;
    /

    And in the stored procedure you have to send output data as
    open out_cursor for
    select !outfield1!, !outfield2!, !outfield3! – and so on
    from dual;

    There can be only one out put field and that is the ref cursor passed in the very first parameter.

    Regards,
    -Vandana.


    #webMethods
    #Integration-Server-and-ESB
    #Universal-Messaging-Broker
    #broker


  • 3.  RE: Invalid Cursor Number or Cursor Context not found

    Posted Tue October 22, 2002 05:02 PM

    Hi Vandana

    Thanks for your valuable suggestion, My strored proc works fine with Orcale 8.1.5 , 8.1.7.

    The problem is when i call the proc from Orcale 8.1.7.4 and if i pass more than one input value the adpater throws the exception “Invalid Cursor number”. The same stored proc works fine from SQL Plus

    If i pass only one input parameter the stored proc works fine even with Oracle 8.1.7.4…

    Thanks
    Shibu


    #Universal-Messaging-Broker
    #broker
    #Integration-Server-and-ESB
    #webMethods