Hi,
I am trying to integrate Spring and Ajax4jsf. Since Ajax4jsf is an "advanced version" of standard jsf - I assume that I will be able to use jsf-spring for my integration. (The only thing I need - is an access to my spring beans within jsf.)
If I follow directions [link]http://jsf-spring.sourceforge.net/quickstart.shtml[/link], I get the following error
[code]
Exception sending context initialized event to listener instance of class de.mindmatters.faces.spring.context.ContextLoaderListener
java.lang.IllegalStateException: ELResolvers cannot be added after the application initialization is complete.
at com.sun.faces.application.ApplicationImpl.setVariableResolver(ApplicationImpl.java:513)
at de.mindmatters.faces.application.ApplicationImpl.setVariableResolver(ApplicationImpl.java:546)
at de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext.initDelegatingVariableResolver(DefaultFacesWebApplicationContext.java:183)
at de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext.postProcessBeanFactory(DefaultFacesWebApplicationContext.java:195)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:311)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext.refresh(DefaultFacesWebApplicationContext.java:289)
at de.mindmatters.faces.spring.context.ContextLoader.createWebApplicationContext(ContextLoader.java:307)
at de.mindmatters.faces.spring.context.ContextLoader.initWebApplicationContext(ContextLoader.java:161)
at de.mindmatters.faces.spring.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:61)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:121)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:737)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
[/code]
Does anyone know what is the problem?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
which version of the jsf-ri do you use (has nothing to do with ajax4jsf). JSF-Spring is tested against all version up to 1.1_02. Be sure that you do not use a 1.2 implementation because JSF-Spring does not support JSF 1.2 yet.
Regards
Andy
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I am trying to integrate Spring and Ajax4jsf. Since Ajax4jsf is an "advanced version" of standard jsf - I assume that I will be able to use jsf-spring for my integration. (The only thing I need - is an access to my spring beans within jsf.)
If I follow directions [link]http://jsf-spring.sourceforge.net/quickstart.shtml[/link], I get the following error
[code]
Exception sending context initialized event to listener instance of class de.mindmatters.faces.spring.context.ContextLoaderListener
java.lang.IllegalStateException: ELResolvers cannot be added after the application initialization is complete.
at com.sun.faces.application.ApplicationImpl.setVariableResolver(ApplicationImpl.java:513)
at de.mindmatters.faces.application.ApplicationImpl.setVariableResolver(ApplicationImpl.java:546)
at de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext.initDelegatingVariableResolver(DefaultFacesWebApplicationContext.java:183)
at de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext.postProcessBeanFactory(DefaultFacesWebApplicationContext.java:195)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:311)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:156)
at de.mindmatters.faces.spring.context.support.DefaultFacesWebApplicationContext.refresh(DefaultFacesWebApplicationContext.java:289)
at de.mindmatters.faces.spring.context.ContextLoader.createWebApplicationContext(ContextLoader.java:307)
at de.mindmatters.faces.spring.context.ContextLoader.initWebApplicationContext(ContextLoader.java:161)
at de.mindmatters.faces.spring.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:61)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3727)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4162)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:121)
at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:737)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:910)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:873)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:474)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1118)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
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.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
[/code]
Does anyone know what is the problem?
Hello,
which version of the jsf-ri do you use (has nothing to do with ajax4jsf). JSF-Spring is tested against all version up to 1.1_02. Be sure that you do not use a 1.2 implementation because JSF-Spring does not support JSF 1.2 yet.
Regards
Andy
Hi again,
i have checked the sources and you use a 1.2 implementation of JSF. It is not supported yet.