shale-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthias Wuttke (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SHALE-422) NullPointerException if no WEB-INF/lib
Date Thu, 08 Mar 2007 13:45:11 GMT

    [ https://issues.apache.org/struts/browse/SHALE-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40459
] 

Matthias Wuttke commented on SHALE-422:
---------------------------------------

Creating an empty "WEB-INF/lib" folder solves the "symptoms" of this problems.

> NullPointerException if no WEB-INF/lib
> --------------------------------------
>
>                 Key: SHALE-422
>                 URL: https://issues.apache.org/struts/browse/SHALE-422
>             Project: Shale
>          Issue Type: Bug
>          Components: Tiger
>    Affects Versions: 1.0.4
>         Environment: Eclipse 3.1 with Tomcat Launcher Plugin
>            Reporter: Matthias Wuttke
>
> I use the Sysdeo Tomcat Launcher Plugin together with the DevLoaderClasspath extension
in order to debug my application. Because this classpath extension sets the classpath for
Tomcat (including my Maven Repository classpath) I do not need a WEB-INF/lib directory. (In
fact, I do not want to have one on my source path.)
> This causes my application to crash on startup with the following NullPointerException:
> ERROR main org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/teutoFaces]
- Exception sending context initialized event to listener instance of class org.apache.shale.view.faces.LifecycleListener
>  javax.faces.FacesException: java.lang.NullPointerException
> 	at org.apache.shale.tiger.view.faces.LifecycleListener2.contextInitialized(LifecycleListener2.java:276)
> 	at org.apache.shale.view.faces.LifecycleListener.contextInitialized(LifecycleListener.java:138)
> 	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3763)
> 	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4211)
> 	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
> 	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
> 	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
> 	at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
> 	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
> 	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
> 	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
> 	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
> 	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
> 	at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
> 	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
> 	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
> 	at org.apache.catalina.core.StandardService.start(StandardService.java:450)
> 	at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
> 	at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> 	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> Caused by: java.lang.NullPointerException
> 	at org.apache.shale.tiger.view.faces.LifecycleListener2.webArchives(LifecycleListener2.java:1513)
> 	at org.apache.shale.tiger.view.faces.LifecycleListener2.contextInitialized(LifecycleListener2.java:263)
> 	... 25 more
> This corresponds to the following code:
>         List<JarFile> list = new ArrayList<JarFile>();
>         Set<Object> paths = servletContext.getResourcePaths(WEB_LIB_PREFIX);
>         for (Object pathObject : paths) {
> I think a simple "if (paths != null)" should solve this issue.
> Best regards,
> Matthias

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message