8 Replies Latest reply on Aug 8, 2007 10:03 AM by zdaler

    Startup exception: Ajax4jsfFilter

    amayen

      Hi!

      I have a problem since migrating to SEAM 2.0.

      When I start up my Webapp i get the following error.


      00:27:12,890 INFO [Contexts] starting up: org.jboss.seam.web.ajax4jsfFilter
      00:27:12,921 ERROR [[/xxxxx]] Exception sending context initialized event to listener instance of class org.jboss.seam.servlet.SeamListener
      java.lang.RuntimeException: exception invoking: create
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:134)
       at org.jboss.seam.Component.callComponentMethod(Component.java:2067)
       at org.jboss.seam.Component.callCreateMethod(Component.java:1990)
       at org.jboss.seam.Component.newInstance(Component.java:1961)
       at org.jboss.seam.contexts.Contexts.startup(Contexts.java:304)
       at org.jboss.seam.contexts.Contexts.startup(Contexts.java:278)
       at org.jboss.seam.contexts.ServletLifecycle.endInitialization(ServletLifecycle.java:95)
       at org.jboss.seam.init.Initialization.init(Initialization.java:533)
       at org.jboss.seam.servlet.SeamListener.contextInitialized(SeamListener.java:34)
       at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3854)
       at org.apache.catalina.core.StandardContext.start(StandardContext.java:4359)
       at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:761)
       at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:741)
       at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:553)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.apache.catalina.core.StandardContext.init(StandardContext.java:5310)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:297)
       at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal(TomcatDeployer.java:301)
       at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(TomcatDeployer.java:104)
       at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:375)
       at org.jboss.web.WebModule.startModule(WebModule.java:83)
       at org.jboss.web.WebModule.startService(WebModule.java:61)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
       at sun.reflect.GeneratedMethodAccessor593.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
       at $Proxy0.start(Unknown Source)
       at org.jboss.system.ServiceController.start(ServiceController.java:417)
       at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy45.start(Unknown Source)
       at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:466)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
       at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:93)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       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:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy46.start(Unknown Source)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
       at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
       at sun.reflect.GeneratedMethodAccessor19.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       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:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy9.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
       at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
       ... 98 more
      Caused by: java.lang.IllegalAccessError: tried to access field org.jboss.seam.web.Ajax4jsfFilter.delegate from class org.jboss.seam.ui.filter.Ajax4jsfFilter
       at org.jboss.seam.ui.filter.Ajax4jsfFilter.create(Ajax4jsfFilter.java:78)
       ... 104 more


      I used the ajax4jsf-1.1.1 JAR and build the jboss-seam.jar from sources which i downloaded 2 hours ago (about 22:00 ).

      It seems that there exists an incompatibility between the seam code and the ajax4jsf code but i'm not sure.

      Maybe someone can confirm this.

      Thanks in advance!

        • 1. Re: Startup exception: Ajax4jsfFilter
          stu2

          Yeah, I hit the same thing not long ago. Look carefully at the package names:

          tried to access field org.jboss.seam.web.Ajax4jsfFilter.del
          egate from class org.jboss.seam.ui.filter.Ajax4jsfFilter.


          I don't remember the exact fix, but I think it was that I referred to the wrong filter in one of the config files. Regardless the above is probably the clue you want to follow though.

          • 2. Re: Startup exception: Ajax4jsfFilter
            damianharvey

            Read the seam2migration.txt file that is in the root of the Seam distribution. One of the lines there states:

            * remove the Ajax4JSF filter and mappings

            When I followed that migration guide my app was fine (apart from problems with conversations that is still outstanding.)

            Cheers,

            Damian.

            • 3. Re: Startup exception: Ajax4jsfFilter
              atao

              After updating one hour ago, I get now the same exception.
              I don't think it's about declaration of Ajax4JSF filter in web.xml as:
              - i was already working with Seam 2 cvs but updated may be 10 days ago
              - there is no Ajax4JSF filter in the project web.xml, and this since i work with seam 2

              So...

              • 4. Re: Startup exception: Ajax4jsfFilter
                amayen

                First of all, thanks for the replies!

                I'm also not convinced that my problems are based on ajax configuration,
                since I removed them all from the xml's.

                If I change the delegate member accessibility to protected, the error goes away (There comes a different error for me though which I did not had the time yet to resolve).

                Maybe one of the developers could take a look at this, as it seams to me that the problem is the access modifier of the class member

                org.jboss.seam.web.Ajax4jsfFilter.delegate
                (which probably should'nt be private).

                Thanks again

                • 5. Re: Startup exception: Ajax4jsfFilter
                  atao

                  I rebuild from the start my project with seam-gen, and now it's ok.
                  So it must be a mess with an old library or some configuration parameter...

                  • 6. Re: Startup exception: Ajax4jsfFilter
                    zdaler

                    After updating seam jars to current CVS, I'm hitting the same pb ...

                    Anybody solved that one ?

                    • 7. Re: Startup exception: Ajax4jsfFilter
                      pmuir

                      You need to do an ant clean build. You should always do this before reporting problems with CVS.

                      • 8. Re: Startup exception: Ajax4jsfFilter
                        zdaler

                        oops, clean solved it as you sayed, sorry ...