org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.RuntimeException: Could not postProcess org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher@725dfe92 of type class org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher

GitHub | bjornharvold | 4 months ago
  1. 0

    MvcMatchers: UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener

    GitHub | 4 months ago | bjornharvold
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springSecurityFilterChain' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.RuntimeException: Could not postProcess org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher@725dfe92 of type class org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher
  2. 0

    GitHub comment 7470#262719707

    GitHub | 2 weeks ago | 383124397
    java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener
  3. 0

    How can I fix this issue?

    GitHub | 2 weeks ago | 383124397
    java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [Tomcat-users] Embedded Tomcat question - Grokbase

    grokbase.com | 1 year ago
    java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener
  6. 0

    dev-tomcat.apache.org - [Bug 55314] Provide option to allow programmatic deployment of server (WebSocket) endpoint at runtime - msg#00984 - Recent Discussion OSDir.com

    osdir.com | 1 year ago
    java.lang.UnsupportedOperationException: Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.addFilter(StandardContext.java:6805) at org.apache.tomcat.websocket.server.WsServerContainer.setServletContext(WsServerContainer.java:132)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.UnsupportedOperationException

      Section 4.4 of the Servlet 3.0 specification does not permit this method to be called from a ServletContextListener that was not defined in web.xml, a web-fragment.xml file nor annotated with @WebListener

      at org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.getServletRegistrations()
    2. Glassfish Core
      StandardContext$NoPluggabilityServletContext.getServletRegistrations
      1. org.apache.catalina.core.StandardContext$NoPluggabilityServletContext.getServletRegistrations(StandardContext.java:6592)[catalina.jar:8.5.4]
      1 frame
    3. org.springframework.security
      MvcRequestMatcher.afterPropertiesSet
      1. org.springframework.security.web.servlet.util.matcher.MvcRequestMatcher.afterPropertiesSet(MvcRequestMatcher.java:128)[spring-security-web-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      1 frame
    4. Spring Beans
      AbstractAutowireCapableBeanFactory.initializeBean
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:399)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3 frames
    5. org.springframework.security
      ExpressionUrlAuthorizationConfigurer$ExpressionInterceptUrlRegistry.mvcMatchers
      1. org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor.postProcess(AutowireBeanFactoryObjectPostProcessor.java:67)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      2. org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry.createMvcMatchers(AbstractRequestMatcherRegistry.java:170)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      3. org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer$ExpressionInterceptUrlRegistry.mvcMatchers(ExpressionUrlAuthorizationConfigurer.java:118)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      4. org.springframework.security.config.annotation.web.configurers.ExpressionUrlAuthorizationConfigurer$ExpressionInterceptUrlRegistry.mvcMatchers(ExpressionUrlAuthorizationConfigurer.java:123)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      4 frames
    6. com.traveliko.platform
      WebSecurityConfig.configure
      1. com.traveliko.platform.server.common.config.WebSecurityConfig.configure(WebSecurityConfig.java:112)[traveliko-server-common-0.0.4-SNAPSHOT.jar:?]
      1 frame
    7. org.springframework.security
      WebSecurityConfigurerAdapter.init
      1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:199)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      2. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:290)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      3. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:69)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      3 frames
    8. com.traveliko.platform
      WebSecurityConfig$$EnhancerBySpringCGLIB$$2fe26c57.init
      1. com.traveliko.platform.server.common.config.WebSecurityConfig$$EnhancerBySpringCGLIB$$2fe26c57.init(<generated>)[traveliko-server-common-0.0.4-SNAPSHOT.jar:?]
      1 frame
    9. org.springframework.security
      WebSecurityConfiguration$$EnhancerBySpringCGLIB$$555d0b10$$FastClassBySpringCGLIB$$a3f9a5eb.invoke
      1. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      2. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      3. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      4. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      5. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$555d0b10.CGLIB$springSecurityFilterChain$0(<generated>)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      6. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$555d0b10$$FastClassBySpringCGLIB$$a3f9a5eb.invoke(<generated>)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      6 frames
    10. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    11. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      1 frame
    12. org.springframework.security
      WebSecurityConfiguration$$EnhancerBySpringCGLIB$$555d0b10.springSecurityFilterChain
      1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$555d0b10.springSecurityFilterChain(<generated>)[spring-security-config-4.1.2.RELEASE.jar:4.1.2.RELEASE]
      1 frame
    13. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0]
      4. java.lang.reflect.Method.invoke(Method.java:483)[?:1.8.0]
      4 frames
    14. Spring Beans
      DefaultListableBeanFactory.preInstantiateSingletons
      1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      11. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      12. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      13. org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:776)[spring-beans-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      13 frames
    15. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:861)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:541)[spring-context-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2 frames
    16. Spring
      ContextLoaderListener.contextInitialized
      1. org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:444)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      2. org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:326)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3. org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)[spring-web-4.3.2.RELEASE.jar:4.3.2.RELEASE]
      3 frames
    17. Glassfish Core
      HostConfig.manageApp
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4714)[catalina.jar:8.5.4]
      2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5178)[catalina.jar:8.5.4]
      3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:152)[catalina.jar:8.5.4]
      4. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)[catalina.jar:8.5.4]
      5. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)[catalina.jar:8.5.4]
      6. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)[catalina.jar:8.5.4]
      7. org.apache.catalina.startup.HostConfig.manageApp(HostConfig.java:1702)[catalina.jar:8.5.4]
      7 frames
    18. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0]
      4. java.lang.reflect.Method.invoke(Method.java:483)[?:1.8.0]
      4 frames
    19. Embedded GlassFish Web
      BaseModelMBean.invoke
      1. org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)[tomcat-coyote.jar:8.5.4]
      1 frame
    20. Java RT
      JmxMBeanServer.invoke
      1. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[?:1.8.0]
      2. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)[?:1.8.0]
      2 frames
    21. Embedded GlassFish Web
      MBeanFactory.createStandardContext
      1. org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:482)[catalina.jar:8.5.4]
      2. org.apache.catalina.mbeans.MBeanFactory.createStandardContext(MBeanFactory.java:431)[catalina.jar:8.5.4]
      2 frames
    22. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0]
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0]
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0]
      4. java.lang.reflect.Method.invoke(Method.java:483)[?:1.8.0]
      4 frames
    23. Embedded GlassFish Web
      BaseModelMBean.invoke
      1. org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300)[tomcat-coyote.jar:8.5.4]
      1 frame
    24. Java RT
      Thread.run
      1. com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)[?:1.8.0]
      2. com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)[?:1.8.0]
      3. javax.management.remote.rmi.RMIConnectionImpl.doOperation(RMIConnectionImpl.java:1466)[?:1.8.0]
      4. javax.management.remote.rmi.RMIConnectionImpl.access$300(RMIConnectionImpl.java:76)[?:1.8.0]
      5. javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(RMIConnectionImpl.java:1307)[?:1.8.0]
      6. javax.management.remote.rmi.RMIConnectionImpl.doPrivilegedOperation(RMIConnectionImpl.java:1399)[?:1.8.0]
      7. javax.management.remote.rmi.RMIConnectionImpl.invoke(RMIConnectionImpl.java:828)[?:1.8.0]
      8. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[?:1.8.0]
      9. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[?:1.8.0]
      10. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[?:1.8.0]
      11. java.lang.reflect.Method.invoke(Method.java:483)[?:1.8.0]
      12. sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:323)[?:1.8.0]
      13. sun.rmi.transport.Transport$1.run(Transport.java:178)[?:1.8.0]
      14. sun.rmi.transport.Transport$1.run(Transport.java:175)[?:1.8.0]
      15. java.security.AccessController.doPrivileged(Native Method)[?:1.8.0]
      16. sun.rmi.transport.Transport.serviceCall(Transport.java:174)[?:1.8.0]
      17. sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:557)[?:1.8.0]
      18. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:812)[?:1.8.0]
      19. sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:671)[?:1.8.0]
      20. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[?:1.8.0]
      21. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[?:1.8.0]
      22. java.lang.Thread.run(Thread.java:744)[?:1.8.0]
      22 frames