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.util.regex.PatternSyntaxException: Dangling meta character '*' near index 6 /api/** ^

Stack Overflow | shiqin zhang | 4 months ago
  1. 0

    spring boot disable csrf for specific url pattern

    Stack Overflow | 4 months ago | shiqin zhang
    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.util.regex.PatternSyntaxException: Dangling meta character '*' near index 6 /api/** ^
  2. 0

    Java PatternSyntaxException: Illegal repetition on string substitution?

    Stack Overflow | 3 years ago
    java.util.regex.PatternSyntaxException: Illegal repetition near index 0 ${fizz} ^
  3. 0

    Exception when replacing brackets

    Stack Overflow | 2 years ago | Kewitschka
    java.util.regex.PatternSyntaxException: Incorrectly nested parentheses in regexp pattern near index 1: ) ^
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android app crashes when any math parser is included

    Stack Overflow | 3 years ago | John Smith
    java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 1: } ^
  6. 0

    java.util.regex.PatternSyntaxException

    Stack Overflow | 2 years ago | user3211607
    java.util.regex.PatternSyntaxException: Syntax error in regexp pattern near index 1: * ^
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.util.regex.PatternSyntaxException

    Dangling meta character '*' near index 6 /api/** ^

    at java.util.regex.Pattern.error()
  2. Java RT
    Pattern.compile
    1. java.util.regex.Pattern.error(Pattern.java:1955)[na:1.8.0_73]
    2. java.util.regex.Pattern.sequence(Pattern.java:2123)[na:1.8.0_73]
    3. java.util.regex.Pattern.expr(Pattern.java:1996)[na:1.8.0_73]
    4. java.util.regex.Pattern.compile(Pattern.java:1696)[na:1.8.0_73]
    5. java.util.regex.Pattern.<init>(Pattern.java:1351)[na:1.8.0_73]
    6. java.util.regex.Pattern.compile(Pattern.java:1028)[na:1.8.0_73]
    6 frames
  3. org.springframework.security
    RegexRequestMatcher.<init>
    1. org.springframework.security.web.util.matcher.RegexRequestMatcher.<init>(RegexRequestMatcher.java:68)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2. org.springframework.security.web.util.matcher.RegexRequestMatcher.<init>(RegexRequestMatcher.java:52)[spring-security-web-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2 frames
  4. com.hnu.tutorial
    SecurityConfig.configure
    1. com.hnu.tutorial.configs.SecurityConfig$CsrfSecurityRequestMatcher.<init>(SecurityConfig.java:35)[classes/:na]
    2. com.hnu.tutorial.configs.SecurityConfig.configure(SecurityConfig.java:27)[classes/:na]
    2 frames
  5. org.springframework.security
    WebSecurityConfigurerAdapter.init
    1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:199)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:290)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    3. org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:67)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    3 frames
  6. com.hnu.tutorial
    SecurityConfig$$EnhancerBySpringCGLIB$$db9c0de0.init
    1. com.hnu.tutorial.configs.SecurityConfig$$EnhancerBySpringCGLIB$$db9c0de0.init(<generated>)[classes/:na]
    1 frame
  7. org.springframework.security
    WebSecurityConfiguration$$EnhancerBySpringCGLIB$$5dd0484b$$FastClassBySpringCGLIB$$a796ba38.invoke
    1. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:370)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    2. org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:324)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    3. org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    4. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:105)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    5. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$5dd0484b.CGLIB$springSecurityFilterChain$4(<generated>)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    6. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$5dd0484b$$FastClassBySpringCGLIB$$a796ba38.invoke(<generated>)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    6 frames
  8. Spring Core
    MethodProxy.invokeSuper
    1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)[spring-core-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  9. Spring Context
    ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
    1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  10. org.springframework.security
    WebSecurityConfiguration$$EnhancerBySpringCGLIB$$5dd0484b.springSecurityFilterChain
    1. org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$$EnhancerBySpringCGLIB$$5dd0484b.springSecurityFilterChain(<generated>)[spring-security-config-4.0.4.RELEASE.jar:4.0.4.RELEASE]
    1 frame
  11. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_73]
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_73]
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_73]
    4. java.lang.reflect.Method.invoke(Method.java:497)[na:1.8.0_73]
    4 frames
  12. Spring Beans
    AbstractBeanFactory.getBean
    1. org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    5. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    6. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    7. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    8. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    10 frames
  13. Spring Context
    AbstractApplicationContext.getBean
    1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1060)[spring-context-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    1 frame
  14. Spring
    GenericFilterBean.init
    1. org.springframework.web.filter.DelegatingFilterProxy.initDelegate(DelegatingFilterProxy.java:326)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    2. org.springframework.web.filter.DelegatingFilterProxy.initFilterBean(DelegatingFilterProxy.java:235)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3. org.springframework.web.filter.GenericFilterBean.init(GenericFilterBean.java:199)[spring-web-4.2.6.RELEASE.jar:4.2.6.RELEASE]
    3 frames
  15. Glassfish Core
    ContainerBase$StartChild.call
    1. org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)[tomcat-embed-core-8.0.33.jar:8.0.33]
    2. org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:109)[tomcat-embed-core-8.0.33.jar:8.0.33]
    3. org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4658)[tomcat-embed-core-8.0.33.jar:8.0.33]
    4. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5277)[tomcat-embed-core-8.0.33.jar:8.0.33]
    5. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)[tomcat-embed-core-8.0.33.jar:8.0.33]
    6. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)[tomcat-embed-core-8.0.33.jar:8.0.33]
    7. org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)[tomcat-embed-core-8.0.33.jar:8.0.33]
    7 frames
  16. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask.run(FutureTask.java:266)[na:1.8.0_73]
    2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_73]
    3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_73]
    4. java.lang.Thread.run(Thread.java:745)[na:1.8.0_73]
    4 frames