Announcement Announcement Module
Collapse
No announcement yet.
Error creating bean with name 'org.springframework.security.filterChains' Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Error creating bean with name 'org.springframework.security.filterChains'

    I created a new Project with STS, Roo and GWT and tried to include Spring Security.
    Since then i get the following error.

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.security.filterChains': Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL

    Has anyone got an idea what went wrong?!

    Stacktrace:
    Code:
    [INFO] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': Initialization of bean failed; nested exception is java.lang.NoSuchFieldError: NULL
    [INFO] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    [INFO] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    [INFO] 	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    [INFO] 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    [INFO] 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    [INFO] 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    [INFO] 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:567)
    [INFO] 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:913)
    [INFO] 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:464)
    [INFO] 	at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
    [INFO] 	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
    [INFO] 	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
    [INFO] 	at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:543)
    [INFO] 	at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    [INFO] 	at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1220)
    [INFO] 	at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:513)
    [INFO] 	at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
    [INFO] 	at com.google.gwt.dev.shell.jetty.JettyLauncher$WebAppContextWithReload.doStart(JettyLauncher.java:468)
    [INFO] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    [INFO] 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    [INFO] 	at org.mortbay.jetty.handler.RequestLogHandler.doStart(RequestLogHandler.java:115)
    [INFO] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    [INFO] 	at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    [INFO] 	at org.mortbay.jetty.Server.doStart(Server.java:222)
    [INFO] 	at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:39)
    [INFO] 	at com.google.gwt.dev.shell.jetty.JettyLauncher.start(JettyLauncher.java:672)
    [INFO] 	at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
    [INFO] 	at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
    [INFO] 	at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
    [INFO] 	at com.google.gwt.dev.DevMode.main(DevMode.java:311)
    [INFO] Caused by: java.lang.NoSuchFieldError: NULL
    [INFO] 	at org.springframework.expression.TypedValue.<clinit>(TypedValue.java:32)
    [INFO] 	at org.springframework.expression.spel.support.StandardEvaluationContext.setRootObject(StandardEvaluationContext.java:88)
    [INFO] 	at org.springframework.expression.spel.support.StandardEvaluationContext.<init>(StandardEvaluationContext.java:74)
    [INFO] 	at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:124)
    [INFO] 	at org.springframework.beans.factory.support.AbstractBeanFactory.evaluateBeanDefinitionString(AbstractBeanFactory.java:1299)
    [INFO] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.evaluate(BeanDefinitionValueResolver.java:224)
    [INFO] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:311)
    [INFO] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
    [INFO] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:353)
    [INFO] 	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:153)
    [INFO] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1360)
    [INFO] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1118)
    [INFO] 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    [INFO] 	... 29 more
    My web.xml:

    Code:
    <?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    
        
        <display-name>Weltenbrand</display-name>
        
        <description>Roo generated Weltenbrand application</description>
    
        
        <!-- Enable escaping of form submission contents -->
        <context-param>
            <param-name>defaultHtmlEscape</param-name>
            <param-value>true</param-value>
        </context-param>
        
        <context-param>
            <param-name>contextConfigLocation</param-name>
            <param-value>classpath*:META-INF/spring/applicationContext*.xml</param-value>
        </context-param>
        
        
        	<filter>
    	        <filter-name>springSecurityFilterChain</filter-name>
    	        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
    	</filter>
    	 
    	<filter-mapping>
    	      <filter-name>springSecurityFilterChain</filter-name>
    	      <url-pattern>/*</url-pattern>
    	</filter-mapping>
    
    
        
        
        <filter>
            <filter-name>CharacterEncodingFilter</filter-name>
            <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
            <init-param>
                <param-name>encoding</param-name>
                <param-value>UTF-8</param-value>
            </init-param>
            <init-param>
                <param-name>forceEncoding</param-name>
                <param-value>true</param-value>
            </init-param>
        </filter>
        
        
        
        <filter>
            <filter-name>HttpMethodFilter</filter-name>
            <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
        </filter>
        
        <filter>
            <filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
            <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
        </filter>
        <filter-mapping>
            <filter-name>CharacterEncodingFilter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
        
        <filter-mapping>
            <filter-name>HttpMethodFilter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
        
        <filter-mapping>
            <filter-name>Spring OpenEntityManagerInViewFilter</filter-name>
            <url-pattern>/*</url-pattern>
        </filter-mapping>
        
        <!-- Creates the Spring Container shared by all Servlets and Filters -->
        <listener>
            <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>
        
        <!-- Handles Spring requests -->
        <servlet>
            <servlet-name>Weltenbrand</servlet-name>
            <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
            <init-param>
                <param-name>contextConfigLocation</param-name>
                <param-value>WEB-INF/spring/webmvc-config.xml</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
        
        
        
        <servlet>
            <servlet-name>requestFactory</servlet-name>
            <servlet-class>de.roio.weltenbrand.server.CustomRequestFactoryServlet</servlet-class>
        </servlet>
        <servlet-mapping>
            <servlet-name>Weltenbrand</servlet-name>
            <url-pattern>/</url-pattern>
        </servlet-mapping>
        
        
        
        <servlet-mapping>
            <servlet-name>requestFactory</servlet-name>
            <url-pattern>/gwtRequest</url-pattern>
        </servlet-mapping>
        <session-config>
            <session-timeout>10</session-timeout>
        </session-config>
        
    	<servlet>
    	 <servlet-name>authServlet</servlet-name>
    	 <servlet-class>de.roio.weltenbrand.server.authentication.AuthServiceImpl</servlet-class>
    	</servlet>
    	
    	<servlet-mapping>
    	 <servlet-name>authServlet</servlet-name>
    	 <url-pattern>/Weltenbrand/auth</url-pattern>
    	</servlet-mapping>
     
    </web-app>

  • #2
    It looks like a bad Spring configuration or version mismatch (i.e. ensure all the versions of Spring match) of some sort. Can you post your config and your dependencies?
    Last edited by Rob Winch; Jul 12th, 2012, 10:23 AM.

    Comment

    Working...
    X