Tuesday 23 January 2018

Oracle APEX and 12.2 upgrade

Oracle APEX 5.1.x and Oracle 12.2 upgrade


Doc ID 2339601.1 apex_web_service issue

 Oracle 12.2 multiple domain certificates issue

This is something to be aware of in case you are updating to Oracle 12.2 as it may require some additional changes to your PL/SQL code. 

Our scenario, we were running APEX 5.1.2 on Oracle 12.1 with APEXOfficePrint and wanted to stage and test our 12.2 upgrade process. 

All other APEX things seemed to be working fine after the upgrade until we discovered that our rest service calls to AOP started to fail. 

Digging deeper into this problem we discovered there were changes in 12.2 that "broke" one of key APEX REST packages - APEX_WEB_SERVICE

To be technically clear here 12.2 changed UTL_HTTP package definition that at the end is used by apex_web_service package. APEX uses apex_web_service as wrapper procedure for utl_http. More info here.

That in the end can caused AOP to stop working on our end.  

It is not something caused by AOP and can happen to any web services call you make in your application under certain condition - if server your database is talking to has multi-domain certificate configuration so please be aware of it.

This is a security improvement on 12.2 which is not questioned but definitely something everyone planning to do the upgrade need to cater for

To elaborate further let's see some examples.

1. UTL_HTTP in 12.1 and APEX 5.1.2 works perfectly fine,
select utl_http.request( 'https://www.apexofficeprint.com/api/', wallet_path=>'file:/mywallet') from dual;
where with 12.2 after the upgrade there is now an issue and you need to run it using additional parameter https_host to make it work.
select utl_http.request( 'https://www.apexofficeprint.com/api/',wallet_path=>'file:/mywallet', https_host=>'www.apexrnd.be/aop') from dual;
or mapping it directly to your top domain
select utl_http.request( 'https://www.apexrnd.be/aop', wallet_path=>'file:/mywallet') from dual;
2. Similar for apex_web_service on 12.1 and APEX 5.1.2 this worked fine 
select apex_web_service.make_rest_request(p_url => 'https://www.apexofficeprint.com/api/', p_http_method => 'GET') from dual;
In 12.2 running APEX 5.1.2 same process would fail and you would have to do.
select apex_web_service.make_rest_request(p_url => 'https://www.apexrnd.be/aop/', p_http_method => 'GET') from dual; 
So if you are planning to upgrade to 12.2 also make sure that you plan to upgrade your APEX to 5.1.4 where this problem has been fixed as https_host parameter is exposed as p_https_host so running

select apex_web_service.make_rest_request(p_url => 'https://www.apexofficeprint.com', p_http_method => 'GET') from dual;
would be fine. 

Going back to AOP in this APEX 5.1.2 combo with Oracle 12.2 this would mean that your plugin config for AOP would need updating to

Further reading - Skillbuilder - John Watson's blog.

Happy APEXing,

Sunday 14 January 2018

Oracle APEX 5.1.4 and ORDS 17.4 upgrade

Oracle APEX 5.1.4 and ORDS 17.4 upgrade


Weblogic 10.3.6 and ORDS 17.4

Webserver and ORDS JAVA compatibility issue

This popped out during our ORACLE APEX 5.1.4 upgrade

We were running WebLogic 10.3.6 and Oracle APEX 5.1.2 doing upgrade to latest version of ORDS and APEX (ORDS 17.4 and APEX 5.1.4)

APEX upgrade as such was smooth but on ORDS restart we got an error:

Problem was in JAVA version that was running on our WebLogic Server -> JAVA version 7(
jdk1.7.0_25) was not supported by ORDS.

More info here

Solutions available:
- Downgrade to use ORDS 17.3
- Upgrade your WebLogic with JDK 1.8
- Upgrade your WebLogic to 12c

We decided (for now) to go with ORDS 17.3 and APEX was up and running again.

Happy APEXing,