Can you debug that and tell me why that doesn't happen for you?
Look at Session.init() and Session.visitPageMaps ()
They should walk over all the attributes in the session and what is a pagemap will be get and the session will be set.
johan
On 5/9/06, Roan O'Sullivan
<[EMAIL PROTECTED]> wrote:
I get the same exception. Here is the stack trace:
java.lang.NullPointerException
at wicket.PageMap.visitEntries(Lwicket.PageMap$IVisitor;)V(PageMap.java:574)
at wicket.PageMap.clear()V(PageMap.java :193)
at wicket.PageMap.remove()V(PageMap.java:308)
at wicket.Session.newPageMap(Ljava.lang.String;)Lwicket.PageMap;(Session.java:567)
at wicket.Session.pageMapForName(Ljava.lang.String;Z)Lwicket.PageMap;( Session.java:448)
at wicket.PageMap.forName(Ljava.lang.String;)Lwicket.PageMap;(PageMap.java:166)
at wicket.Page.init()V(Page.java:1153)
at wicket.Page.()V(Page.java:194)
at wicket.markup.html.WebPage .()V(WebPage.java:122)
at wicket.markup.html.pages.ExceptionErrorPage.(Ljava.lang.Throwable;Lwicket.Page;)V(ExceptionErrorPage.java:53)at wicket.markup.html.pages.ExceptionErrorPage.(Ljava.lang.Throwable;Lwicket.Page;)V( ExceptionErrorPage.java:53)
at wicket.request.compound.DefaultExceptionResponseStrategy.respond(Lwicket.RequestCycle;Ljava.lang.RuntimeException;)V(DefaultExceptionResponseStrategy.java:104)
at wicket.request.compound.AbstractCompoundRequestCycleProcessor.respond (Ljava.lang.RuntimeException;Lwicket.RequestCycle;)V(AbstractCompoundRequestCycleProcessor.java:76)
at wicket.RequestCycle.step()V(RequestCycle.java:1000)
at wicket.RequestCycle.steps()V(RequestCycle.java :1034)
at wicket.RequestCycle.request()V(RequestCycle.java:453)
at wicket.protocol.http.WicketServlet.doGet(Ljavax.servlet.http.HttpServletRequest;Ljavax.servlet.http.HttpServletResponse;)V(WicketServlet.java :215)
Having just upgraded I'm at a bit of a loss to offer any solutions. But here are some observations:
- The NPE occurs when trying to forward/redirect to ExceptionErrorPage, so there is some underlying exception
- Session#newPageMap only invokes PageMap#remove when "usedPageMaps.size() >= maxPageMaps"
My problems are also with hot deploy (Weblogic Server 8.1).
________________________________
From: [EMAIL PROTECTED] on behalf of Johan Compagner
Sent: Mon 5/8/2006 6:22 PM
To: [email protected]
Subject: Re: [Wicket-user] page map with hot deploy
that is strange
are you saying that those pagemaps get deployed when a request is happening?
Because all pagemaps gets the session set when the request comes in. (see RequestCycle.prepare() and Session.init())
On 5/9/06, Lusebrink, Scott E CTR DISA GIG-CS <[EMAIL PROTECTED]> wrote:
doing hot deploys on wicket 1.2 projects gives null pointers in pagemap.java. a page will work fine then after a hot deploy going back to the page caused a null pointer on session.getAttributeNames();
I'm not sure what is causing the session to be null but adding this check seemed to fix it. I no longer am getting the null pointer after a hot deploy
Scott
PageMap.java
final void visitEntries(final IVisitor visitor)
{
if(session==null)
{
session = Session.get();
}
...
}
