This forum is currently locked. You can't register or post questions at this time. (read more)

too many http requests and null self argument is disallowed

All posts relating to Oracle PL/SQL development.

Moderator: Tim...

Srinivas
Senior Member
Posts: 185
Joined: Mon Nov 08, 2004 10:14 am
Location: UK

too many http requests and null self argument is disallowed

Postby Srinivas » Wed May 30, 2012 11:54 am

Hi Tim

I have this code which ws working fine, but now i get too many http requests error inspite of closing the requests.

Code: Select all

      UTL_HTTP.SET_HEADER (HTTP_REQ, 'Content-Length', LENGTH (SOAP_REQUEST));
      UTL_HTTP.SET_HEADER (HTTP_REQ,'SOAPAction','"http://webapi/Streets_Events_Get"');
      UTL_HTTP.WRITE_TEXT (HTTP_REQ, SOAP_REQUEST);
      UTL_HTTP.WRITE_TEXT (HTTP_REQ, SOAP_REQUEST);

       INSERT INTO XXHCC_STAGING_XML   VALUES  ((XMLTYPE (SOAP_REQUEST)), SYSDATE,'Street_Events_Get SOAP Request');
       COMMIT;

      HTTP_RESP := UTL_HTTP.GET_RESPONSE (HTTP_REQ);
      UTL_HTTP.READ_TEXT (HTTP_RESP, SOAP_RESPOND);
      INSERT INTO XXHCC_STAGING_XML  VALUES  ((XMLTYPE (SOAP_RESPOND)), SYSDATE,'ssssss');
      COMMIT;

      UTL_HTTP.END_REQUEST(http_req);
      UTL_HTTP.END_RESPONSE (HTTP_RESP);


My SOAP requst can be seen in my staging table and its fine, but when i run the procedure from sqlplus i get this and i dont get any response back,

My assumption is as its failing to connect, its an empty response and it fails in sql plus with xml parsing error, but the exception logs the actual error.

Code: Select all

ERROR at line 1:
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at line 5


and in my Error log which logs the exceptino i get

Code: Select all

ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1222
ORA-29270: too many open HTTP requests


I dont know what else to put to close the http requests, or is there a parameter in oracle to set the no.of http requests.

My environment is
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production

Thanks

S

Srinivas
Senior Member
Posts: 185
Joined: Mon Nov 08, 2004 10:14 am
Location: UK

Re: too many http requests and null self argument is disallo

Postby Srinivas » Wed May 30, 2012 3:14 pm

Tim

I m getting this error now

Code: Select all

ORA-12541: TNS:no listener


I have given the proxy settings like this

Code: Select all

 UTL_HTTP.CLOSE_PERSISTENT_CONNS;     
 HTTP_REQ :=UTL_HTTP.BEGIN_REQUEST ('"http://xyz/WebApi/WebService1.asmx"','POST','HTTP/1.1');                 
 UTL_HTTP.set_proxy (proxy => 'http://abc:abc@91.1.15.3:8080');


I cant find anything wrong here...

but when i do

Code: Select all

select utl_http.request('http://xyz/webapi/Webservice1.asmx') from dual;


it works in toad and i get resultset, but in sql plus it fails by saying

Code: Select all

ERROR at line 1:
ORA-12541: TNS:no listener
ORA-06512: at "SYS.UTL_HTTP", line 1566
ORA-06512: at line 1


Any idea what may be causing this

S

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: too many http requests and null self argument is disallo

Postby Tim... » Sun Jun 03, 2012 7:13 am

Hi.

Sorry it's taken so long to get back to you on this.

1) Why do you call "UTL_HTTP.WRITE_TEXT (HTTP_REQ, SOAP_REQUEST);" twice?
2) Can you send a working example (minus the INSERT statements) so I can run it and recreate the issue?

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

Srinivas
Senior Member
Posts: 185
Joined: Mon Nov 08, 2004 10:14 am
Location: UK

Re: too many http requests and null self argument is disallo

Postby Srinivas » Wed Jun 06, 2012 8:51 am

Tim

I got to the root of the issue, utl_http.write_text was a copy paste error from my side, so ignore that.

The problem was I was giving the name of the machine in the begin request method like http://xyz/mywebservice.

Somehow it was not resolving the DNS name xyz and it was failing to connect to server and this in turn would return nothing and thats why xml parsing failed.

I put the IP address and it works fine, so no problems with that.

I have decided to use this method and it brings me back the IP address of the hostname specified.

Code: Select all


SELECT UTL_INADDR.get_host_address('ABC-37692')FROM dual



The above stmt brings me back the ip address and then i can put that in the begin_request method.

It took me nearly a day to figure it out

S

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: too many http requests and null self argument is disallo

Postby Tim... » Wed Jun 06, 2012 12:20 pm

OK. :)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog


Return to “Oracle SQL and PL/SQL Development”

Who is online

Users browsing this forum: No registered users and 3 guests