Wednesday, February 14, 2007

Exporting and importing pages in Apex

If you see the following message:
This page was exported from a different application or
from an application in different workspace.
Page cannot be installed in this application.
while trying to install a single page in Oracle ApEx, then check if the following conditions apply to your case:

1. The workspace where the page was exported from, has got a different ID from the workspace where you want to install the page into.
In this case, you can manually change the ID in the export file, you can easily locate it by looking at the parameter p_security_group_id, contained in one of the first lines of the script, as in this case:

This is the source workspace ID (the number will be different of course...). You need to replace this number with your target workspace ID. If you don't know what is the target ID, export a page from your target environment and look for it in the file, as we already did above.

2. Your workspace ID is OK (either the workspace ID is the same for both environments or you just changed it as explained earlier) but you are still getting the message.

Check if the target application is currently selected or if the current application (assuming you have more than one in the same workspace) is a different one.
Let's say that in the Application builder environment you have two applications, one is application 12345 and the other one is 67890.
Now, if 12345 is currently selected (which means that you see this number in the upper right corner of the Application Builder environment, you will not be able to import a page for application 67890, even if the workspace ID is the same.

In order to successfully import a page, you need first to switch to application 67890 and reprocess the imported file. Note that you don't need to upload the file again in the repository, unless you deleted it, the file is still there and all you need to do is to click on the "Install" link.

Needless to say, your page components (underlying tables, LOVs, templates and so on) need to be the same in both environments, otherwise the page won't work correctly.

PS: I hereby decline any responsibility for messing up your environment! ;-)


Paresh said...


Thank you for this great tip.

While importing a page I tried using this procedure to change work space id in exported file and importing. It imported and installed fine. However certain components went missing. (I had to change the app id in the exported file too else it won't import).

I think this is an unsupported feature even in Apex 3.1 or am I missing something?

From Apex 3.1 user guide "When exporting a page, remember that exported pages can only be imported sucessfully if they have the same application ID and workspace ID."


Byte64 said...

Hi Paresh,
as of Apex 3.0 (or was it 2.2? I can't rememeber...) you can copy a page across different applications from within Apex, but as a matter of fact, you can't copy a page across different workspaces.

The tip is meant for typical situations like:
copying a page from an application residing in a production workspace to the same application located in a test workspace having different workspace IDs.

Ideally you'd better to keep the workspace ID the same across different environments (development, test, production) to minimize these situations, but in certain cases it's not always possible.


Anonymous said...

Thank you...this post was very helpful!
- Gregg

Anonymous said...

Thank you so much for your value tips
It Working So good for my case...

yes you can!

Two great ways to help us out with a minimal effort. Click on the Google Plus +1 button above or...
We appreciate your support!

latest articles