Closed xuxiaowei-com-cn closed 2 years ago
"D:\Program Files\dragonwell-17.0.3.0.3+7-GA\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63499,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\xuxiaowei\AppData\Local\JetBrains\IntelliJIdea2022.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "D:\IdeaProjects\oauth2.1\authorization-server\target\classes;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-web\3.0.0-M3\spring-boot-starter-web-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter\3.0.0-M3\spring-boot-starter-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot\3.0.0-M3\spring-boot-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-autoconfigure\3.0.0-M3\spring-boot-autoconfigure-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-logging\3.0.0-M3\spring-boot-starter-logging-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\Apache\apache-maven-3.6.3-repo\jakarta\annotation\jakarta.annotation-api\2.0.0\jakarta.annotation-api-2.0.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-json\3.0.0-M3\spring-boot-starter-json-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-tomcat\3.0.0-M3\spring-boot-starter-tomcat-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-core\10.0.21\tomcat-embed-core-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-el\10.0.21\tomcat-embed-el-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-websocket\10.0.21\tomcat-embed-websocket-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-web\6.0.0-M4\spring-web-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-beans\6.0.0-M4\spring-beans-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-webmvc\6.0.0-M4\spring-webmvc-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-aop\6.0.0-M4\spring-aop-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-context\6.0.0-M4\spring-context-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-expression\6.0.0-M4\spring-expression-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-authorization-server\0.3.0\spring-security-oauth2-authorization-server-0.3.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-config\6.0.0-M5\spring-security-config-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-core\6.0.0-M5\spring-security-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-crypto\6.0.0-M5\spring-security-crypto-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-web\6.0.0-M5\spring-security-web-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-core\6.0.0-M5\spring-security-oauth2-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-jose\6.0.0-M5\spring-security-oauth2-jose-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-resource-server\6.0.0-M5\spring-security-oauth2-resource-server-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-core\6.0.0-M4\spring-core-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-jcl\6.0.0-M4\spring-jcl-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\com\nimbusds\nimbus-jose-jwt\9.22\nimbus-jose-jwt-9.22.jar;D:\Apache\apache-maven-3.6.3-repo\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\Program Files\JetBrains\ideaIU-2022.1.1.win\lib\idea_rt.jar" cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Connected to the target VM, address: '127.0.0.1:63499', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.0-M3)
2022-05-30 13:06:42.780 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Starting AuthorizationServerApplication using Java 17.0.3 on DESKTOP-8E6LUNV with PID 11508 (D:\IdeaProjects\oauth2.1\authorization-server\target\classes started by xuxiaowei in D:\IdeaProjects\oauth2.1)
-2022-05-30 13:06:42.785 -DEBUG 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Running with Spring Boot v3.0.0-M3, Spring v6.0.0-M4
-2022-05-30 13:06:42.788 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : No active profile set, falling back to 1 default profile: "default"
-2022-05-30 13:06:43.688 - INFO 11508 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : : : : Tomcat initialized with port(s): 1301 (http)
-2022-05-30 13:06:43.698 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Starting service [Tomcat]
-2022-05-30 13:06:43.699 - INFO 11508 --- [ main] org.apache.catalina.core.StandardEngine : : : : Starting Servlet engine: [Apache Tomcat/10.0.21]
-2022-05-30 13:06:43.782 - INFO 11508 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : : : : Initializing Spring embedded WebApplicationContext
-2022-05-30 13:06:43.782 - INFO 11508 --- [ main] w.s.c.ServletWebServerApplicationContext : : : : Root WebApplicationContext: initialization completed in 925 ms
-2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping filters: springSecurityFilterChain urls=[/*] order=-100, filterRegistrationBean urls=[/*] order=2147483647, characterEncodingFilter urls=[/*] order=-2147483648, formContentFilter urls=[/*] order=-9900, requestContextFilter urls=[/*] order=-105
-2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping servlets: dispatcherServlet urls=[/]
-2022-05-30 13:06:43.884 - WARN 11508 --- [ main] o.s.security.core.userdetails.User : : : : User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications.
-2022-05-30 13:06:44.034 - WARN 11508 --- [ main] ConfigServletWebServerApplicationContext : : : : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
-2022-05-30 13:06:44.037 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Stopping service [Tomcat]
-2022-05-30 13:06:44.049 - INFO 11508 --- [ main] ConditionEvaluationReportLoggingListener : : : :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-2022-05-30 13:06:44.077 -ERROR 11508 --- [ main] o.s.boot.SpringApplication : : : : Application run failed
-
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:634) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:928) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[spring-context-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[spring-context-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:309) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication.main(AuthorizationServerApplication.java:59) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
... 19 common frames omitted
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest
at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.<init>(OAuth2AuthorizationServerConfigurer.java:75) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0]
at org.springframework.security.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(OAuth2AuthorizationServerConfiguration.java:60) ~[spring-security-oauth2-authorization-server-0.3.0.jar:6.0.0-M5]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration.authorizationServerSecurityFilterChain(AuthorizationServerConfiguration.java:55) ~[classes/:na]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.CGLIB$authorizationServerSecurityFilterChain$2(<generated>) ~[classes/:na]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101$$FastClassBySpringCGLIB$$2fa32d24.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-6.0.0-M4.jar:6.0.0-M4]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.authorizationServerSecurityFilterChain(<generated>) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
... 20 common frames omitted
Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
... 33 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:63499', transport: 'socket'
Process finished with exit code 1
If after adding `
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
</dependency>` in https://github.com/xuxiaowei-com-cn/oauth2.1/blob/ERROR_1/authorization-server/pom.xml, the error is as follows:
"D:\Program Files\dragonwell-17.0.3.0.3+7-GA\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63688,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\xuxiaowei\AppData\Local\JetBrains\IntelliJIdea2022.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "D:\IdeaProjects\oauth2.1\authorization-server\target\classes;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-web\3.0.0-M3\spring-boot-starter-web-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter\3.0.0-M3\spring-boot-starter-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot\3.0.0-M3\spring-boot-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-autoconfigure\3.0.0-M3\spring-boot-autoconfigure-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-logging\3.0.0-M3\spring-boot-starter-logging-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\Apache\apache-maven-3.6.3-repo\jakarta\annotation\jakarta.annotation-api\2.0.0\jakarta.annotation-api-2.0.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-json\3.0.0-M3\spring-boot-starter-json-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-tomcat\3.0.0-M3\spring-boot-starter-tomcat-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-core\10.0.21\tomcat-embed-core-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-el\10.0.21\tomcat-embed-el-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-websocket\10.0.21\tomcat-embed-websocket-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-web\6.0.0-M4\spring-web-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-beans\6.0.0-M4\spring-beans-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-webmvc\6.0.0-M4\spring-webmvc-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-aop\6.0.0-M4\spring-aop-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-context\6.0.0-M4\spring-context-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-expression\6.0.0-M4\spring-expression-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-authorization-server\0.3.0\spring-security-oauth2-authorization-server-0.3.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-config\6.0.0-M5\spring-security-config-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-core\6.0.0-M5\spring-security-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-crypto\6.0.0-M5\spring-security-crypto-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-web\6.0.0-M5\spring-security-web-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-core\6.0.0-M5\spring-security-oauth2-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-jose\6.0.0-M5\spring-security-oauth2-jose-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-resource-server\6.0.0-M5\spring-security-oauth2-resource-server-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-core\6.0.0-M4\spring-core-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-jcl\6.0.0-M4\spring-jcl-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\com\nimbusds\nimbus-jose-jwt\9.22\nimbus-jose-jwt-9.22.jar;D:\Apache\apache-maven-3.6.3-repo\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\javax\servlet\javax.servlet-api\4.0.1\javax.servlet-api-4.0.1.jar;D:\Apache\apache-maven-3.6.3-repo\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\Program Files\JetBrains\ideaIU-2022.1.1.win\lib\idea_rt.jar" cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication
OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release.
Connected to the target VM, address: '127.0.0.1:63688', transport: 'socket'
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v3.0.0-M3)
2022-05-30 13:09:53.006 - INFO 312 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Starting AuthorizationServerApplication using Java 17.0.3 on DESKTOP-8E6LUNV with PID 312 (D:\IdeaProjects\oauth2.1\authorization-server\target\classes started by xuxiaowei in D:\IdeaProjects\oauth2.1)
-2022-05-30 13:09:53.010 -DEBUG 312 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Running with Spring Boot v3.0.0-M3, Spring v6.0.0-M4
-2022-05-30 13:09:53.011 - INFO 312 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : No active profile set, falling back to 1 default profile: "default"
-2022-05-30 13:09:54.041 - INFO 312 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : : : : Tomcat initialized with port(s): 1301 (http)
-2022-05-30 13:09:54.050 - INFO 312 --- [ main] o.apache.catalina.core.StandardService : : : : Starting service [Tomcat]
-2022-05-30 13:09:54.050 - INFO 312 --- [ main] org.apache.catalina.core.StandardEngine : : : : Starting Servlet engine: [Apache Tomcat/10.0.21]
-2022-05-30 13:09:54.138 - INFO 312 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : : : : Initializing Spring embedded WebApplicationContext
-2022-05-30 13:09:54.138 - INFO 312 --- [ main] w.s.c.ServletWebServerApplicationContext : : : : Root WebApplicationContext: initialization completed in 1061 ms
-2022-05-30 13:09:54.162 -DEBUG 312 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping filters: springSecurityFilterChain urls=[/*] order=-100, filterRegistrationBean urls=[/*] order=2147483647, characterEncodingFilter urls=[/*] order=-2147483648, formContentFilter urls=[/*] order=-9900, requestContextFilter urls=[/*] order=-105
-2022-05-30 13:09:54.163 -DEBUG 312 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping servlets: dispatcherServlet urls=[/]
-2022-05-30 13:09:54.259 - WARN 312 --- [ main] o.s.security.core.userdetails.User : : : : User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications.
-2022-05-30 13:09:55.623 -DEBUG 312 --- [ main] edFilterInvocationSecurityMetadataSource : : : : Adding web access control expression [authenticated] for any request
-2022-05-30 13:09:55.648 - WARN 312 --- [ main] ConfigServletWebServerApplicationContext : : : : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.ClassCastException: class org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter cannot be cast to class javax.servlet.Filter (org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter and javax.servlet.Filter are in unnamed module of loader 'app')
-2022-05-30 13:09:55.651 - INFO 312 --- [ main] o.apache.catalina.core.StandardService : : : : Stopping service [Tomcat]
-2022-05-30 13:09:55.664 - INFO 312 --- [ main] ConditionEvaluationReportLoggingListener : : : :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
-2022-05-30 13:09:55.693 -ERROR 312 --- [ main] o.s.boot.SpringApplication : : : : Application run failed
-
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.ClassCastException: class org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter cannot be cast to class javax.servlet.Filter (org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter and javax.servlet.Filter are in unnamed module of loader 'app')
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:634) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:928) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[spring-context-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[spring-context-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:309) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3]
at cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication.main(AuthorizationServerApplication.java:59) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.ClassCastException: class org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter cannot be cast to class javax.servlet.Filter (org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter and javax.servlet.Filter are in unnamed module of loader 'app')
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
... 19 common frames omitted
Caused by: java.lang.ClassCastException: class org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter cannot be cast to class javax.servlet.Filter (org.springframework.security.oauth2.server.authorization.web.OAuth2ClientAuthenticationFilter and javax.servlet.Filter are in unnamed module of loader 'app')
at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2ClientAuthenticationConfigurer.configure(OAuth2ClientAuthenticationConfigurer.java:154) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0]
at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.lambda$configure$2(OAuth2AuthorizationServerConfigurer.java:244) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0]
at java.base/java.util.LinkedHashMap$LinkedValues.forEach(LinkedHashMap.java:647) ~[na:na]
at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.configure(OAuth2AuthorizationServerConfigurer.java:244) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0]
at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.configure(OAuth2AuthorizationServerConfigurer.java:69) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.configure(AbstractConfiguredSecurityBuilder.java:349) ~[spring-security-config-6.0.0-M5.jar:6.0.0-M5]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:303) ~[spring-security-config-6.0.0-M5.jar:6.0.0-M5]
at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:38) ~[spring-security-config-6.0.0-M5.jar:6.0.0-M5]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration.authorizationServerSecurityFilterChain(AuthorizationServerConfiguration.java:60) ~[classes/:na]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$cc0c2c93.CGLIB$authorizationServerSecurityFilterChain$2(<generated>) ~[classes/:na]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$cc0c2c93$$FastClassBySpringCGLIB$$9e957c34.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-6.0.0-M4.jar:6.0.0-M4]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-6.0.0-M4.jar:6.0.0-M4]
at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$cc0c2c93.authorizationServerSecurityFilterChain(<generated>) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4]
... 20 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:63688', transport: 'socket'
Process finished with exit code 1
io.xuxiaowei.security.next:spring-security-oauth2-authorization-server supports spring boot 3.0.0 .
The project address is spring-security-oauth2-authorization-server, and the branch is next-0.3.0-SNAPSHOT .
@xuxiaowei-com-cn Spring Authorization Server 1.0
will support the Spring 6.0
generation of projects (Spring Boot 3.0
, Spring Framework 6.0
, and Spring Security 6.0
).
We are currently putting a plan together for Spring Authorization Server 1.0
. We don't have a timeline yet but an announcement is coming soon.
io.xuxiaowei.security.next:spring-security-oauth2-authorization-server supports spring boot 3.0.0 .
The project address is spring-security-oauth2-authorization-server, and the branch is next-0.3.0-SNAPSHOT .
Starting from 1.0.0-m1, JDK 17 (spring boot 3.0.0) is officially supported https://repo.spring.io/ui/native/milestone/org/springframework/security/spring-security-oauth2-authorization-server/1.0.0-M1/
"D:\Program Files\dragonwell-17.0.3.0.3+7-GA\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63499,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\xuxiaowei\AppData\Local\JetBrains\IntelliJIdea2022.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "D:\IdeaProjects\oauth2.1\authorization-server\target\classes;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-web\3.0.0-M3\spring-boot-starter-web-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter\3.0.0-M3\spring-boot-starter-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot\3.0.0-M3\spring-boot-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-autoconfigure\3.0.0-M3\spring-boot-autoconfigure-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-logging\3.0.0-M3\spring-boot-starter-logging-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\Apache\apache-maven-3.6.3-repo\jakarta\annotation\jakarta.annotation-api\2.0.0\jakarta.annotation-api-2.0.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-json\3.0.0-M3\spring-boot-starter-json-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-tomcat\3.0.0-M3\spring-boot-starter-tomcat-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-core\10.0.21\tomcat-embed-core-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-el\10.0.21\tomcat-embed-el-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-websocket\10.0.21\tomcat-embed-websocket-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-web\6.0.0-M4\spring-web-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-beans\6.0.0-M4\spring-beans-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-webmvc\6.0.0-M4\spring-webmvc-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-aop\6.0.0-M4\spring-aop-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-context\6.0.0-M4\spring-context-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-expression\6.0.0-M4\spring-expression-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-authorization-server\0.3.0\spring-security-oauth2-authorization-server-0.3.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-config\6.0.0-M5\spring-security-config-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-core\6.0.0-M5\spring-security-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-crypto\6.0.0-M5\spring-security-crypto-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-web\6.0.0-M5\spring-security-web-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-core\6.0.0-M5\spring-security-oauth2-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-jose\6.0.0-M5\spring-security-oauth2-jose-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-resource-server\6.0.0-M5\spring-security-oauth2-resource-server-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-core\6.0.0-M4\spring-core-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-jcl\6.0.0-M4\spring-jcl-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\com\nimbusds\nimbus-jose-jwt\9.22\nimbus-jose-jwt-9.22.jar;D:\Apache\apache-maven-3.6.3-repo\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\Program Files\JetBrains\ideaIU-2022.1.1.win\lib\idea_rt.jar" cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. Connected to the target VM, address: '127.0.0.1:63499', transport: 'socket' . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.0.0-M3) 2022-05-30 13:06:42.780 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Starting AuthorizationServerApplication using Java 17.0.3 on DESKTOP-8E6LUNV with PID 11508 (D:\IdeaProjects\oauth2.1\authorization-server\target\classes started by xuxiaowei in D:\IdeaProjects\oauth2.1) -2022-05-30 13:06:42.785 -DEBUG 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Running with Spring Boot v3.0.0-M3, Spring v6.0.0-M4 -2022-05-30 13:06:42.788 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : No active profile set, falling back to 1 default profile: "default" -2022-05-30 13:06:43.688 - INFO 11508 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : : : : Tomcat initialized with port(s): 1301 (http) -2022-05-30 13:06:43.698 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Starting service [Tomcat] -2022-05-30 13:06:43.699 - INFO 11508 --- [ main] org.apache.catalina.core.StandardEngine : : : : Starting Servlet engine: [Apache Tomcat/10.0.21] -2022-05-30 13:06:43.782 - INFO 11508 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : : : : Initializing Spring embedded WebApplicationContext -2022-05-30 13:06:43.782 - INFO 11508 --- [ main] w.s.c.ServletWebServerApplicationContext : : : : Root WebApplicationContext: initialization completed in 925 ms -2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping filters: springSecurityFilterChain urls=[/*] order=-100, filterRegistrationBean urls=[/*] order=2147483647, characterEncodingFilter urls=[/*] order=-2147483648, formContentFilter urls=[/*] order=-9900, requestContextFilter urls=[/*] order=-105 -2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping servlets: dispatcherServlet urls=[/] -2022-05-30 13:06:43.884 - WARN 11508 --- [ main] o.s.security.core.userdetails.User : : : : User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications. -2022-05-30 13:06:44.034 - WARN 11508 --- [ main] ConfigServletWebServerApplicationContext : : : : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest -2022-05-30 13:06:44.037 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Stopping service [Tomcat] -2022-05-30 13:06:44.049 - INFO 11508 --- [ main] ConditionEvaluationReportLoggingListener : : : : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. -2022-05-30 13:06:44.077 -ERROR 11508 --- [ main] o.s.boot.SpringApplication : : : : Application run failed - org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:634) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:928) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:309) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication.main(AuthorizationServerApplication.java:59) ~[classes/:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] ... 19 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.<init>(OAuth2AuthorizationServerConfigurer.java:75) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0] at org.springframework.security.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(OAuth2AuthorizationServerConfiguration.java:60) ~[spring-security-oauth2-authorization-server-0.3.0.jar:6.0.0-M5] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration.authorizationServerSecurityFilterChain(AuthorizationServerConfiguration.java:55) ~[classes/:na] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.CGLIB$authorizationServerSecurityFilterChain$2(<generated>) ~[classes/:na] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101$$FastClassBySpringCGLIB$$2fa32d24.invoke(<generated>) ~[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.authorizationServerSecurityFilterChain(<generated>) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] ... 20 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na] ... 33 common frames omitted Disconnected from the target VM, address: '127.0.0.1:63499', transport: 'socket' Process finished with exit code 1
Same error happens to me. Is it about springboot version? My springboot version is 2.6.3, jdk: 17, spring-security-oauth2-authorization-server: 1.0.1
Here are my error message:
C:\Users\ZELIN7\.sdkman\candidates\java\22.3.r17-nik\bin\java.exe -XX:TieredStopAtLevel=1 -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-Dmanagement.endpoints.jmx.exposure.include=*" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.2\lib\idea_rt.jar=54805:C:\Program Files\JetBrains\IntelliJ IDEA 2022.3.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\ZELIN7\OneDrive - IKEA\Desktop\springcloud-demo\auth\auth_server\target\classes;C:\Users\ZELIN7\.m2\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-config\2021.0.1.0\spring-cloud-starter-alibaba-nacos-config-2021.0.1.0.jar;C:\Users\ZELIN7\.m2\repository\com\alibaba\spring\spring-context-support\1.0.11\spring-context-support-1.0.11.jar;C:\Users\ZELIN7\.m2\repository\com\alibaba\nacos\nacos-client\1.4.2\nacos-client-1.4.2.jar;C:\Users\ZELIN7\.m2\repository\com\alibaba\nacos\nacos-common\1.4.2\nacos-common-1.4.2.jar;C:\Users\ZELIN7\.m2\repository\commons-io\commons-io\2.7\commons-io-2.7.jar;C:\Users\ZELIN7\.m2\repository\org\apache\httpcomponents\httpasyncclient\4.1.5\httpasyncclient-4.1.5.jar;C:\Users\ZELIN7\.m2\repository\org\apache\httpcomponents\httpcore\4.4.15\httpcore-4.4.15.jar;C:\Users\ZELIN7\.m2\repository\org\apache\httpcomponents\httpcore-nio\4.4.15\httpcore-nio-4.4.15.jar;C:\Users\ZELIN7\.m2\repository\org\apache\httpcomponents\httpclient\4.5.13\httpclient-4.5.13.jar;C:\Users\ZELIN7\.m2\repository\com\alibaba\nacos\nacos-api\1.4.2\nacos-api-1.4.2.jar;C:\Users\ZELIN7\.m2\repository\com\google\guava\guava\30.1-jre\guava-30.1-jre.jar;C:\Users\ZELIN7\.m2\repository\com\google\guava\failureaccess\1.0.1\failureaccess-1.0.1.jar;C:\Users\ZELIN7\.m2\repository\com\google\guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar;C:\Users\ZELIN7\.m2\repository\com\google\code\findbugs\jsr305\3.0.2\jsr305-3.0.2.jar;C:\Users\ZELIN7\.m2\repository\org\checkerframework\checker-qual\3.5.0\checker-qual-3.5.0.jar;C:\Users\ZELIN7\.m2\repository\com\google\errorprone\error_prone_annotations\2.3.4\error_prone_annotations-2.3.4.jar;C:\Users\ZELIN7\.m2\repository\com\google\j2objc\j2objc-annotations\1.3\j2objc-annotations-1.3.jar;C:\Users\ZELIN7\.m2\repository\commons-codec\commons-codec\1.15\commons-codec-1.15.jar;C:\Users\ZELIN7\.m2\repository\com\fasterxml\jackson\core\jackson-core\2.13.1\jackson-core-2.13.1.jar;C:\Users\ZELIN7\.m2\repository\io\prometheus\simpleclient\0.12.0\simpleclient-0.12.0.jar;C:\Users\ZELIN7\.m2\repository\io\prometheus\simpleclient_tracer_otel\0.12.0\simpleclient_tracer_otel-0.12.0.jar;C:\Users\ZELIN7\.m2\repository\io\prometheus\simpleclient_tracer_common\0.12.0\simpleclient_tracer_common-0.12.0.jar;C:\Users\ZELIN7\.m2\repository\io\prometheus\simpleclient_tracer_otel_agent\0.12.0\simpleclient_tracer_otel_agent-0.12.0.jar;C:\Users\ZELIN7\.m2\repository\org\yaml\snakeyaml\1.29\snakeyaml-1.29.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\cloud\spring-cloud-commons\3.1.1\spring-cloud-commons-3.1.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-crypto\5.6.1\spring-security-crypto-5.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\cloud\spring-cloud-context\3.1.1\spring-cloud-context-3.1.1.jar;C:\Users\ZELIN7\.m2\repository\com\alibaba\cloud\spring-cloud-starter-alibaba-nacos-discovery\2021.0.1.0\spring-cloud-starter-alibaba-nacos-discovery-2021.0.1.0.jar;C:\Users\ZELIN7\.m2\repository\com\alibaba\cloud\spring-cloud-alibaba-commons\2021.0.1.0\spring-cloud-alibaba-commons-2021.0.1.0.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\cloud\spring-cloud-starter-bootstrap\3.1.1\spring-cloud-starter-bootstrap-3.1.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\cloud\spring-cloud-starter\3.1.1\spring-cloud-starter-3.1.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-rsa\1.0.10.RELEASE\spring-security-rsa-1.0.10.RELEASE.jar;C:\Users\ZELIN7\.m2\repository\org\bouncycastle\bcpkix-jdk15on\1.68\bcpkix-jdk15on-1.68.jar;C:\Users\ZELIN7\.m2\repository\org\bouncycastle\bcprov-jdk15on\1.68\bcprov-jdk15on-1.68.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter-web\2.6.3\spring-boot-starter-web-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter\2.6.3\spring-boot-starter-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot\2.6.3\spring-boot-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter-logging\2.6.3\spring-boot-starter-logging-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\ch\qos\logback\logback-classic\1.2.10\logback-classic-1.2.10.jar;C:\Users\ZELIN7\.m2\repository\ch\qos\logback\logback-core\1.2.10\logback-core-1.2.10.jar;C:\Users\ZELIN7\.m2\repository\org\apache\logging\log4j\log4j-to-slf4j\2.17.1\log4j-to-slf4j-2.17.1.jar;C:\Users\ZELIN7\.m2\repository\org\apache\logging\log4j\log4j-api\2.17.1\log4j-api-2.17.1.jar;C:\Users\ZELIN7\.m2\repository\org\slf4j\jul-to-slf4j\1.7.33\jul-to-slf4j-1.7.33.jar;C:\Users\ZELIN7\.m2\repository\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter-json\2.6.3\spring-boot-starter-json-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.1\jackson-datatype-jdk8-2.13.1.jar;C:\Users\ZELIN7\.m2\repository\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.1\jackson-datatype-jsr310-2.13.1.jar;C:\Users\ZELIN7\.m2\repository\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.1\jackson-module-parameter-names-2.13.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter-tomcat\2.6.3\spring-boot-starter-tomcat-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\apache\tomcat\embed\tomcat-embed-core\9.0.56\tomcat-embed-core-9.0.56.jar;C:\Users\ZELIN7\.m2\repository\org\apache\tomcat\embed\tomcat-embed-el\9.0.56\tomcat-embed-el-9.0.56.jar;C:\Users\ZELIN7\.m2\repository\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.56\tomcat-embed-websocket-9.0.56.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-web\5.3.15\spring-web-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-beans\5.3.15\spring-beans-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-webmvc\5.3.15\spring-webmvc-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-context\5.3.15\spring-context-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-expression\5.3.15\spring-expression-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\slf4j\slf4j-api\1.7.33\slf4j-api-1.7.33.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-core\5.3.15\spring-core-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-jcl\5.3.15\spring-jcl-5.3.15.jar;C:\Users\ZELIN7\OneDrive - IKEA\Desktop\springcloud-demo\common\target\classes;C:\Users\ZELIN7\.m2\repository\com\fasterxml\jackson\core\jackson-databind\2.13.1\jackson-databind-2.13.1.jar;C:\Users\ZELIN7\.m2\repository\com\fasterxml\jackson\core\jackson-annotations\2.13.1\jackson-annotations-2.13.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-core\5.7.5\spring-security-core-5.7.5.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-autoconfigure\2.6.3\spring-boot-autoconfigure-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter-security\2.6.3\spring-boot-starter-security-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-aop\5.3.15\spring-aop-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-config\5.6.1\spring-security-config-5.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-web\5.6.1\spring-security-web-5.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-oauth2-authorization-server\1.0.1\spring-security-oauth2-authorization-server-1.0.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-oauth2-core\5.6.1\spring-security-oauth2-core-5.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-oauth2-jose\5.6.1\spring-security-oauth2-jose-5.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\security\spring-security-oauth2-resource-server\5.6.1\spring-security-oauth2-resource-server-5.6.1.jar;C:\Users\ZELIN7\.m2\repository\com\nimbusds\nimbus-jose-jwt\9.25.6\nimbus-jose-jwt-9.25.6.jar;C:\Users\ZELIN7\.m2\repository\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\boot\spring-boot-starter-data-redis\2.6.3\spring-boot-starter-data-redis-2.6.3.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\data\spring-data-redis\2.6.1\spring-data-redis-2.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\data\spring-data-keyvalue\2.6.1\spring-data-keyvalue-2.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\data\spring-data-commons\2.6.1\spring-data-commons-2.6.1.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-tx\5.3.15\spring-tx-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-oxm\5.3.15\spring-oxm-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\org\springframework\spring-context-support\5.3.15\spring-context-support-5.3.15.jar;C:\Users\ZELIN7\.m2\repository\io\lettuce\lettuce-core\6.1.6.RELEASE\lettuce-core-6.1.6.RELEASE.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-common\4.1.73.Final\netty-common-4.1.73.Final.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-handler\4.1.73.Final\netty-handler-4.1.73.Final.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-resolver\4.1.73.Final\netty-resolver-4.1.73.Final.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-buffer\4.1.73.Final\netty-buffer-4.1.73.Final.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-codec\4.1.73.Final\netty-codec-4.1.73.Final.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-tcnative-classes\2.0.46.Final\netty-tcnative-classes-2.0.46.Final.jar;C:\Users\ZELIN7\.m2\repository\io\netty\netty-transport\4.1.73.Final\netty-transport-4.1.73.Final.jar;C:\Users\ZELIN7\.m2\repository\io\projectreactor\reactor-core\3.4.14\reactor-core-3.4.14.jar;C:\Users\ZELIN7\.m2\repository\org\reactivestreams\reactive-streams\1.0.3\reactive-streams-1.0.3.jar;C:\Users\ZELIN7\.m2\repository\mysql\mysql-connector-java\8.0.29\mysql-connector-java-8.0.29.jar;C:\Users\ZELIN7\.m2\repository\com\google\protobuf\protobuf-java\3.19.4\protobuf-java-3.19.4.jar;C:\Users\ZELIN7\.m2\repository\org\projectlombok\lombok\1.18.22\lombok-1.18.22.jar;C:\Users\ZELIN7\.m2\repository\cn\hutool\hutool-all\5.8.15\hutool-all-5.8.15.jar" com.example.auth.server.AuthApplication
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.3)
2023-03-24 11:15:24.752 WARN 6136 --- [main] c.a.c.n.c.NacosPropertySourceBuilder [87] : Ignore the empty nacos configuration and get it based on dataId[auth] & group[DEFAULT_GROUP]
2023-03-24 11:15:24.764 WARN 6136 --- [main] c.a.c.n.c.NacosPropertySourceBuilder [87] : Ignore the empty nacos configuration and get it based on dataId[auth.yaml] & group[DEFAULT_GROUP]
2023-03-24 11:15:24.793 INFO 6136 --- [main] b.c.PropertySourceBootstrapConfiguration [109] : Located property source: [BootstrapPropertySource {name='bootstrapProperties-auth-dev.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-auth.yaml,DEFAULT_GROUP'}, BootstrapPropertySource {name='bootstrapProperties-auth,DEFAULT_GROUP'}]
2023-03-24 11:15:24.807 INFO 6136 --- [main] com.example.auth.server.AuthApplication [641] : The following profiles are active: dev
2023-03-24 11:15:26.401 INFO 6136 --- [main] .s.d.r.c.RepositoryConfigurationDelegate [262] : Multiple Spring Data modules found, entering strict repository configuration mode!
2023-03-24 11:15:26.412 INFO 6136 --- [main] .s.d.r.c.RepositoryConfigurationDelegate [132] : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2023-03-24 11:15:26.489 INFO 6136 --- [main] .s.d.r.c.RepositoryConfigurationDelegate [201] : Finished Spring Data repository scanning in 22 ms. Found 0 Redis repository interfaces.
2023-03-24 11:15:27.113 INFO 6136 --- [main] o.s.cloud.context.scope.GenericScope [283] : BeanFactory id=71796467-a1aa-3bc2-8b10-e09d9498af82
2023-03-24 11:15:28.026 INFO 6136 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer [108] : Tomcat initialized with port(s): 8024 (http)
2023-03-24 11:15:28.055 INFO 6136 --- [main] o.a.coyote.http11.Http11NioProtocol [173] : Initializing ProtocolHandler ["http-nio-8024"]
2023-03-24 11:15:28.056 INFO 6136 --- [main] o.apache.catalina.core.StandardService [173] : Starting service [Tomcat]
2023-03-24 11:15:28.057 INFO 6136 --- [main] org.apache.catalina.core.StandardEngine [173] : Starting Servlet engine: [Apache Tomcat/9.0.56]
2023-03-24 11:15:28.582 INFO 6136 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] [173] : Initializing Spring embedded WebApplicationContext
2023-03-24 11:15:28.583 INFO 6136 --- [main] w.s.c.ServletWebServerApplicationContext [290] : Root WebApplicationContext: initialization completed in 3740 ms
2023-03-24 11:15:28.919 WARN 6136 --- [main] o.s.security.core.userdetails.User [284] : User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications.
2023-03-24 11:15:29.333 WARN 6136 --- [main] ConfigServletWebServerApplicationContext [591] : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [com/example/auth/server/config/AuthorizationServerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: jakarta/servlet/http/HttpServletRequest
2023-03-24 11:15:29.336 INFO 6136 --- [main] o.apache.catalina.core.StandardService [173] : Stopping service [Tomcat]
2023-03-24 11:15:29.377 INFO 6136 --- [main] ConditionEvaluationReportLoggingListener [136] :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-03-24 11:15:29.450 ERROR 6136 --- [main] o.s.boot.SpringApplication [821] : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [com/example/auth/server/config/AuthorizationServerConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: jakarta/servlet/http/HttpServletRequest
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.15.jar:5.3.15]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.15.jar:5.3.15]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:414) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) ~[spring-boot-2.6.3.jar:2.6.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) ~[spring-boot-2.6.3.jar:2.6.3]
at com.example.auth.server.AuthApplication.main(AuthApplication.java:9) ~[classes/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: jakarta/servlet/http/HttpServletRequest
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.3.15.jar:5.3.15]
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:653) ~[spring-beans-5.3.15.jar:5.3.15]
... 19 common frames omitted
Caused by: java.lang.NoClassDefFoundError: jakarta/servlet/http/HttpServletRequest
at org.springframework.security.oauth2.server.authorization.config.annotation.web.configurers.OAuth2AuthorizationServerConfigurer.getEndpointsMatcher(OAuth2AuthorizationServerConfigurer.java:235) ~[spring-security-oauth2-authorization-server-1.0.1.jar:1.0.1]
at org.springframework.security.oauth2.server.authorization.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(OAuth2AuthorizationServerConfiguration.java:63) ~[spring-security-oauth2-authorization-server-1.0.1.jar:1.0.1]
at com.example.auth.server.config.AuthorizationServerConfig.authorizationServerSecurityFilterChain(AuthorizationServerConfig.java:71) ~[classes/:na]
at com.example.auth.server.config.AuthorizationServerConfig$$EnhancerBySpringCGLIB$$9fd52052.CGLIB$authorizationServerSecurityFilterChain$0(<generated>) ~[classes/:na]
at com.example.auth.server.config.AuthorizationServerConfig$$EnhancerBySpringCGLIB$$9fd52052$$FastClassBySpringCGLIB$$b5ac6cea.invoke(<generated>) ~[classes/:na]
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-5.3.15.jar:5.3.15]
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-5.3.15.jar:5.3.15]
at com.example.auth.server.config.AuthorizationServerConfig$$EnhancerBySpringCGLIB$$9fd52052.authorizationServerSecurityFilterChain(<generated>) ~[classes/:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.3.15.jar:5.3.15]
... 20 common frames omitted
Caused by: java.lang.ClassNotFoundException: jakarta.servlet.http.HttpServletRequest
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na]
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na]
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na]
... 33 common frames omitted
2023-03-24 11:15:29.454 WARN 6136 --- [Thread-1] c.a.n.common.http.HttpClientBeanHolder [108] : [HttpClientBeanHolder] Start destroying common HttpClient
Process finished with exit code 1
"D:\Program Files\dragonwell-17.0.3.0.3+7-GA\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63499,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\xuxiaowei\AppData\Local\JetBrains\IntelliJIdea2022.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "D:\IdeaProjects\oauth2.1\authorization-server\target\classes;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-web\3.0.0-M3\spring-boot-starter-web-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter\3.0.0-M3\spring-boot-starter-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot\3.0.0-M3\spring-boot-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-autoconfigure\3.0.0-M3\spring-boot-autoconfigure-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-logging\3.0.0-M3\spring-boot-starter-logging-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\Apache\apache-maven-3.6.3-repo\jakarta\annotation\jakarta.annotation-api\2.0.0\jakarta.annotation-api-2.0.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-json\3.0.0-M3\spring-boot-starter-json-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-tomcat\3.0.0-M3\spring-boot-starter-tomcat-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-core\10.0.21\tomcat-embed-core-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-el\10.0.21\tomcat-embed-el-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-websocket\10.0.21\tomcat-embed-websocket-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-web\6.0.0-M4\spring-web-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-beans\6.0.0-M4\spring-beans-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-webmvc\6.0.0-M4\spring-webmvc-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-aop\6.0.0-M4\spring-aop-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-context\6.0.0-M4\spring-context-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-expression\6.0.0-M4\spring-expression-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-authorization-server\0.3.0\spring-security-oauth2-authorization-server-0.3.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-config\6.0.0-M5\spring-security-config-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-core\6.0.0-M5\spring-security-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-crypto\6.0.0-M5\spring-security-crypto-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-web\6.0.0-M5\spring-security-web-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-core\6.0.0-M5\spring-security-oauth2-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-jose\6.0.0-M5\spring-security-oauth2-jose-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-resource-server\6.0.0-M5\spring-security-oauth2-resource-server-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-core\6.0.0-M4\spring-core-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-jcl\6.0.0-M4\spring-jcl-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\com\nimbusds\nimbus-jose-jwt\9.22\nimbus-jose-jwt-9.22.jar;D:\Apache\apache-maven-3.6.3-repo\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\Program Files\JetBrains\ideaIU-2022.1.1.win\lib\idea_rt.jar" cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. Connected to the target VM, address: '127.0.0.1:63499', transport: 'socket' . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.0.0-M3) 2022-05-30 13:06:42.780 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Starting AuthorizationServerApplication using Java 17.0.3 on DESKTOP-8E6LUNV with PID 11508 (D:\IdeaProjects\oauth2.1\authorization-server\target\classes started by xuxiaowei in D:\IdeaProjects\oauth2.1) -2022-05-30 13:06:42.785 -DEBUG 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Running with Spring Boot v3.0.0-M3, Spring v6.0.0-M4 -2022-05-30 13:06:42.788 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : No active profile set, falling back to 1 default profile: "default" -2022-05-30 13:06:43.688 - INFO 11508 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : : : : Tomcat initialized with port(s): 1301 (http) -2022-05-30 13:06:43.698 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Starting service [Tomcat] -2022-05-30 13:06:43.699 - INFO 11508 --- [ main] org.apache.catalina.core.StandardEngine : : : : Starting Servlet engine: [Apache Tomcat/10.0.21] -2022-05-30 13:06:43.782 - INFO 11508 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : : : : Initializing Spring embedded WebApplicationContext -2022-05-30 13:06:43.782 - INFO 11508 --- [ main] w.s.c.ServletWebServerApplicationContext : : : : Root WebApplicationContext: initialization completed in 925 ms -2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping filters: springSecurityFilterChain urls=[/*] order=-100, filterRegistrationBean urls=[/*] order=2147483647, characterEncodingFilter urls=[/*] order=-2147483648, formContentFilter urls=[/*] order=-9900, requestContextFilter urls=[/*] order=-105 -2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping servlets: dispatcherServlet urls=[/] -2022-05-30 13:06:43.884 - WARN 11508 --- [ main] o.s.security.core.userdetails.User : : : : User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications. -2022-05-30 13:06:44.034 - WARN 11508 --- [ main] ConfigServletWebServerApplicationContext : : : : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest -2022-05-30 13:06:44.037 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Stopping service [Tomcat] -2022-05-30 13:06:44.049 - INFO 11508 --- [ main] ConditionEvaluationReportLoggingListener : : : : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. -2022-05-30 13:06:44.077 -ERROR 11508 --- [ main] o.s.boot.SpringApplication : : : : Application run failed - org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:634) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:928) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:309) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication.main(AuthorizationServerApplication.java:59) ~[classes/:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] ... 19 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.<init>(OAuth2AuthorizationServerConfigurer.java:75) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0] at org.springframework.security.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(OAuth2AuthorizationServerConfiguration.java:60) ~[spring-security-oauth2-authorization-server-0.3.0.jar:6.0.0-M5] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration.authorizationServerSecurityFilterChain(AuthorizationServerConfiguration.java:55) ~[classes/:na] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.CGLIB$authorizationServerSecurityFilterChain$2(<generated>) ~[classes/:na] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101$$FastClassBySpringCGLIB$$2fa32d24.invoke(<generated>) ~[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.authorizationServerSecurityFilterChain(<generated>) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] ... 20 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na] ... 33 common frames omitted Disconnected from the target VM, address: '127.0.0.1:63499', transport: 'socket' Process finished with exit code 1
Same error happens to me. Is it about springboot version? My springboot version is 2.6.3, jdk: 17, spring-security-oauth2-authorization-server: 1.0.1
spring-security-oauth2-authorization-server 使用 1.0.1
"D:\Program Files\dragonwell-17.0.3.0.3+7-GA\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:63499,suspend=y,server=n -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -javaagent:C:\Users\xuxiaowei\AppData\Local\JetBrains\IntelliJIdea2022.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "D:\IdeaProjects\oauth2.1\authorization-server\target\classes;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-web\3.0.0-M3\spring-boot-starter-web-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter\3.0.0-M3\spring-boot-starter-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot\3.0.0-M3\spring-boot-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-autoconfigure\3.0.0-M3\spring-boot-autoconfigure-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-logging\3.0.0-M3\spring-boot-starter-logging-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-classic\1.2.11\logback-classic-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\ch\qos\logback\logback-core\1.2.11\logback-core-1.2.11.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-to-slf4j\2.17.2\log4j-to-slf4j-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\logging\log4j\log4j-api\2.17.2\log4j-api-2.17.2.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\jul-to-slf4j\1.7.36\jul-to-slf4j-1.7.36.jar;D:\Apache\apache-maven-3.6.3-repo\jakarta\annotation\jakarta.annotation-api\2.0.0\jakarta.annotation-api-2.0.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\yaml\snakeyaml\1.30\snakeyaml-1.30.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-json\3.0.0-M3\spring-boot-starter-json-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.13.3\jackson-datatype-jdk8-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.13.3\jackson-datatype-jsr310-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\module\jackson-module-parameter-names\2.13.3\jackson-module-parameter-names-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\boot\spring-boot-starter-tomcat\3.0.0-M3\spring-boot-starter-tomcat-3.0.0-M3.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-core\10.0.21\tomcat-embed-core-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-el\10.0.21\tomcat-embed-el-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\apache\tomcat\embed\tomcat-embed-websocket\10.0.21\tomcat-embed-websocket-10.0.21.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-web\6.0.0-M4\spring-web-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-beans\6.0.0-M4\spring-beans-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-webmvc\6.0.0-M4\spring-webmvc-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-aop\6.0.0-M4\spring-aop-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-context\6.0.0-M4\spring-context-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-expression\6.0.0-M4\spring-expression-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-authorization-server\0.3.0\spring-security-oauth2-authorization-server-0.3.0.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-config\6.0.0-M5\spring-security-config-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-core\6.0.0-M5\spring-security-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-crypto\6.0.0-M5\spring-security-crypto-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-web\6.0.0-M5\spring-security-web-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-core\6.0.0-M5\spring-security-oauth2-core-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-jose\6.0.0-M5\spring-security-oauth2-jose-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\security\spring-security-oauth2-resource-server\6.0.0-M5\spring-security-oauth2-resource-server-6.0.0-M5.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-core\6.0.0-M4\spring-core-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\org\springframework\spring-jcl\6.0.0-M4\spring-jcl-6.0.0-M4.jar;D:\Apache\apache-maven-3.6.3-repo\com\nimbusds\nimbus-jose-jwt\9.22\nimbus-jose-jwt-9.22.jar;D:\Apache\apache-maven-3.6.3-repo\com\github\stephenc\jcip\jcip-annotations\1.0-1\jcip-annotations-1.0-1.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-databind\2.13.3\jackson-databind-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-annotations\2.13.3\jackson-annotations-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\com\fasterxml\jackson\core\jackson-core\2.13.3\jackson-core-2.13.3.jar;D:\Apache\apache-maven-3.6.3-repo\org\projectlombok\lombok\1.18.24\lombok-1.18.24.jar;D:\Apache\apache-maven-3.6.3-repo\org\slf4j\slf4j-api\1.7.36\slf4j-api-1.7.36.jar;D:\Program Files\JetBrains\ideaIU-2022.1.1.win\lib\idea_rt.jar" cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication OpenJDK 64-Bit Server VM warning: Options -Xverify:none and -noverify were deprecated in JDK 13 and will likely be removed in a future release. Connected to the target VM, address: '127.0.0.1:63499', transport: 'socket' . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.0.0-M3) 2022-05-30 13:06:42.780 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Starting AuthorizationServerApplication using Java 17.0.3 on DESKTOP-8E6LUNV with PID 11508 (D:\IdeaProjects\oauth2.1\authorization-server\target\classes started by xuxiaowei in D:\IdeaProjects\oauth2.1) -2022-05-30 13:06:42.785 -DEBUG 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : Running with Spring Boot v3.0.0-M3, Spring v6.0.0-M4 -2022-05-30 13:06:42.788 - INFO 11508 --- [ main] c.c.x.a.AuthorizationServerApplication : : : : No active profile set, falling back to 1 default profile: "default" -2022-05-30 13:06:43.688 - INFO 11508 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : : : : Tomcat initialized with port(s): 1301 (http) -2022-05-30 13:06:43.698 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Starting service [Tomcat] -2022-05-30 13:06:43.699 - INFO 11508 --- [ main] org.apache.catalina.core.StandardEngine : : : : Starting Servlet engine: [Apache Tomcat/10.0.21] -2022-05-30 13:06:43.782 - INFO 11508 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : : : : Initializing Spring embedded WebApplicationContext -2022-05-30 13:06:43.782 - INFO 11508 --- [ main] w.s.c.ServletWebServerApplicationContext : : : : Root WebApplicationContext: initialization completed in 925 ms -2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping filters: springSecurityFilterChain urls=[/*] order=-100, filterRegistrationBean urls=[/*] order=2147483647, characterEncodingFilter urls=[/*] order=-2147483648, formContentFilter urls=[/*] order=-9900, requestContextFilter urls=[/*] order=-105 -2022-05-30 13:06:43.804 -DEBUG 11508 --- [ main] o.s.b.w.s.ServletContextInitializerBeans : : : : Mapping servlets: dispatcherServlet urls=[/] -2022-05-30 13:06:43.884 - WARN 11508 --- [ main] o.s.security.core.userdetails.User : : : : User.withDefaultPasswordEncoder() is considered unsafe for production and is only intended for sample applications. -2022-05-30 13:06:44.034 - WARN 11508 --- [ main] ConfigServletWebServerApplicationContext : : : : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest -2022-05-30 13:06:44.037 - INFO 11508 --- [ main] o.apache.catalina.core.StandardService : : : : Stopping service [Tomcat] -2022-05-30 13:06:44.049 - INFO 11508 --- [ main] ConditionEvaluationReportLoggingListener : : : : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. -2022-05-30 13:06:44.077 -ERROR 11508 --- [ main] o.s.boot.SpringApplication : : : : Application run failed - org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'authorizationServerSecurityFilterChain' defined in class path resource [cn/com/xuxiaowei/authorizationserver/configuration/AuthorizationServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:634) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:622) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:566) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:526) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:928) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:926) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:592) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:309) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-3.0.0-M3.jar:3.0.0-M3] at cn.com.xuxiaowei.authorizationserver.AuthorizationServerApplication.main(AuthorizationServerApplication.java:59) ~[classes/:na] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.SecurityFilterChain]: Factory method 'authorizationServerSecurityFilterChain' threw exception; nested exception is java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:161) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:630) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] ... 19 common frames omitted Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest at org.springframework.security.config.annotation.web.configurers.oauth2.server.authorization.OAuth2AuthorizationServerConfigurer.<init>(OAuth2AuthorizationServerConfigurer.java:75) ~[spring-security-oauth2-authorization-server-0.3.0.jar:0.3.0] at org.springframework.security.config.annotation.web.configuration.OAuth2AuthorizationServerConfiguration.applyDefaultSecurity(OAuth2AuthorizationServerConfiguration.java:60) ~[spring-security-oauth2-authorization-server-0.3.0.jar:6.0.0-M5] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration.authorizationServerSecurityFilterChain(AuthorizationServerConfiguration.java:55) ~[classes/:na] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.CGLIB$authorizationServerSecurityFilterChain$2(<generated>) ~[classes/:na] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101$$FastClassBySpringCGLIB$$2fa32d24.invoke(<generated>) ~[classes/:na] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244) ~[spring-core-6.0.0-M4.jar:6.0.0-M4] at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331) ~[spring-context-6.0.0-M4.jar:6.0.0-M4] at cn.com.xuxiaowei.authorizationserver.configuration.AuthorizationServerConfiguration$$EnhancerBySpringCGLIB$$36e24101.authorizationServerSecurityFilterChain(<generated>) ~[classes/:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[na:na] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:130) ~[spring-beans-6.0.0-M4.jar:6.0.0-M4] ... 20 common frames omitted Caused by: java.lang.ClassNotFoundException: javax.servlet.http.HttpServletRequest at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) ~[na:na] at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188) ~[na:na] at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520) ~[na:na] ... 33 common frames omitted Disconnected from the target VM, address: '127.0.0.1:63499', transport: 'socket' Process finished with exit code 1
Same error happens to me. Is it about springboot version? My springboot version is 2.6.3, jdk: 17, spring-security-oauth2-authorization-server: 1.0.1
spring-security-oauth2-authorization-server 使用 1.0.1
用的正是1.0.1
@CompetitiveLin 刚才看错了。 你用的 Spring Boot v2.6.3,spring-security-oauth2-authorization-server 1.0 版本支持 Spring boot 3.0、JDK 17。 spring-security-oauth2-authorization-server 1.0 版本 之前支持 Spring boot 2.x、JDK 8
@CompetitiveLin 你应该使用 1.0 之前的版本,例如:0.4.1
Project example: https://github.com/xuxiaowei-com-cn/oauth2.1/tree/ERROR_1 Run: https://github.com/xuxiaowei-com-cn/oauth2.1/blob/ERROR_1/authorization-server/src/main/java/cn/com/xuxiaowei/authorizationserver/AuthorizationServerApplication.java