1 Reply Latest reply on Feb 4, 2011 8:11 PM by Stan Silvert

    jsf.deployer MyFaces 2.0 fails

    Robert Gary Newbie

      I'm trying to understand why I cannot use the jsf.deployer mechanism in JBoss AS 6 to use MyFaces-2.0, but I can use the same myfaces libraries directly in my application's deployment successfully.

       

       

       

      I'm running JBoss 6.0.0.Final

       

      If I set my web.xml to say...

          <context-param>

              <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>

              <param-value>true</param-value>

          </context-param>

       

      and then copy the JSF jars from the jsf.deployer into my deployment libs JBoss starts successfully.

       

      However, if instead I set my web.xml to say

          <context-param>

                <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>

                <param-value>MyFaces-2.0</param-value>

           </context-param>

      and remove any JSF libraries from my application's deployment, it fails with...

       

       

       

      15:35:32,133 ERROR [[/]] Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener: java.lang.NoClassDefFoundError: javax/faces/application/NavigationHandler

          at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_20]

          at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632) [:1.6.0_20]

          at java.lang.ClassLoader.defineClass(ClassLoader.java:616) [:1.6.0_20]

          at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:650) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:609) [jboss-classloader.jar:2.2.0.GA]

          at java.security.AccessController.doPrivileged(Native Method) [:1.6.0_20]

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:608) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:585) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:156) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.filter.FilteredDelegateLoader.doLoadClass(FilteredDelegateLoader.java:141) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:132) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:461) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:262) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:161) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:260) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1152) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:886) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:505) [jboss-classloader.jar:2.2.0.GA]

          at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:450) [jboss-classloader.jar:2.2.0.GA]

          at java.lang.ClassLoader.loadClass(ClassLoader.java:296) [:1.6.0_20]

          at java.lang.ClassLoader.loadClass(ClassLoader.java:248) [:1.6.0_20]

          at java.lang.Class.forName0(Native Method) [:1.6.0_20]

          at java.lang.Class.forName(Class.java:247) [:1.6.0_20]

          at org.apache.myfaces.shared_impl.util.ClassUtils.classForName(ClassUtils.java:178) [:2.0.1]

          at org.apache.myfaces.shared_impl.util.ClassUtils.simpleClassForName(ClassUtils.java:204) [:2.0.1]

          at org.apache.myfaces.config.FacesConfigurator.getApplicationObject(FacesConfigurator.java:2132) [:2.0.1]

          at org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:1910) [:2.0.1]

          at org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:525) [:2.0.1]

          at org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:246) [:2.0.1]

          at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73) [:2.0.1]

          at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:116) [:2.0.1]

          at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:106) [:2.0.1]

          at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3369) [:6.0.0.Final]

          at org.apache.catalina.core.StandardContext.start(StandardContext.java:3828) [:6.0.0.Final]

          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:294) [:6.0.0.Final]

          at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:146) [:6.0.0.Final]

          at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:477) [:6.0.0.Final]

          at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118) [:6.0.0.Final]

          at org.jboss.web.deployers.WebModule.start(WebModule.java:95) [:6.0.0.Final]

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_20]

          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_20]

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_20]

          at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_20]

          at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157) [:6.0.0.GA]

          at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96) [:6.0.0.GA]

          at org.jboss.mx.server.Invocation.invoke(Invocation.java:88) [:6.0.0.GA]

          at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:271) [:6.0.0.GA]

          at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:670) [:6.0.0.GA]

          at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206) [:2.2.0.GA]

          at $Proxy41.start(Unknown Source)    at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:53) [:2.2.0.GA]

          at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:41) [:2.2.0.GA]

          at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:301) [:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.GA]

          at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.GA]

       

      (I've also set

          <context-param>

           <param-name>javax.faces.DISABLE_FACELET_JSF_VIEWHANDLER</param-name>

           <param-value>true</param-value>

      </context-param>

      because I'm using RichFaces 3.3.3)

       

      -Robert