Friday, September 15, 2017

Part 1 || ORA-06512: at "SYS.UTL_HTTP", line 1130 ORA-24247: network access denied by access control list (ACL)

As salamualikum (islamic greetings), brothers and sisters. :)

  Hope you are well with the grace of Almighty Allah (swt)

If you confirm about creating Oracle Database ACL (Access Control List ) for 11g and higher,

and getting following error for calling a web service or web address, then this solution if for you.

Error

Error starting at line : 1 in command -
begin
PROC_URL_CALL;
end ;
Error report -
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1130
ORA-24247: network access denied by access control list (ACL)

ORA-06512: at "HR.PROC_URL_CALL", line 8
ORA-06512: at line 2
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.


Where PROC_URL_CALL have the following code,

create or replace PROCEDURE PROC_URL_CALL AS
  l_url            VARCHAR2(500) := 'http://allieditbd.com';
  l_http_request   UTL_HTTP.req;
  l_http_response  UTL_HTTP.resp;
BEGIN
  -- Make a HTTP request and get the response.
  l_http_request  := UTL_HTTP.begin_request(l_url);
  l_http_response := UTL_HTTP.get_response(l_http_request);
  UTL_HTTP.end_response(l_http_response);
END;

and calling the procedure ,

begin
PROC_URL_CALL;
end ;

There is no error in the ACL creation, issue in the procedure where we set default value for url.
remove the http:// and add www.

Now the code will be

create or replace PROCEDURE PROC_URL_CALL AS
  l_url            VARCHAR2(500) := 'www.allieditbd.com';
  l_http_request   UTL_HTTP.req;
  l_http_response  UTL_HTTP.resp;
BEGIN
  -- Make a HTTP request and get the response.
  l_http_request  := UTL_HTTP.begin_request(l_url);
  l_http_response := UTL_HTTP.get_response(l_http_request);
  UTL_HTTP.end_response(l_http_response);
END;

Now run call the procedure

begin
PROC_URL_CALL;
end ;

and you will get

PL/SQL procedure successfully completed.


Thanks for reading the post and congratulation on your success.

Saturday, December 10, 2016

How to run Oracle Forms 10g with Java Web Start (Run Oracle Forms Application without Browser)

As salamualikum (islamic greetings), brothers and sisters. :)

  Hope you are well with the grace of Almighty Allah (swt).

 

If you want to start oracle application without web browser then without third party solution, you have option to run application with Java Web Start(javaws.exe)

For Oracle Forms Application version 10g(10.1.2.3), it’s about few little steps of configuration.
Follow the bellow steps to configure
1.       You need to install JRE first then Java web start will automatically be installed.
2.       Then create a JNLP file at <oracle_dev/app_home>\j2ee\home\default-web-app
give name webstart_10gl with the following code

<jnlp spec="1.0+" codebase="http://localhost:7778/forms/java/">
  <information>
    <title>Webstart Test Oracle Forms 10g</title>
    <vendor>hamid-oracle.blogspot.com</vendor>
    <homepage href="null"/>
    <description>Webstart Test Oracle Forms 10g</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java version="1.6.0"/>
    <jar href="frmall.jar" download="eager" main="true"/>

<!—If you have more jar file add it bellow, all see a list bellow -->

       <jar href="icons.jar" download="eager" main="true"/>
       <jar href="frmwebutil.jar" download="eager" main="true"/>
       <jar href="looks-2.0.1.jar" download="eager" main="true"/>
       <jar href="jcalendar-1.3.2.jar" download="eager" main="true"/>
       <jar href="FJCalendar.jar" download="eager" main="true"/>
       <jar href="jacob.jar" download="eager" main="true"/>
  </resources>
  <applet-desc name="Webstart Test Oracle Forms 10g" main-class="oracle.forms.engine.Main" width="990" height="668">
    <param name="background" value="no"/>
    <param name="logo" value="no"/>
    <param name="serverApp" value="default"/>
    <param name="lookAndFeel" value="oracle"/>
    <param name="allow_debug" value="true"/>
    <param name="separateFrame" value="false"/>
    <param name="em_mode" value="1"/>
    <param name="latencyCheck" value="true"/>
    <param name="networkRetries" value="240"/>
    <param name="serverArgs" value="module=LOGIN.fmx useSDI=yes"/>
    <param name="serverURL" value="http:// localhost:7778/forms/frmservlet?ifcfs=http:// localhost:7778/forms/frmservlet?config=ENVTX"/>
    <param name="colorScheme" value="teal"/>
    <param name="splashScreen" value="no"/>
    <param name="dontTruncateTabs" value="true"/>
  </applet-desc>
</jnlp>

3.      

Now create a shortcut of the file (webstart_10gl) in the desktop and make sure it’s General Tab “Open with Java(TM) Web Start Launcher” same as bellow image.


4.       Now double click the shortcut and play with application.
Please not, all of your jar file must signed by same Signature.

Thanks for reading the post and congratulation on your success.

 

Monday, November 14, 2016

Using In-process Reports Server causes FRM-41213 after system startup



After an installation/configuration of Oracle Forms and Reports (11gR1 or 11gR2), two reports servers are created:

  •  In-process reports server (Runs inside WLS_REPORTS)
  • Standalone reports server (Separate instance from WLS_REPORTS managed by OPMN)

If you have the in-process reports server (rep_wls_reports_hostname_asinst_1) configured for generating reports, there have been situations where after either WLS_REPORTS or the server/PC itself have been rebooted, running reports always generates FRM-41213 (Unable to connect to Report Server) errors.
There are two solutions which can be done:

  • Using the standalone reports server (RptSvr_hostname_asinst_1)

  1.  Go to your env file associated to your Forms application. 
  2. Look for a variable called ‘APP_RS’ or ‘RSERV’. (If they do not exist, skip to step 4) 
  3. Change the value of the variable from the in-process reports server to the standalone reports server. Save changes made in the file. 
  4. If the reports server is referenced directly in your WHEN_NEW_FORM_INSTANCE trigger, you will need to make the change specified in step 3 in the form itself. Save and recompile the form.
 
  • Starting the in-process reports server before using application (methods shown below)

  1. Starting the in-process reports server through Enterprise Manager FMW Control 
  2. Starting the server by URL: http://hostname:port/reports/rwservlet/startserver 
  3. Calling anything in rwserver by URL (Example: Go to Showjobs at http://hostname:port/reports/rwservlet/showjobs)

If you choose to switch to the standalone reports server, it will always be running after starting up your system as all OPMN processes start automatically in Windows. The standalone reports server will be ready instantly as soon as all WebLogic servers are up and running.