12 Replies Latest reply on Jan 10, 2020 6:39 PM by Paolo Maggioni

    Reports works but the port number is wrong...

    Paolo Maggioni

      Goodmorning everyone. I am new and I apologize if I am wrong.

      My problem is the following: I installed Oracle form & reports 12 (Version and everything works, even webutil, but when I print a report on the browser the address is wrong.

      It takes http: //localhost.9001 instead of 9002.



      How do I fix it? To launch the report from a form I call a procedure that uses this script: ( in Oracle forms & reports 11 G work fine)

      Str_URL: = / reports / rwservlet / getjobid = '|| Str_Job_ID ||'? Server = '||: global.Report_Server;
      Web.Show_Document (Str_URL, '_ blank')

      This is the result : http://localhost:9001/reports/rwservlet/getjobid=39 the port number is incorrect must be 9002.


      I know that if I write this way it works, but I don't want to have to change all the reports I have that are about fifty : Str_URL := :global.Report_Host||'/reports/rwservlet/getjobid=' ||Str_Job_ID||'?server='||:global.Report_Server;

      where the :global.Report_Host is 'Http://localhost:9002'

      Is there a solution?

      Thank you very much

        • 1. Re: Reports works but the port number is wrong...
          Michael Ferrante-Oracle

          Because WLS_FORMS and WLS_REPORTS are using different ports you will not be able to use a relative references.  You either need to use a fully qualified URL that includes the hostname and correct port OR add a proxy server in front of WLS.  This is why many people use OHS in front of WLS.  By adding OHS in front, mapping to the appropriate managed server will be done by OHS (specifically the WLS module added to OHS).  So as an example if OHS is running on port 7777, you would call your Forms application with something like




          Under the hood, OHS will see the /forms/ part and know that this must be sent to WLS_FORMS, which is running on port 9001.  Then when your code tries to pass a relative URL to the browser using WEB.SHOW that request will get the localhost:7777 pre-pended to it.  When OHS receives it OHS will know that requests that include /reports/ need to be sent to WLS_REPORTS, which is running on 9002.


          If you do not already have OHS installed and configured, you would need to do this.  If you are new to installing and configuring Fusion Middleware software. it might be easier to create a new WLS domain and during that configuration be sure to select Oracle HTTP Server (collocated).  This will configure OHS to be used in this domain.  Once the domain has been updated you then need to configure OHS to do the mapping I described.


          For local installations in a basic environment, the easiest way to complete the configuration is to use the Forms Helper Script.  Information about how to use it can be found here.  Look for the command "enable_ohs".




          Properly running this command will connect OHS with the Forms managed server.  You will have to add Reports manually after first connecting Forms.  To add Reports, access the OHS Advanced configuration in Fusion Middleware Control then add the following to "forms.conf"


          <Location /reports/>

            SetHandler weblogic-handler

            WebLogicHost = <HOSTNAME>

            WebLogicPort = 9002



          Be sure to enter your machine name in the above where it says <HOSTNAME>.  Once you've saved these changes, I recommend stopping and restarting OHS.

          • 2. Re: Reports works but the port number is wrong...
            Paolo Maggioni

            Thanks for the answer Michael.

            I did the complete installation following the instructions.

            The ohs1 server starts and stops it from Oracle Enterprise Manager. I modified what you told me "forms.conf" like this:

            <Location / reports />

               SetHandler weblogic-handler

               WebLogicHost = DELL.mshome.net or  locahost

               WebLogicPort = 9002

            </ Location>

            and restarted ohs1.

            Unfortunately, if I do not explicitly address Http: // localhost: 9002, the report continues to expose port 9001 and does not work. where am i wrong?

            Thank you.

            • 3. Re: Reports works but the port number is wrong...
              Michael Ferrante-Oracle

              Did you make the changes using Fusion Middleware Control (FMC) or did you try doing it in a text editor?  If you tried doing it in an editor your changes were likely not consumed.  Unless you fully understand how WLS works you need to use FMC.  Also, if you did exactly what you posted, you make a couple of typos.


              <Location / reports />


              Remove the spaces from the above.


              <Location /reports/>


              Make the above change using FMC the restart OHS.


              To run the form, use port 7777 and not 9001.

              • 4. Re: Reports works but the port number is wrong...
                Paolo Maggioni

                Hi Micheal.

                then I did this: I "copied" the forms.conf file that

                i stopped all component.

                I found under the template directory, in the $ DOMAIN_HOME / config / fmwconfig / components / OHS / instances / <OHS INSTANCE NAME> /moduleconf/forms.conf directory.

                I edited the content with notepad by adding at the end


                <Location /reports />

                   SetHandler weblogic-handler

                   WebLogicHost localhost

                   WebLogicPort 9002



                start all component.


                I changed the call url to the forms from: http: // localhost: 9001 / forms / frmservlet? Config = webutil & form = C: \ form \ FormSistema \ MOX_W_LOGIN_NETS.fmx

                at: http://dell.mshome.net:7777/forms/frmservlet?config=webutil&form=C:\form\FormSistema\MOX_W_LOGIN_NETS.fmx

                where "dell.mshome.net" is the name that I find written on the ohs1 window and now everything is working properly.

                Hurray ...



                now i have another problem ..

                as a report builder if I run a report everything works normally. If instead I launch it from the form builder to see it on the web it gives me an error: REP-58102: An error occurred sending request http: // <computername> ..... to the internal Webserver: java.net.ConnectException: Connection refused: connect .... do you have a brilliant solution or suggestion?

                Thanks in advance.

                • 5. Re: Reports works but the port number is wrong...
                  Michael Ferrante-Oracle

                  You have the same problem as your original issue.  You are calling Forms using the managed server port that is specific to Forms then expecting to access Reports using the same server/port.  Change the Forms specific port to the common OHS port (e.g. 7777)


                  • 6. Re: Reports works but the port number is wrong...
                    Paolo Maggioni

                    Hello . Maybe I explained myself wrong, sorry.

                    The problem is not in the forms, which work well, the problem is in the use of Report Builder. The report has problems if I choose to have it run on the web, by report builder.

                    Thanks in advance

                    • 7. Re: Reports works but the port number is wrong...
                      Paolo Maggioni

                      Hi micheal. Maybe this can explain it better


                      • 9. Re: Reports works but the port number is wrong...
                        Paolo Maggioni

                        Hi Michalel how i do read your note ?


                        • 10. Re: Reports works but the port number is wrong...
                          Michael Ferrante-Oracle

                          In the post, the Note ID is a link.  You can click on it or use this URL.




                          You will need a MyOracleSupport account.  Information about Oracle Support and how to obtain an account can be found on the Support home page:  https://support.oracle.com/

                          • 12. Re: Reports works but the port number is wrong...
                            Paolo Maggioni

                            Hi Michael, I read the note and below I report my configuration of rwbuilder.conf (this is what is contained in the file:

                            <?xml version = '1.0' encoding = 'ISO-8859-1'?>







                               <cache class="oracle.reports.cache.RWCache">

                                  <property name="cacheSize" value="50"/>

                                  <!--property name="cacheDir" value="your cache directory"/-->

                                  <!--property name="maxCacheFileNumber" value="max number of cache files"/-->


                               <!--Please do not change the id for reports engine.-->

                               <!--The class specifies below is subclass of _EngineClassImplBase and implements EngineInterface.-->

                               <engine id="rwEng" class="oracle.reports.engine.EngineImpl" maxEngine="1" minEngine="0" engLife="50" >

                                  <!--property name="sourceDir" value="your reports source directory"/-->

                                  <!--property name="tempDir" value="your reports temp directory"/-->

                                  <property name="tempDir" value="c:\temp"/>

                                  <!--property name="keepConnection" value="yes"/-->


                               <engine id="rwURLEng" class="oracle.reports.urlengine.URLEngineImpl" maxEngine="1" minEngine="0" engLife="50" />

                               <!--security id="rwJaznSec" class="oracle.reports.server.RWJAZNSecurity"/-->

                                  <!--destination destype="oraclePortal" class="oracle.reports.server.DesOraclePortal">

                                        <property name="portalUserid" value="%PORTAL_DB_USERNAME%/%PORTAL_DB_PASSWORD%@%PORTAL_DB_TNSNAME%" encrypted="no"/>



                               <!--security id="rwSec" class="oracle.reports.server.RWSecurity">



                               <destination destype="ftp" class="oracle.reports.plugin.destination.ftp.DesFTP"/>

                               <destination destype="WebDav" class="oracle.reports.plugin.destination.webdav.DesWebDAV"/>


                               <job jobType="report" engineId="rwEng"/>

                               <job jobType="rwurl" engineId="rwURLEng"/>

                               <notification id="mailNotify" class="oracle.reports.server.MailNotify">

                                  <property name="succnotefile" value="succnote.txt"/>

                                  <property name="failnotefile" value="failnote.txt"/>


                               <!--notification id="wfNotify" class="oracle.reports.server.WorkflowNotify">

                                  <property name="connStr" value="%WF_DB_USERNAME%/%WF_DB_PASSWORD%@%WF_DB_TNSNAME%" encrypted="no"/>


                               <!--jobStatusRepository class="oracle.reports.server.JobRepositoryDB">

                                  <property name="repositoryConn" value="repo_db_username/repo_db_password@repo_db_tnsname" encrypted="no"/>



                               <connection maxConnect="50" idleTimeOut="15">


                               <queue maxQueueSize="1000"/>

                               <!--jobRecovery auxDatFiles="yes"/-->



                                   <proxyServer name="$$Self.proxyHost$$" port="$$Self.proxyPort$$" protocol="all"/>






                               <pluginParam name="mailServer" value="%MAILSERVER_NAME%">

                                  <!--property name="enableSSL" value="yes"/-->


                              <webLayout port="9002" docroot="C:/Oracle/Middleware/Oracle_Home/user_projects/domains/CHEF/servers/WLS_REPORTS/tmp/_WL_user/reports_12.2.1/5ah7s6/war"/>



                            where I made the proposed changes. Now running report builder and not error but no report is shown on the web. Do you have any suggestions?

                            Thank you.