APACHE STRUTS REQUESTPROCESSOR.GETSERVLETCONTEXT THROWS NULLPOINTEREXCEPTION (Doc ID 1074264.1)

Last updated on JUNE 14, 2016

Applies to:

Oracle Workshop for Weblogic - Version: 10.3 and later   [Release: AS10gR3 and later ]
Information in this document applies to any platform.

Goal

The problem description is discussed below with the scenario steps presented.
Current process:
1- User logon
2- Create user-session (stateful ejb)
3- Save user-session handle in httpsession
4- Access user-session using handle saved in httpsession

When the test is performed on user-session (stateful ejb) timeout, after
user-session stateful timeout, the user involves an action from pageflow (say
Action 1), this action goes through, a user-session stateful
timeout is detected which forwards to the timeout action (say Action 2). However, in
Weblogic 10.3, after executing Action 1 successfully, before it forwards to
Action 2 (timeout action) an exception is thrown in the server (as below).
----------------------------------------
java.io.NotSerializableException:
org.apache.beehive.netui.pageflow.internal.DefaultURLRewriter
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1156)
------------------------------------------

After getting this exception in Weblogic server log, if the user tries to re-login into
application, the application randomly throws the below second exception.

-----------------------------------
java.lang.NullPointerException
at org.apache.struts.action.RequestProcessor.getServletContext(RequestProcessor.java:1140)
at org.apache.beehive.netui.pageflow.PageFlowRequestProcessor.process(PageFlowRequestProcessor.java:786)
----------------------------------

Unless the customer re-cycles Weblogic server, the second exception
is thrown randomly. It seems there may be an instance with null
servlet-context and whenever any process uses this instance, it throws an exception.

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms