APEX-AT-WORK no image

Again import error ORA-02047: cannot join the distributed... (2)

Von Tobias Arnhold 11.07.2008
Hi APEX folks!

Here some new happenings to error:

ORA-20001: GET_BLOCK Error. ORA-20001: Execution of the statement was unsuccessful.
ORA-02047: cannot join the distributed transaction in progress <pre>
begin execute immediate 'alter session set nls_numeric_characters='''||wwv_flow_api.g_nls_numeric_chars||''''; end; </pre>

What happend?
Just like yesterday! When I try to import from test to prod the error ORA-02047 comes up. I did a couple of imports today without problems before.

What did I do this time?
1. Changed the focus at the page:
Home>Application Builder>Application 306>Page 100>Edit Page>Display Attributes>Cursor Focus:
First item on page

2. Add a new Display as Text (does not save state) item without label (no label).

Is there something important to know?
No I didn't changed anything else. Application has just 4 pages!
App ID's just for better understanding:
ID: 105 (production system)
ID: 106 (that is where I develop in)
ID: 107 (another test app for import tests)

Here the results of my invalid objects select statement:

select all invalid object inside the database:
select owner, object_name, object_type from ALL_OBJECTS where status = 'INVALID';
---------------------------------------------------------------------------------
OWNER OBJECT_NAME OBJECT_TYPE
PUBLIC DBA_HIST_FILESTATXS SYNONYM
PUBLIC DBA_HIST_SQLSTAT SYNONYM
PUBLIC DBA_HIST_SQLBIND SYNONYM
PUBLIC DBA_HIST_SYSTEM_EVENT SYNONYM
PUBLIC DBA_HIST_WAITSTAT SYNONYM
PUBLIC DBA_HIST_LATCH SYNONYM
PUBLIC DBA_HIST_LATCH_MISSES_SUMMARY SYNONYM
PUBLIC DBA_HIST_DB_CACHE_ADVICE SYNONYM
PUBLIC DBA_HIST_ROWCACHE_SUMMARY SYNONYM
PUBLIC DBA_HIST_SGASTAT SYNONYM
PUBLIC DBA_HIST_SYSSTAT SYNONYM
PUBLIC DBA_HIST_SYS_TIME_MODEL SYNONYM
PUBLIC DBA_HIST_OSSTAT SYNONYM
PUBLIC DBA_HIST_PARAMETER SYNONYM
PUBLIC DBA_HIST_SEG_STAT SYNONYM
PUBLIC DBA_HIST_ACTIVE_SESS_HISTORY SYNONYM
PUBLIC DBA_HIST_TABLESPACE_STAT SYNONYM
PUBLIC DBA_HIST_SERVICE_STAT SYNONYM
PUBLIC DBA_HIST_SERVICE_WAIT_CLASS SYNONYM
USER PRC_IMPORT_XXX PROCEDURE

Recompiled PRC_IMPORT_XXX from other user.
New try, import into app id 107 instead of 105 > Error occurred again.

Recompiled all invalid objects:

SQL > @utlrp.sql;
---------------------------------------------
PL/SQL-Prozedur erfolgreich abgeschlossen.
...
OBJECTS WITH ERRORS
------------------- 0
0
...
ERRORS DURING RECOMPILATION
--------------------------- 0
0

PL/SQL-Prozedur erfolgreich abgeschlossen.

Now I went on testing:
Made a new export. Import into app id 107 > Error occurred again.
Try to import the last working export into 107 > Error occurred again.
Log out of APEX and restart of Browser (Firefox 3). Start new instance of Firefox.
Go to app 107. Try to import the last working export into 107. Error occurred again.
You could get the feeling to give up by now... I DON'T!!!
Log out of APEX > Log in to other workspace in the same database.
Import a working export I made before > BOOM error occurred again.
By now I could say I just had luck yesterday! :O

What do i know now?
No more invalid objects! No import is possible anymore!

Lets go on:
Restart of OAS Service!
Import of not working export into id 107 > BOAH it worked again
Import of not working export into id 105 (prod app) > It worked too!

What does it mean?
It's not the exported file. Not even an invalid object problem. It doesn't seem to have to do with changes during the development on the application. What is it then?
Maybe it has to do with the PlsqlNLSLanguage I use. The last thing I did with the OAS was to patch to the newest patchset (Oct 2008) without any problems two weeks ago. I restarted the OAS but not the XE database!?

What's next to do?
I will write again if it happens again. I don't hope so but I almost sure that it will happen.

I got a hint from Dietmar to my last post APEX error ORA-20001 and ORA-02047 during application import (1)
I should use the following setting in my dads.conf:

<Location /pls/xe>
PlsqlNLSLanguage GERMAN_GERMANY.AL32UTF8
</Location>

I will try again on Monday!