ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | enhydra List | March 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [enhydra] null pointer exception in requestPostProcessor


Hi,

This (new) code of 'StandardApplication.requestPostProcessor()' method:
--------------------------------------------------------------------
public void requestPostProcessor(HttpPresentationComms comms)
        throws ApplicationException {
        try {
            if (comms.session != null) {
                comms.application.getSessionManager().
                    passivateSession(Thread.currentThread(),
                                     comms.session.getSessionKey());
            }
        } catch (SessionException e) {
            throw new ApplicationException(e);
        }
    }
--------------------------------------------------------------------
is present since Enhydra-5.1-1 (oldest release I've checked)!
So, I'm not sure about CVS version - 2005-01-27 12:32:31 (maybe 'Update
Special' CVS function was used long time ago - check your 'CVS/Entries'
file)!

I sopouse that 'application' attribute of your 'HttpPresentationComms'
object is 'null' and that this is the reason why you are gething this
'NullPointerException' (application must have 'SessionManager' so this can't
be it).

But, I have problem with thinking of scenario in which this could happen!
--------------------------------------------------------------------
Application object is initialized during
'HttpPresentationServlet.initApplication()' method execution. Same method
initializes 'HttpPresentationManager' for that application. Application
object is kept as attribute of HttpPresentationManager (received as
constructor parameter).
In 'HttpPresentationManager.Run()' method 'HttpPresentationComms' (comms)
object gets initialized with 'application' object as its constructor
parameter. Later, from same  'HttpPresentationManager.Run()' method (and
only from here), 'StandardApplication.requestPostProcessor()' method is
referenced.
--------------------------------------------------------------------

I will analyze this problem furtherly and you can (as fastest solution)
overwrite this method from your 'StandardApplication' extension class
(AppClass)!

Regards,
     Slobodan Vujasinovic
Enhydra Development Team


----- Original Message -----
From: "Petr Stehlik" <pstehlik@xxxxxxxxxx>
To: <enhydra@xxxxxxxxxxxxx>
Sent: Wednesday, March 16, 2005 11:57 PM
Subject: Re: [enhydra] null pointer exception in requestPostProcessor


Petr Stehlik píše v St 16. 03. 2005 v 23:00 +0100:
> FYI, I am getting tons of the following errors (not sure when and why),

>
com.lutris.appserver.server.StandardApplication.requestPostProcessor(Unknown
Source)

OK, let's try this:

---
EnhydraAppManager/src/com/lutris/appserver/server/StandardApplication.java.o
rig 2005-01-27 12:32:31.000000000 +0100
+++
EnhydraAppManager/src/com/lutris/appserver/server/StandardApplication.java
2005-03-16 23:44:27.000000000 +0100
@@ -558,10 +558,15 @@
     public void requestPostProcessor(HttpPresentationComms comms)
         throws ApplicationException {
         try {
-            if (comms.session != null) {
-                comms.application.getSessionManager().
-                    passivateSession(Thread.currentThread(),
-                                     comms.session.getSessionKey());
+            if (comms != null) {
+                if (comms.application != null) {
+                    if (comms.application.getSessionManager() != null
+                        && comms.session != null) {
+                            comms.application.getSessionManager().
+
passivateSession(Thread.currentThread(),
+
comms.session.getSessionKey());
+                    }
+                }
             }
         } catch (SessionException e) {
             throw new ApplicationException(e);




----------------------------------------------------------------------------
----


>
> --
> You receive this message as a subscriber of the enhydra@xxxxxxxxxxxxx
mailing list.
> To unsubscribe: mailto:enhydra-unsubscribe@xxxxxxxxxxxxx
> For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>




<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.