I figured out how to setup logging it was easy. I was trying to load the markup HTML from a jar file:

12-22 12:18:32 [DEBUG] [UrlResourceStream] - cannot convert url: jar:file:/export/webapps/mycompany.com/web/ROOT/WEB-INF/lib/com.mycompany.newscomments.jar!/com/mycompany/newscomments/CommentHomePage.html to file (URI is not hierarchical), falling back to the inputstream for polling 12-22 12:18:32 [DEBUG] [MarkupCache] - Loading markup from jar:file:/export/webapps/mycompany.com/web/ROOT/WEB-INF/lib/com.mycompany.newscomments.jar!/com/mycompany/newscomments/CommentHomePage.html
12-22 12:18:33 [ERROR] [RequestCycle] -
java.lang.NullPointerException
       at wicket.markup.parser.XmlPullParser.parse(XmlPullParser.java:390)
       at wicket.markup.MarkupParser.readAndParse(MarkupParser.java:196)
       at wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:279)
at wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:354)
       at wicket.markup.MarkupCache.getMarkup(MarkupCache.java:198)
       at wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:106)
at wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:827)
       at wicket.markup.html.WebPage.commonInit(WebPage.java:235)
       at wicket.markup.html.WebPage.<init>(WebPage.java:120)
at com.mycompany.newscomments.CommentHomePage.<init>(CommentHomePage.java:27)
...

Once I moved the markup file out of the jar and into WEB-INF/classes, the problem went away. Is there any way to keep them in the jar file without getting this error?

-August



Johan Compagner wrote:
can you check for us why that is null in your case?
All those exceptions are logged just make sure you have the right logging.properties johan


On 12/22/06, *August Detlefsen* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    I am getting a NullPointerException when I try to visit the home
    page of
    my web application. Root cause:

    java.lang.NullPointerException
    at wicket.markup.parser.XmlPullParser.parse(XmlPullParser.java:390)
    at wicket.markup.MarkupParser.readAndParse(MarkupParser.java:196)
    at wicket.markup.MarkupCache.loadMarkup (MarkupCache.java:279)
    at
    wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:354)
    at wicket.markup.MarkupCache.getMarkup(MarkupCache.java:198)
    at wicket.markup.MarkupCache.getMarkupStream( MarkupCache.java:106)
    at
    wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:827)
    at wicket.markup.html.WebPage.commonInit(WebPage.java:235)
    at wicket.markup.html.WebPage.<init>(WebPage.java :120)
    at
    com.mycompany.newscomments.CommentHomePage.<init>(CommentHomePage.java:27)
    ...

    I traced it back to the parse method in XmlPullParser, specifically
    where the xmlReader is closed in the finally block:

    finally
                   {
                           resource.close();
                           this.xmlReader.close();
                   }

    I think this exception can be avoided by changing:

       this.xmlReader.close ();

    to:

       if (this.xmlReader != null) this.xmlReader.close();

    However, what is causing the xmlReader object to be null?

    Is there a way to redirect these errors to a log file instead of
    displaying them on screen?

    Thanks,
    August


    -------------------------------------------------------------------------
    Take Surveys. Earn Cash. Influence the Future of IT
    Join SourceForge.net's Techsay panel and you'll get the chance to
    share your
    opinions on IT & business topics through brief surveys - and earn cash
    http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
    <http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV>
    _______________________________________________
    Wicket-user mailing list
    Wicket-user@lists.sourceforge.net
    <mailto:Wicket-user@lists.sourceforge.net>
    https://lists.sourceforge.net/lists/listinfo/wicket-user



--
August Detlefsen
CEO/Web Application Architect
CodeMagi, Inc. 510-368-4489 tel
510-336-9434 fax
http://www.codemagi.com

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to