Wednesday, August 04, 2010

Upgrade to APEX 4.0 - Known Issues - Workarounds and Patches

If you upgrade your application from APEX 3.x to 4.0 you might encounter some issues.

At ODTUG I did a live migration of an application written in APEX 3.2 to 4.0 and I talked about some of the issues I discovered and how I worked around them. I'm doing the same presentation at APEXPosed in Brussels in October. You also might have seen my previous posts where I upgrade DG Tournament from APEX 3 to 4.

On the Known Issues page you see the issues categorized nicely. If the issues can be fixed by working around it, it's also mentioned there. Oracle is working hard on a patchset (4.0.1) and they hope to release it soon. On Metalink you can already find patches for specific issues too.

I plan to write some other blog posts with steps I did when upgrading DG Tournament to APEX 4.0.


FONTY said...

hello my friend! warm greeting ^^!
your blog looks nice 0_0

by the way,
if you need to find unique fonts, you can go to our website.

best regards;

Kuleena said...

We are currently upgrading the application from Apex 3.1 version to 4.0. We have done this in two ways
1. Upgrade the Apex from 3.1 to 4.0 along with the application
2. Export from 3.1 and import into 4.0 version.

Both the ways we are getting issues

The issues we are getting are:
First method:
1. The reference IDs of fields in tabular form are getting changed and hence the Javascripts are not running.
2. Since the references are changed, the validations have to be re-looked.

We made changes to pick the current reference ids, but still the scripts are not running (not even identified by the system. When we check with Firebug in Firefox, it shows the scripts does not exist/not recognised?!)

Second Method:
1. The reference IDs are changed only for very few.
2. Javascripts are not fully imported by the system and it leaves few scripts. Hence few scripts are missing after import.

We are looking at the causes and appropriate way of moving from 3.1 to 4.0

Could you tell us what we can do?

we have used javascript at the tabular forms in most of our applications.
We are finding it difficult to upgrade because of the javascript.We do not want to rewrite the javascripts there any way out for the same.

Kindly reply.

Dimitri Gielis said...

Hello Kuleena,

Did you use the latest version of APEX 4?

Your behaviour might be linked to the template you are using for the page/report/tabular form. Maybe it is an easy fix if you can get the ID back to how it was.

Hope that helps,

Unknown said...

Thanks for your reply.
We have installed the latest version of APEX ( )
We made changes to pick the current reference ids, but still the scripts are not running (not even identified by the system. When we check with Firebug in Firefox, it shows the scripts does not exist/not recognised?!)

The scripts run in 3.1 without any issues.

In the second method,all the javascript codes are not imported completely.

What could be the reason?

What are the other options for us?

Thanks and Regards,

Dimitri Gielis said...

I don't think I can help you without looking closer into your system.


Anonymous said...

Dimitri, .. what are the knowns issues for migrating from Apex 3 to Apex 4.
Are there still knows issues since there is 4.02?
Because the link in your article does not show any known issues.

Dimitri Gielis said...

It depends how you build your application and how much customisation you did and from which version of APEX (HTMLDB) you started.

Normally the upgrade is without issues, but I always recommend to test, especially your customisations.

Hope that helps,

Anonymous said...


Your blog looks great. I've one question regarding the Export of applications. We have a situation where in Development environment is upgraded to APEX 4.0 and test environment is still on APEX 3.2. We want to move some changes from development environment(APEX 4.0) to test environemnt (APEX3.2). We get version mismatch error. Is ther any way to achieve this?

Dimitri Gielis said...

Taking an export of 4.0 and import in 3.2 will not work. There is no workaround, you can only upgrade test to 4.0 and import will work.


Anonymous said...

Thx for your reply.. I've posted following question on OTN but not received the feedback yet.
The issue is given below

1) We have a Tabular form which is created based on the view
2) We have customized process to be executed after Save action.
3) The Save button works fine for update.
4) The save button does not work fine for Insert as the check box vaue is null in the custom code.
5) The code used is given below to read the form values in the customized code
FOR i IN 1 .. apex_application.g_f01.COUNT
v_checked := TO_NUMBER (apex_application.g_f01 (i));
v_region := apex_application.g_f02 (v_checked);
v_regionname := apex_application.g_f03 (v_checked);
v_daysjan := apex_application.g_f04 (v_checked);
v_daysfeb := apex_application.g_f05 (v_checked);
v_daysmar := apex_application.g_f06 (v_checked);
v_daysapr := apex_application.g_f07 (v_checked);
v_daysmay := apex_application.g_f08 (v_checked);
v_daysjun := apex_application.g_f09 (v_checked);
v_daysjul := apex_application.g_f10 (v_checked);
v_daysaug := apex_application.g_f11 (v_checked);
v_dayssept := apex_application.g_f12 (v_checked);
v_daysoct := apex_application.g_f13 (v_checked);
v_daysnov := apex_application.g_f14 (v_checked);
v_daysdec := apex_application.g_f15 (v_checked);
v_year := apex_application.g_f16 (v_checked);
err_msg := SUBSTR(SQLERRM, 1, 100);
insert into accountformat.log_msg values('Inside error ' || err_msg,'AR ReG',sysdate);


v_checked is returned as zero if we try to Save after Add Row action and populating the required fields.

For Update the v_checked is returned properly for the row to be updated.

We have migrated this application from APEX 3.2 to 4.02 and also updated the form to have javascript:AddRow(); as suggested by the link below

I've tried to use the tabular form API from APEXLIB as well and I do not get the handle of the new row to be added.

FOR ii IN 1 .. ApexLib_TabForm.getRowCount
IF ApexLib_TabForm.hasRowChanged(ii, TRUE)
IF ApexLib_TabForm.isRowSelectorChecked(ii)

isRowSelectorChecked(ii) returns null.

This seems to be a bug as the isRowSelectorChecked(ii) and apex_application.gfxx both return null for selected row which is newly added on the form with Add Row button

Any help in this regard is highly appreciated.

Dimitri Gielis said...

There is an update of the APEXLib framework.

That is not supported by the APEX Development team, but by Peter R.

Anonymous said...

Thx Dimitri..
But the Tabular form does not work without the APEX Lib as well. So I'm not sure how to resolve the issue.