500 Internal Server Error   dec 18, 2008  while SSO logout and redirct

While working on a J2EE problem with housing bank, we faced the following error

Servlet error: An exception occurred. The current application deployment
descriptors do not allow for including it in this response. Please
consult the application log for details.

 

The situation arises as follows

We are using OID - SSO based authentication for logging in and logging out of our ADF application (10.1.3.2) running against OC4J 10.1.3

the problem arises when we execute the logout procedure which is similar to

response.setHeader( "Osso-Return-Url", "http://mysite/faces/index.jspx");
response.sendError( 470, "Oracle SSO" ); 
 

The error is not enough to understand what is going on, while at the same time, it is not always the case that you can access the log file


If you want to know the complete error message and stack trace you must deploy the
application in "development" mode. To achieve this you must perform the following:

Suppose you have a JDeveloper Application Server connection named "REALSOFT".
 

bulletRight-click the deployment profile and select "Deploy to REALSOFT"
bulletIn the "Configure Application" dialog box you have the option to edit certain deployment options.
bulletSelect the web-app on the left side of the screen. On the right side of the screen there is an option "development". Set the value to "true" and deploy your application.
 

or

Using Oracle EM Application Server Control (on a standalone OC4J 10.1.3.1.0) in the "Deployment Settings" step while deploying an application
(1) in the "Advanced Deployment Plan Editing" section click the "Edit Deployment Plan" button
(2) in the tree on the left, in the "war" node, select the web-module
(3) on the "Edit OC4J Descriptor" tab, find the "development" property and set it to "true"
(4) click OK

Or you can modify the following file manually

orion-web.xml file. Here is an example:

<?xml version="1.0"?>

<orion-web-app

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/or

ion-web-10_0.xsd"

deployment-version="null"

deployment-time="1152223108413"

jsp-cache-directory="./persistence"

jsp-cache-tlds="standard"

temporary-directory="./temp"

context-root="/DevelopmentThrowException"

schema-major-version="10"

schema-minor-version="0"

development="true">

<!-- Uncomment this element to control web application class loader

behavior. <web-app-class-loader search-local-classes-first="true"

include-war-manifest-class-path="true" />

-->

<web-app>

</web-app>

</orion-web-app>

 

 

After setting the development flag to true and running the application again, the error stack appeared on the screen

 

java.lang.IllegalArgumentException: Invalid input arguments.
at oracle.security.jazn.oc4j.CachingRealmUserManager.getUser(JAZNUserManager.java:4364)
at oracle.security.jazn.oc4j.RealmUserManager.getUser(JAZNUserManager.java:4078)
at oracle.security.jazn.oc4j.FilterUserManager.getUser(JAZNUserManager.java:4808)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0)
].server.http.AJPHttpServletRequest.
 

 

Cause:

 

According to Oracle metalink note 567162.1

 

This is caused by an unpublished Bug:5595387 ADFP APP USING OID+SSO THROWS 500 ERROR


This bug is reporting the same error stack and configuration.
 

Solution

 

To implement the solution, please execute the following steps:

1. Download the 10.1.3.3.0 patchset (or later if available).

6148874 TRACKING BUG: 10.1.3.3 PATCHSET 10.1.3.3.0

2. Following the instructions included with the patchset, install and test

 

workaround

 

If you do not apply the patch, a workaround is to invalidate the current session before redirecting the URL to another session

 

request.getSession(false).invalidate();  // invalidate the session

response.setHeader( "Osso-Return-Url", "http://mysite/faces/index.jspx");
response.sendError( 470, "Oracle SSO" );