Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

intermittently getting ORA-29261: bad argument

2905573Mar 30 2017 — edited Apr 4 2017

intermittently getting ORA-29261: bad argument.

UTL_HTTP.set_response_error_check (ENABLE => TRUE );

  UTL_HTTP.set_detailed_excp_support (ENABLE => TRUE );

  l_pass :=de_crypt('PWD','KEY');

  UTL_HTTP.set_wallet(XXXXXXX, XXXXXX);

  http_req      := Utl_Http.begin_request (url => l_buynet_url,method => 'POST',http_version => 'HTTP/1.0');

  IF l_time_out IS NOT NULL THEN

    utl_http.set_transfer_timeout(http_req,l_time_out);

  END IF;

  UTL_HTTP.set_header(http_req,'Content-Type','text/xml');

  UTL_HTTP.set_header(http_req,'Content-Length', LENGTH(l_request));

  UTL_HTTP.WRITE_TEXT (r => http_req,data => l_request);

  http_resp := UTL_HTTP.get_response(http_req);

  BEGIN

    LOOP

      UTL_HTTP.read_text ( r => http_resp, data => v_buffer);

      l_resp := l_resp || v_buffer;

    END LOOP;

  --utl_http.end_response(http_resp);

  EXCEPTION

  WHEN UTL_HTTP.end_of_body THEN

    NULL;

  END;

We get Error in between only, Wallet is set, Certificate are placed. But in between get the error.

Any Thoughts ?

Comments

John Thorton

2905573 wrote:

intermittently getting ORA-29261: bad argument.

UTL_HTTP.set_response_error_check (ENABLE => TRUE );

UTL_HTTP.set_detailed_excp_support (ENABLE => TRUE );

l_pass :=de_crypt('PWD','KEY');

UTL_HTTP.set_wallet(XXXXXXX, XXXXXX);

http_req := Utl_Http.begin_request (url => l_buynet_url,method => 'POST',http_version => 'HTTP/1.0');

IF l_time_out IS NOT NULL THEN

utl_http.set_transfer_timeout(http_req,l_time_out);

END IF;

UTL_HTTP.set_header(http_req,'Content-Type','text/xml');

UTL_HTTP.set_header(http_req,'Content-Length', LENGTH(l_request));

UTL_HTTP.WRITE_TEXT (r => http_req,data => l_request);

http_resp := UTL_HTTP.get_response(http_req);

BEGIN

LOOP

UTL_HTTP.read_text ( r => http_resp, data => v_buffer);

l_resp := l_resp || v_buffer;

END LOOP;

--utl_http.end_response(http_resp);

EXCEPTION

WHEN UTL_HTTP.end_of_body THEN

NULL;

END;

We get Error in between only, Wallet is set, Certificate are placed. But in between get the error.

Any Thoughts ?

Remove, Delete, Eliminate the whole EXCEPTION handler let us know what new error gets thrown.

2905573

Hi,

The error is not captured in the Exception block of the same procedure but it is getting to the exception of called block.

ORA-29261: bad argument.

We have set utl_http.set_transfer_timeout(http_req,l_time_out); as 60s and the requested system has taken time to respond but we are not getting 'transfer_timeout' as exception instead getting ORA-29261: bad argument.

UTL_HTTP.set_response_error_check (ENABLE => TRUE );

  UTL_HTTP.set_detailed_excp_support (ENABLE => TRUE );

    DBMS_OUTPUT.PUT_LINE 'inside XXXX Call 3');

  UTL_HTTP.set_wallet(l_ewallet_path, l_pass);

   DBMS_OUTPUT.PUT_LINE ('inside XXXX Call 4');

 

  http_req      := Utl_Http.begin_request (url => l_XXXX_url,method => 'POST',http_version => 'HTTP/1.0');

   DBMS_OUTPUT.PUT_LINE 'inside XXXX Call 5');

  IF l_time_out IS NOT NULL THEN

   DBMS_OUTPUT.PUT_LINE 'inside XXXX Call 6');

    utl_http.set_transfer_timeout(http_req,l_time_out);

  END IF;

  BEGIN

  DBMS_OUTPUT.PUT_LINE ('inside XXXX Call 7');

  UTL_HTTP.set_header(http_req,'Content-Type','text/xml');

  UTL_HTTP.set_header(http_req,'Content-Length', LENGTH(l_request));

  UTL_HTTP.WRITE_TEXT (r => http_req,data => l_request);

  http_resp := UTL_HTTP.get_response(http_req);

It is printing till Call 7 and Going to the exception block of called Proc.

[Deleted User]

2905573 wrote:

The error is not captured in the Exception block of the same procedure but it is getting to the exception of called block.

So you remove that exception handling block as well. Remove ALL of your exception handling, so that Oracle shows you what goes wrong, and more importantly, WHERE it goes wrong.

And: If you seriously want help, post ALL of your code, not just a little bit that won't even compile.

BluShadow

Which line is being indicated as throwing the exception?

1 - 4
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on May 2 2017
Added on Mar 30 2017
4 comments
5,353 views