[ jetty-Bugs-1143911 ] JSF (1_1_01) Faces Servlet - NullPointerException on init

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ jetty-Bugs-1143911 ] JSF (1_1_01) Faces Servlet - NullPointerException on init

SourceForge.net
Bugs item #1143911, was opened at 2005-02-18 16:46
Message generated for change (Settings changed) made by gregwilkins
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1143911&group_id=7322

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Mike Traum (mtraum)
Assigned to: Greg Wilkins (gregwilkins)
Summary: JSF (1_1_01) Faces Servlet - NullPointerException on init

Initial Comment:
On Jetty 5.1.2.

This has been tested on the jsf-cardemo packaged with
JSF 1.1.01. If I add the following lines to web.xml, it
works:
<listener>
<listener-class>
com.sun.faces.config.ConfigureListener
</listener-class>
</listener>

This webapp works fine without modification on Resin
3.x,Tomcat 4.x, and Tomcat 5.x.

Here's the stack trace of init's NPE:
11:14:36.176 WARN!! [main]
org.mortbay.jetty.Server.main(Server.java:438) >08>
EXCEPTION
org.mortbay.util.MultiException[java.lang.NullPointerException]
        at
org.mortbay.http.HttpServer.doStart(HttpServer.java:673)
        at
org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.jetty.Server.main(Server.java:433)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.mortbay.start.Main.invokeMain(Main.java:151)
        at org.mortbay.start.Main.start(Main.java:480)
        at org.mortbay.start.Main.main(Main.java:94)
java.lang.NullPointerException
        at
javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
        at
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
       at
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:445)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:323)
        at
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:512)
        at
org.mortbay.util.Container.start(Container.java:72)
        at
org.mortbay.http.HttpServer.doStart(HttpServer.java:695)
        at
org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.jetty.Server.main(Server.java:433)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.mortbay.start.Main.invokeMain(Main.java:151)
        at org.mortbay.start.Main.start(Main.java:480)
        at org.mortbay.start.Main.main(Main.java:94)
[0]=java.lang.NullPointerException
        at
javax.faces.webapp.FacesServlet.init(FacesServlet.java:144)
        at
org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:383)
        at
org.mortbay.jetty.servlet.ServletHolder.start(ServletHolder.java:243)
       at
org.mortbay.jetty.servlet.ServletHandler.initializeServlets(ServletHandler.java:445)
        at
org.mortbay.jetty.servlet.WebApplicationHandler.initializeServlets(WebApplicationHandler.java:323)
        at
org.mortbay.jetty.servlet.WebApplicationContext.doStart(WebApplicationContext.java:512)
        at
org.mortbay.util.Container.start(Container.java:72)
        at
org.mortbay.http.HttpServer.doStart(HttpServer.java:695)
        at
org.mortbay.util.Container.start(Container.java:72)
        at org.mortbay.jetty.Server.main(Server.java:433)
        at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.mortbay.start.Main.invokeMain(Main.java:151)
        at org.mortbay.start.Main.start(Main.java:480)
        at org.mortbay.start.Main.main(Main.java:94)


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

Comment By: Mike Traum (mtraum)
Date: 2005-02-21 22:19

Message:
Logged In: YES
user_id=407536

I just tried against cvs head, and it didn't work. But, it
also didn't contian TagLibConfiguration.java. So, I'm
assumming sourceforge still has that delay updates to
anonymous access to their CVS?

Anyway, I don't really have more time to test this - sorry.
I don't use Jetty - I was just doing some cross-platform
testing. I was testing simply by deploying the
jsf-cardemo.war that's bundled with JSF RI 1.1.01.

Thanks.
Mike


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

Comment By: Greg Wilkins (gregwilkins)
Date: 2005-02-21 18:57

Message:
Logged In: YES
user_id=44062


I have just checked in a fix the CVS.
This is a TagLibConfiguration class that searches for tld in
web.xml, WEB-INF /*.tld and WEB-INF/lib/*.jar!/META-INF/*.tld.

What a horrid breach of encapsulation!!!  I bet tapestry or
cocoon would like the container to search their configs for
special case configuration!!!
I wouldn't mind if it was a generic mechanism, but this is
JSP only approach!

Anyway, enough of a rant...  could you test CVS head before
I make a release?  

thanks




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

Comment By: Greg Wilkins (gregwilkins)
Date: 2005-02-21 09:08

Message:
Logged In: YES
user_id=44062

OK - I got that description.   Mmmmm  it is a JSP thing and
Jetty just uses
Jasper from tomcat to JSP.   But then I don't actually see
how the jasper
servlet could add a listener from it's own description.

So I'd call this a bug in the JSP/J2EE spec!  An example of
how the way
the specs have been linked together allows one JSR to force
behavour on
another....  But I know that arguement is unlikely to
wash.... So I
will look at handling TLD listeners directly in Jetty...
anything for the
favoured son of J2EE :-)



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

Comment By: Mike Traum (mtraum)
Date: 2005-02-21 00:21

Message:
Logged In: YES
user_id=407536

Actually, the fact that people were seeing this issue in
other containers (Tomcat 4, Tomcat 5, and Resin 3) and now
the other containers work is what made me guess this is a
Jetty issue and not a problem with JSF.

Unfortunately, I've been unable to find descriptive bug
reports in their reporting systems to explain the issue.
But, if you look at this:
http://forum.java.sun.com/thread.jspa?threadID=476773&tstart=0

And locate Craig McClanahan's posting (as I'm sure you know,
a very knowledgeable person), I think you'll see that this
issue is a Jetty bug.


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

Comment By: Greg Wilkins (gregwilkins)
Date: 2005-02-20 19:43

Message:
Logged In: YES
user_id=44062


No idea sorry....  The NPE is in JSF, so I suggest that you
raise the bug
on them.   Or at least ask them to provide the source code
for line 144?
Better still - ask them to open source JSF!!

I've seen reports that the listener is also required on tomcat:
http://forum.java.sun.com/thread.jspa?threadID=501578&messageID=2377253

I'll try to find an appropriate forum/list to post a request
to also...


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

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=107322&aid=1143911&group_id=7322


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
jetty-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-discuss