Skip to Main Content
  • Questions
  • 'no listener' error on Jasper Report Printing

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question.

Asked: July 21, 2017 - 8:54 am UTC

Last updated: July 22, 2017 - 1:38 am UTC

Version: 5.0.3

Viewed 1000+ times

You Asked

I am using `Oracle Apex 5.0.3` running on `Oracle 11.0.2 SE 1`, Apex is configured using `ORDS 3.0.6`. I have configured `Jasper Report` in `Apache Tomcat 7.0.75`.

In my Oracle Apex Application, when I click on the `Print` button, I am getting this error.

    ORA-29273: HTTP request failed ORA-06512: at "SYS.UTL_HTTP",
    line 1130 ORA-12541: TNS:no listener


Below is my code, which is invoking which button click.

    BEGIN
             -- call the report and pass parameters
            xlib_jasperreports.set_report_url('http://127.0.0.1:8080/JasperReportsIntegration/report');
            xlib_jasperreports.show_report (p_rep_name          => 'PATH/TO/REPORT_NAME',
                                            p_rep_format        => 'pdf',
                                            p_data_source       => 'default',
                                            p_out_filename      => 'Users_info.pdf',
                                            p_rep_locale        => 'en_US'
                                           );
    
            -- stop rendering of the current APEX page
            apex_application.g_unrecoverable_error := true;
    END;


-----------------------
When I try to test using SQL Developer using this query
select httpuritype('http://127.0.0.1:8080/').getclob() from dual;


I am getting below error
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1819
ORA-29261: bad argument
ORA-06512: at "SYS.HTTPURITYPE", line 34
29273. 00000 -  "HTTP request failed"
*Cause:    The UTL_HTTP package failed to execute the HTTP request.
*Action:   Use get_detailed_sqlerrm to check the detailed error message.
          Fix the error and retry the HTTP request

-----------------------
but if I try to test following, I am
select httpuritype('www.google.com').getclob() from dual;


I am getting proper response
<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="en"><head><meta content="Search the world's information, including webpages,.....

-----------------------

I have properly granted ACL rights to my schema.
Please suggest any fix for this issue, if anyone has ran through.

and Connor said...

Unfortunately "ORA-12541: TNS:no listener" is one of those generic style errors which basically means we could not reach http://127.0.0.1:8080, which of course be caused by many reasons.

For example, I fire up ORDS on my laptop ( on port 8080) and I get:

SQL> select httpuritype('http://127.0.0.1:8080').getclob() from dual;

HTTPURITYPE('HTTP://127.0.0.1:8080').GETCLOB()
----------------------------------------------------------------------------
<!--[if HTML5]><![endif]-->
<!doctype html>
<meta http-equiv="x-ua-compatible" c



but when I shut down ORDS, I'll see this:


SQL> select httpuritype('http://127.0.0.1:8080').getclob() from dual;
ERROR:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.HTTPURITYPE", line 38
ORA-12541: TNS:no listener
ORA-06512: at "SYS.UTL_HTTP", line 380
ORA-06512: at "SYS.UTL_HTTP", line 1127
ORA-06512: at "SYS.HTTPURITYPE", line 23


So *something* is either not running or being blocked.

Try netstat -a to make sure something is listening on port 8080, then try a request from outside the database (eg wget), and ensure no firewall/proxy/etc is getting in the way.



Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database