Skip to main content

Mysterious error with MyFaces sample app

4 replies [Last post]
cayhorstmann
Offline
Joined: 2003-06-13

I tried deploying the MyFaces sample app and got the following mysterious error message in server.log:

[#|2005-07-27T11:43:37.096-0700|SEVERE|TestAbbrevProductName9.0|org.apache.coyote.tomcat5.CoyoteAdapter|_ThreadID=17;|An exception or error occurred in the container during the request processing
java.lang.NullPointerException
at com.sun.web.security.WebSecurityManager.createWebResourcePermission(WebSecurityManager.java:341)
at com.sun.web.security.WebSecurityManager.hasResourcePermission(WebSecurityManager.java:357)
at com.sun.web.security.RealmAdapter.invokeWebSecurityManager(RealmAdapter.java:573)
at com.sun.web.security.RealmAdapter.preAuthenticateCheck(RealmAdapter.java:831)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:562)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:542)
at com.sun.enterprise.web.WebModule.invoke(WebModule.java:454)

This doesn't sound like a MyFaces bug. (The app works fine in Tomcat, and the error message seems to indicate a NPE in some security check inside the app server.)

To reproduce, download MyFaces-1.0.9 from http://myfaces.apache.org/, unzip and deploy the myfaces-examples.war file in the apps directory. I am using GlassFish build 10.

Where does one report these things so they can get fixed?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
edburns
Offline
Joined: 2004-02-11

Depending on the implementation of MyFaces, the security policy of the app server may need to be updated to allow webapps to read properties files.

Ed (JSR 252 Spec co-lead)

edburns
Offline
Joined: 2004-02-11

Also note that glassfish includes JSF 1.2, so you can either just use that, instead of myfaces, or you may need to remove the jsf jars from the app server's lib directory.

Ed (JSR-252 Spec co-lead)

cayhorstmann
Offline
Joined: 2003-06-13

Well, a funny thing happened on the way to the forum.

I tried using Glassfish with JSF instead of MyFaces, and I got the same error.

Maybe I need to include additional libraries? I am really confused which libraries, if any, I need to include in the WEB-INF/lib directory of my WAR file. Right now, I boldly include none, figuring that a JEE5 compliant app server has it all.

Are all the libraries in the lib directory (javaee.jar, appserv-rt.jar, etc.) accessible to my web apps?

Thanks,

Cay

cayhorstmann
Offline
Joined: 2003-06-13

I just tried it again with build 16, and the error went away. So it wasn't my fault after all :-)