Announcement Announcement Module
Collapse
No announcement yet.
Deployment to JBoss AS 6.0.0.Final Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Deployment to JBoss AS 6.0.0.Final

    I have been developing a web application and deploying it to tomcat for a couple of months.

    I now need to deploy the same web application to JBoss AS 6 and an unable to get past a particular exception (see below).

    The technology stack includes Spring, Spring Web Flow and RichFaces.

    The exception itself is not very informative so I'm not sure if exception detail is being swallowed?

    I have made a war available that replicates the problem.

    Code:
    11:17:07,168 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/web]] Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener: com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! org.springframew
            at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:214) [:1.2_15-20100816-SNAPSHOT]
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:200) [:1.2_15-20100816-SNAPSHOT]
            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_21]
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_21]
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
            at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
            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]
            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.GA]
            at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.GA]
            at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.GA]
            at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.GA]
            at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar: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.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.GA]
            at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.GA]
            at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.GA]
            at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.GA]
            at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.Final]
            at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:143) [:0.2.2]
            at org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:98) [:0.2.2]
    ...
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_21]
            at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
            at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)
            at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [:1.6.0_21]
            at java.util.concurrent.FutureTask.run(FutureTask.java:138) [:1.6.0_21]
            at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_21]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_21]
            at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
    Caused by: java.lang.InstantiationException: org.springframework.faces.webflow.FlowApplicationFactory
            at java.lang.Class.newInstance0(Class.java:340) [:1.6.0_21]
            at java.lang.Class.newInstance(Class.java:308) [:1.6.0_21]
            at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:537) [:1.2_15-20100816-SNAPSHOT]
            at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:386) [:1.2_15-20100816-SNAPSHOT]
            at javax.faces.FactoryFinder.access$400(FactoryFinder.java:135) [:1.2_15-20100816-SNAPSHOT]
            at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:717) [:1.2_15-20100816-SNAPSHOT]
            at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:239) [:1.2_15-20100816-SNAPSHOT]
            at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:187) [:1.2_15-20100816-SNAPSHOT]
            at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:132) [:1.2_15-20100816-SNAPSHOT]
            at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:204) [:1.2_15-20100816-SNAPSHOT]
            ... 88 more

  • #2
    I should also have said, i have already removed common libraries such and configured JSF as per the JBoss documentation.

    Comment


    • #3
      Ok. I debugged the source and I'll try to explain what I am seeing.

      The FactoryFinder attempts to create the org.springframework.faces.webflow.FlowApplicationF actory which does not have a default constructor and hence the InstantiationException.

      org.springframework.faces.webflow.FlowApplicationF actory has a constructor that accepts a javax.faces.application.ApplicationFactory and so I suspect that it should not have been the first factory loaded.

      I am specifying 1.2 via the context parameter

      Code:
       
      <context-param>
        <param-name>org.jboss.jbossfaces.JSF_CONFIG_NAME</param-name>
        <param-value>Mojarra-1.2</param-value>
      </context-param>
      Of the jars in the classpath, only Spring-Faces defines an ApplicationFactory. My expectation would be that the Mojarra ApplicationFactory would be created first, then the Spring-Faces ApplicationFactory would decorate this?

      Comment

      Working...
      X