0 Replies Latest reply on Apr 25, 2012 11:40 AM by Jason Ingram

    Problem deploying with RichFaces JARs in /server/default/lib folder

    Jason Ingram Newbie

      I'm using JBoss 6.1 Final and RichFaces 4.2.  I was able to deploy fine when adding the RichFaces JARs to the WEB-INF/lib folder in our WAR file, but then some team members complained about the size of the WAR, and we're thinking we may want to use RichFaces in multiple applications.  I tried moving the JARs to jboss-6.1.0.Final/server/default/lib and get the following deployment error/stacktrace...

       

      14:07:06,980 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/TEI]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.confi

      g.JBossMojarra20ConfigureListener: java.lang.NoClassDefFoundError: javax/faces/FacesWrapper

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

              at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_30]

              at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_30]

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              at java.lang.ClassLoader.loadClass(ClassLoader.java:295) [:1.6.0_30]

              at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_30]

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

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

              at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:577) [:2.0.3-]

              at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:468) [:2.0.3-]

              at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135) [:2.0.3-]

              at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:792) [:2.0.3-]

              at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:302) [:2.0.3-]

              at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:290) [:2.0.3-]

              at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:209) [:2.0.3-]

              at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:332) [:2.0.3-]

              at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:220) [:2.0.3-]

              at org.jboss.web.jsf.integration.config.JBossMojarraConfigureListener.contextInitialized(JBossMojarraConfigureListener.java:58) [:1.0.3]

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

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

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

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

              at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:476) [:6.1.0.Final]

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

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

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

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

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

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

              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.SP2]

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

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

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

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

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

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

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

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

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

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

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

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

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.2.GA]

              at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.2.GA]

              at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.2.GA]

              at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.1.0.Final]

              at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:151) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.2.2]

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.SP2]

              at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.SP2]

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

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

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

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

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

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

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

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

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

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.SP2]

              at org.jboss.profileservice.dependency.ProfileActivationWrapper$BasicProfileActivation.start(ProfileActivationWrapper.java:190) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationWrapper.start(ProfileActivationWrapper.java:87) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationService.activateProfile(ProfileActivationService.java:215) [:0.2.2]

              at org.jboss.profileservice.dependency.ProfileActivationService.activate(ProfileActivationService.java:159) [:0.2.2]

              at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:112) [:0.2.2]

              at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:87) [:0.2.2]

              at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:91) [:0.2.2]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:132) [:6.1.0.Final]

              at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.1.0.Final]

              at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

              at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-6]

              at java.lang.Thread.run(Thread.java:662) [:1.6.0_30]

      Caused by: java.lang.ClassNotFoundException: javax.faces.FacesWrapper

              at java.net.URLClassLoader$1.run(URLClassLoader.java:202) [:1.6.0_30]

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

              at java.net.URLClassLoader.findClass(URLClassLoader.java:190) [:1.6.0_30]

              at java.lang.ClassLoader.loadClass(ClassLoader.java:306) [:1.6.0_30]

              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) [:1.6.0_30]

              at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_30]

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

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

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

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

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

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

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

              at java.lang.ClassLoader.loadClass(ClassLoader.java:247) [:1.6.0_30]

              ... 98 more

       

      We're using ANT as our build tool with the following classpath...

       

        <path id="classpath.base">

          <pathelement location="${jboss.home.dir}/client/log4j-1.2.16.jar" />

          <pathelement location="${jboss.home.dir}/server/default/deployers/jsf.deployer/Mojarra-2.0/jsf-libs/jsf-api-2.0.3-b05.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/commons-io-2.1.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/commons-fileupload-1.2.2.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/mysql-connector-java-5.1.14-bin.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/commons-math-2.2.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/im4java-1.2.1-1.5.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/icu4j-4_8_1_1.jar" />

          <pathelement location="${jboss.home.dir}/lib/jbosssx.jar" />

          <pathelement location="${jboss.home.dir}/client/jboss-servlet-api_3.0_spec.jar" />

          <pathelement location="${jboss.home.dir}/client/jboss-transaction-api_1.1_spec.jar" />

          <pathelement location="${jboss.home.dir}/client/jboss-annotations-api_1.1_spec.jar" />

          <pathelement location="${jboss.home.dir}/client/jboss-ejb-api_3.1_spec.jar" />

          <pathelement location="${jboss.home.dir}/client/hibernate-jpa-2.0-api.jar" />

          <pathelement location="${jboss.home.dir}/client/javax.inject.jar" />

          <pathelement location="${jboss.home.dir}/client/jboss-el-api_2.2_spec.jar" />

          <pathelement location="${jboss.home.dir}/client/cdi-api.jar" />

          <pathelement location="${jboss.home.dir}/client/jboss-ejb3-ext-api.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/cssparser-0.9.5.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/guava-r08.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/richfaces-components-api-4.2.0.Final.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/richfaces-components-ui-4.2.0.Final.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/richfaces-core-api-4.2.0.Final.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/richfaces-core-impl-4.2.0.Final.jar" />

          <pathelement location="${jboss.home.dir}/server/default/lib/sac-1.3.jar" />

        </path>

       

      Any help/information is greatly appreciated.

       

      Thanks,

      Jason