2 Replies Latest reply on Mar 11, 2009 10:32 AM by ilya_shaikovsky

    Class cast error with jboss server

      hi in getting this error could any one pls help

      17:45:48,870 ERROR [[/RichFaces-J]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
      java.lang.ClassCastException: com.sun.faces.config.WebConfiguration cannot be cast to com.sun.faces.config.WebConfiguration
      at com.sun.faces.config.WebConfiguration.getInstance(WebConfiguration.java:154)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:145)
      at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:73)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3887)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:4370)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeployInternal(TomcatDeployment.java:352)
      at org.jboss.web.tomcat.service.deployers.TomcatDeployment.performDeploy(TomcatDeployment.java:140)
      at org.jboss.web.deployers.AbstractWarDeployment.start(AbstractWarDeployment.java:459)
      at org.jboss.web.deployers.WebModule.startModule(WebModule.java:118)
      at org.jboss.web.deployers.WebModule.start(WebModule.java:96)
      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.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
      at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:206)
      at $Proxy35.start(Unknown Source)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:42)
      at org.jboss.system.microcontainer.StartStopLifecycleAction.installAction(StartStopLifecycleAction.java:37)
      at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62)
      at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71)
      at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.system.microcontainer.ServiceControllerContext.install(ServiceControllerContext.java:286)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.system.ServiceController.doChange(ServiceController.java:672)
      at org.jboss.system.ServiceController.start(ServiceController.java:444)
      at org.jboss.system.deployers.ServiceDeployer.start(ServiceDeployer.java:146)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:104)
      at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:45)
      at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
      at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
      at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:169)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1285)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1003)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1024)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:944)
      at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
      at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1598)
      at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1062)
      at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
      at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
      at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:627)
      at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:541)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:265)
      at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:143)
      at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:409)
      at org.jboss.Main.boot(Main.java:209)
      at org.jboss.Main$1.run(Main.java:544)
      at java.lang.Thread.run(Unknown Source)
      17:45:48,870 ERROR [StandardContext] Error listenerStart
      17:45:48,870 ERROR [StandardContext] Context [/RichFaces-J] startup failed due to previous errors
      17:45:48,870 ERROR [[/RichFaces-J]] Exception sending context destroyed event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
      java.lang.ClassCastException: com.sun.faces.application.ApplicationAssociate cannot be cast to com.sun.faces.application.ApplicationAssociate
      at com.sun.faces.application.ApplicationAssociate.getInstance(ApplicationAssociate.java:197)
      at com.sun.faces.application.WebappLifecycleListener.getAssociate(WebappLifecycleListener.java:333)
      at com.sun.faces.application.WebappLifecycleListener.handleAttributeEvent(WebappLifecycleListener.java:260)



      im aware that jboss server 5 will be having its own jsf version jars and due to that this problem is
      but im not sure where i need to replace the jars i got the latest jars for JSF 1.2 and i want my jars to be used instead of teh jars with Jboss server...

      How can i do that...?

      Please help


        • 1. Re: Class cast error with jboss server

          i had ggoogled out and came to know that giving this configuration ignores the jars in the server

          <context-param>
          <param-name>org.jboss.jbossfaces.WAR_BUNDLES_JSF_IMPL</param-name>
          <param-value>true</param-value>
          </context-param>


          i made it
          but now i showd up another issue

          19:09:15,089 ERROR [application] JSF1029: The specified InjectionProvider implementation 'org.jboss.web.jsf.integration.injection.JBossDelegatingInjectionProvider' does not implement the InjectionProvider interface.



          could any one pls help me on this

          i made the same application on Weblogic 10 it worked...

          pls help...!!!

          • 2. Re: Class cast error with jboss server
            ilya_shaikovsky

            It works for me with the context param.. Actually I'm using this server during richfaces-demo cases implementation. About the second exception please ask at jboss AS forums.