geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul McMahan" <>
Subject Re: JNDI lookup in trunk is broken?
Date Thu, 08 Feb 2007 17:30:59 GMT
This is probably due to a change I made last night which introduced
jsf support.  I couldn't get myfaces to work correctly unless it uses
the same classloader as jasper and jstl. Adding it to a webapp's
default env during deployment (like Joe did with jstl) didn't quite
work.  I moved the jasper, jstl, and myfaces deps from the tomcat and
jetty configs to a new config which the tomcat and jetty configs now
depend on.  This is based on the approach Joe and David J. discussed
Besides enabling jsf, another motivation of separating jasper into its
own config is that both tomcat and jetty use it for jsp support.

I suspect that the problem you're seeing is caused by the fact that
jasper's classloader is now a parent of the tomcat/jetty classloader.
 So I think I need to move some dependencies around to make your JSP
work again.   I will try to resolve this quickly, in the mean time I
think your code should work if you precompile your jsp (see how this
is done using the jspc plugin in the welcome app project).  Sorry for
the trouble, getting jsf to work right has been much more complicated
than I expected!

If anyone has any insights or hints on a better way to set up the deps
then my ears are wide open :-)

Best wishes,

On 2/8/07, Jarek Gawor <> wrote:
> From within a JSP, I'm doing:
>             Context ctx = new InitialContext();
>             ctx = (Context) ctx.lookup("java:comp/env");
> and I get:
> Caused by: javax.naming.NamingException [Root exception is
> java.lang.NullPointerException]
>         at javax.naming.spi.NamingManager.getURLObject(
>         at javax.naming.spi.NamingManager.getURLContext(
>         at javax.naming.InitialContext.getURLOrDefaultInitCtx(
>         at javax.naming.InitialContext.lookup(
>         at org.apache.jsp.StaxJSP_jsp._jspService(
>         ... 27 more
> Caused by: java.lang.NullPointerException
>         at
>         at
>         at javax.naming.spi.NamingManager.getURLObject(
>         ... 31 more
> Jarek

View raw message