I am trying to setup a value in my session. IT works the first time I call the action, and breaks the second time.
I get null pointer exception. This code is from my constructor.


       Map session = ActionContext.getContext().getSession();
       if (session.containsKey("InvoiceManager"))
this.invManager = (InvoiceManager) session.get("InvoiceManager");
       else {
           invManager = new InvoiceManager();
           session.put("InvoiceManager", invManager);
       }


Here' the exception:


java.lang.NullPointerException
   at action.InvoiceAction.<init>(InvoiceAction.java:25)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.Class.newInstance0(Class.java:355)
   at java.lang.Class.newInstance(Class.java:308)




Any Idea what's going on ?


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to