Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

What happens with RAISE_APPLICATION_ERROR in APEX

56977Aug 26 2010 — edited Aug 30 2010
Hallo everybody


I have made a database trigger on servererror which inserts every error into an error table.

It works fine with every tool like sqlplus, jdev and so on except APEX (strangly it works

with APEX in one case).


I have create on Submit processes which call procedures in a database package. This

procedures raise an user-defined exception. The error messages are displayed on the error

page of the application, but no errors are logged.

So I have made an exception in the on-submit processes calling RAISE_APPLICATION_ERROR. The

RAISE_APPLICATION_ERROR is called, you can see it on the error page, but no errors are

logged.

The only case when it works and an error is logged is by calling the logout procedure. The

logout-procedure call WWV_FLOW_COLLECTION.DELETE_ALL_COLLECTIONS_SESSION (it works)
then removes the cookie (it works)
then call WWV_FLOW_CUSTOM_AUTH_STD.LOGOUT (it works)
then set HTMLDB_APPLICATION.G_UNRECOVERABLE_ERROR:= true; (it works)

then the procedure calls SYS.DBMS_SESSION.CLEAR_ALL_CONTEXT and raises the error "ORA-01031:

insufficient privileges"

This error is logged into the error table. But I don't know why and why the error is raised.

The privilege EXECUTE ON DBMS_SESSION is given to ANONYMOUS and to PUBLIC. .Setting the

context in the vpd-part of the apex-application calling SYS.DBMS_SESSION.SET_CONTEXT works

fine and raises no error.

Does anybody have any suggestions why and which privileges are missing?

I'm using APEX 4.1 and Oracle XE

Thanks a lot
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 27 2010
Added on Aug 26 2010
8 comments
3,176 views