Skip to content

NCDFE from SecurityFilterAutoConfiguration #4919

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Bert-R opened this issue Jan 9, 2016 · 7 comments
Closed

NCDFE from SecurityFilterAutoConfiguration #4919

Bert-R opened this issue Jan 9, 2016 · 7 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@Bert-R
Copy link

Bert-R commented Jan 9, 2016

Thanks for releasing Spring Boot 1.3! The cache autoconfiguration feature comes in handy.

While in the process to upgrade from Spring Boot 1.2.7 to 1.3.1, I ran into a NoClassDefFoundException from SecurityFilterAutoConfiguration.

This is the log output:

2016-01-08 22:14:54.814  WARN 10996 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityProperties' defined in class path resource [org/springframework/boot/autoconfigure/security/SecurityFilterAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.security.SecurityProperties]: Factory method 'securityProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/config/http/SessionCreationPolicy
2016-01-08 22:14:54.817  INFO 10996 --- [           main] o.s.j.e.a.AnnotationMBeanExporter        : Unregistering JMX-exposed beans on shutdown
2016-01-08 22:14:54.832  INFO 10996 --- [           main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2016-01-08 22:14:54.848  INFO 10996 --- [           main] o.apache.catalina.core.StandardService   : Stopping service Tomcat
2016-01-08 22:14:54.878 ERROR 10996 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityProperties' defined in class path resource [org/springframework/boot/autoconfigure/security/SecurityFilterAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.security.SecurityProperties]: Factory method 'securityProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/config/http/SessionCreationPolicy
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframeans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) ~[spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:764) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:357) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:305) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1124) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.SpringApplication.run(SpringApplication.java:1113) [spring-boot-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at nu.yona.server.AdminServiceApplication.main(AdminServiceApplication.java:50) [main/:na]
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.autoconfigure.security.SecurityProperties]: Factory method 'securityProperties' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/security/config/http/SessionCreationPolicy
  t org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        ... 18 common frames omitted
Caused by: java.lang.NoClassDefFoundError: org/springframework/security/config/http/SessionCreationPolicy
        at org.springframework.boot.autoconfigure.security.SecurityProperties.<init>(SecurityProperties.java:88) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration.securityProperties(SecurityFilterAutoConfiguration.java:72) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration$$EnhancerBySpringCGLIB$$37804ea.CGLIB$securityProperties$1(<generated>) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration$$EnhancerBySpringCGLIB$$37804ea$$FastClassBySpringCGLIB$$bf34b5e8.invoke(<generated>) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:355) ~[spring-context-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        at org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration$$EnhancerBySpringCGLIB$$37804ea.securityProperties(<generated>) ~[spring-boot-autoconfigure-1.3.1.RELEASE.jar:1.3.1.RELEASE]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_65]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_65]
        at sun.reflect.DelegatinAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_65]
        at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_65]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) ~[spring-beans-4.2.4.RELEASE.jar:4.2.4.RELEASE]
        ... 19 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.springframework.security.config.http.SessionCreationPolicy
        at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_65]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_65]
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_65]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_65]
        ... 31 common frames omitted

2016-01-08 22:14:54.888  INFO 10996 --- [           main] .b.l.ClasspathLoggingApplicationListener : Application failed to start with classpath: [file:/C:/Users/Bert/workspace/yona-server/adminservice/build/classes/main/, file:/C:/Users/Bert/workspace/yona-server/adminservice/build/resources/main/, file:/C:/Users/Bert/workspace/yona-server/core/build/libs/Core-0.0.8-SNAPSHOT.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-data-jpa/1.3.1.RELEASE/2ab6101dff6b2a35dd7ee5ed1b904af96504d3f1/spring-boot-starter-data-jpa-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-hateoas/1.3.1.RELEASE/9810eb3cb1abdc3cf7f2e0edfb1d2ca505601363/spring-boot-starter-hateoas-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-web/1.3.1.RELEASE/dd3c0e6cdee57e591eabc95a33b16233547eec91/spring-boot-starter-web-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-swagger2/2.3.0/f4ddcfb77ad8fb40d647d65ba6e08784d6aba615/springfox-swagger2-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-s                                     wagger-ui/2.3.0/8dfc729962bc639e6001183b474a65e9d71b681f/springfox-swagger-ui-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-databind/2.6.3/5c4fcae53dd82e2c549b8322d78c6ff47c94c8a8/jackson-databind-2.6.3.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/18.0/cce0823396aa693798f8882e64213b1772032b09/guava-18.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-tomcat/1.3.1.RELEASE/3c21bd7269af0df9b2d1b67581eec191e70faeb5/spring-boot-starter-tomcat-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.hsqldb/hsqldb/2.3.3/d12d506194447dffb8a2b05dd2c50b0cdd73d9d1/hsqldb-2.3.3.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-web/4.0.3.RELEASE/5f0233d94ca53ac8710780b43791f633f970480a/spring-security-web-4.0.3.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context-support/4.2.4.RELEASE/428f5d6ab3eba5ddd0b89474379ccfe867a42cc1/spring-context-support-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.atteo/evo-inflector/1.2.1/b9cdd1e7dc20a222db0853dfb152ef349c7d0eed/evo-inflector-1.2.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-validator/commons-validator/1.4.1/2231238e391057a53f92bde5bbc588622c1956c3/commons-validator-1.4.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-lang/commons-lang/2.4/16313e02a793435009f1e458fa4af5d879f6fb11/commons-lang-2.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/javax.mail/mail/1.4.7/9add058589d5d85adeb625859bf2c5eeaaedf12d/mail-1.4.7.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.velocity/velocity/1.7/2ceb567b8f3f21118ecdec129fe1271dbc09aa7a/velocity-1.7.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.ldap/spring-ldap-core/2.0.4.RELEASE/f84822af651415f8ba263fa6c5c8cdd8989b53bb/spring-                                                                                                                                                                ldap-core-2.0.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy/groovy-all/2.4.4/b22748b6cf9a38c9777792175507a679043cdd64/groovy-all-2.4.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.codehaus.groovy.modules.http-builder/http-builder/0.7.1/a21771ae3da5ce9f5c4d7a60c1e716666aa2acf9/http-builder-0.7.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter/1.3.1.RELEASE/622e02ce77b3bea202b596a6fa0c40525ec81e1c/spring-boot-starter-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-aop/1.3.1.RELEASE/898d3fe97caf7dd88b42357e1643318753b0cf4e/spring-boot-starter-aop-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-jdbc/1.3.1.RELEASE/6fdd3124a3aa9eaa4d4ac0adde03c734676e40bd/spring-boot-starter-jdbc-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-entitymanager/4.3.11.Final/27a119fcc2b91c50e5285dd11158fac2c38c9d1b/hibernate-entitymanager-4.3.11.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/javax.transaction/javax.transaction-api/1.2/d81aff979d603edd90dcd8db2abc1f4ce6479e3e/javax.transaction-api-1.2.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-jpa/1.9.2.RELEASE/6026f5ca41b1c7c368d99cdf5cf9bf8d737ecdb2/spring-data-jpa-1.9.2.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aspects/4.2.4.RELEASE/f8b7fe22a4a1be320c9148499437c6347c1701f1/spring-aspects-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.hateoas/spring-hateoas/0.19.0.RELEASE/77b3b15c301d2517356b76304a2670df33ef2e2c/spring-hateoas-0.19.0.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.plugin/spring-plugin-core/1.2.0.RELEASE/f380e7760032e7d929184f8ad8a33716b75c0657/spring-plugin-                                                                                                                                                                core-1.2.0.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-validation/1.3.1.RELEASE/47f424e3c7ed629b988b1976e52b662834a76856/spring-boot-starter-validation-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-web/4.2.4.RELEASE/d4bcc6f4d8b64d7af9b67bc17f0d5106dce97926/spring-web-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-webmvc/4.2.4.RELEASE/cf4317be9c83b4c1c65ce2d3bb96673ac546030a/spring-webmvc-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.mapstruct/mapstruct/1.0.0.Final/794bb2c7d3dd69211deb22857d92fb4c5361be3f/mapstruct-1.0.0.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.swagger/swagger-annotations/1.5.4/2de9c10fdf1e3f97cfd1e54fb86b7b145c5c01a4/swagger-annotations-1.5.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.swagger/swagger-models/1.5.4/5bde7a5e91850f21eec61afd445187c9234338e9/swagger-models-1.5.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-spi/2.3.0/fd5f41eb0e0382d8b3dedb95685b54aa5b754e2d/springfox-spi-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-schema/2.3.0/2098d7068f73f33b4ad5d2f1417753eb6b1b45ca/springfox-schema-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-swagger-common/2.3.0/a1e73d197243902d28b488642b39526a7d9853a0/springfox-swagger-common-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-spring-web/2.3.0/9aa273e84ba25af81699562426fc5150b6615bc/springfox-spring-web-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/com.fasterxml/classmate/1.2.0/3df977abee5df39041e60c763840cd948581971/classmate-1.2.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.slf4j/slf4j-api/1.7.13/7fcf30c25b8f4a9379b9dad0d3f487b25272c026/slf4j-api-1.7.13.jar, file:/C:/Users/Bert/.gradle/caches/                                                                                                                                                                modules-2/files-2.1/org.springframework.plugin/spring-plugin-metadata/1.2.0.RELEASE/97223fc496b6cab31602eedbd4202aa4fff0d44f/spring-plugin-metadata-1.2.0.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-annotations/2.6.4/ecbd5ad4efa46c8e88522751a80841a49e81a34d/jackson-annotations-2.6.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/com.fasterxml.jackson.core/jackson-core/2.6.4/27d3a9f7bbdcf72d93c9b2da7017e39551bfa9fb/jackson-core-2.6.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-core/8.0.30/87b12667b258d0135f7cf4234030a5ccbb55193f/tomcat-embed-core-8.0.30.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-el/8.0.30/b97d5ff750126d7fdaf412aeec219306bd157e50/tomcat-embed-el-8.0.30.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-logging-juli/8.0.30/c19b5c37e1f67bf58f9726b438d5323411cd43c6/tomcat-embed-logging-juli-8.0.30.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.tomcat.embed/tomcat-embed-websocket/8.0.30/84cf6feff7ed4f73689b4fa076cc6ec33851e075/tomcat-embed-websocket-8.0.30.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/aopalliance/aopalliance/1.0/235ba8b489512805ac13a8f9ea77a1ca5ebe3e8/aopalliance-1.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.security/spring-security-core/4.0.3.RELEASE/9f420c5742ad063970c5d33f60680a1cee777aa5/spring-security-core-4.0.3.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-beans/4.2.4.RELEASE/dc8e0874b53435f3e277d9da5aebd8b93cc7cf64/spring-beans-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-context/4.2.4.RELEASE/23cd0109e4eafc5629547e3680b0c4031e82efdd/spring-context-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/4.2.4.RELEASE/160ccd89230753                                                                                                                                                                d4f49477a967f5876b034d9745/spring-core-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-expression/4.2.4.RELEASE/15b6f6d61bc68fe2cc6cbd63e2329601afb8b39/spring-expression-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-beanutils/commons-beanutils/1.9.2/7a87d845ad3a155297e8f67d9008f4c1e5656b71/commons-beanutils-1.9.2.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-digester/commons-digester/2.1/73a8001e7a54a255eef0f03521ec1805dc738ca0/commons-digester-2.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-logging/commons-logging/1.2/4bfc12adfe4842bf07b657f0369c4cb522955686/commons-logging-1.2.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-collections/commons-collections/3.2.2/8ad72fe39fa8c91eaaf12aadb21e0c3661fe26d5/commons-collections-3.2.2.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/javax.activation/activation/1.1/e6cb541461c2834bdea3eb920f1884d1eb508b50/activation-1.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-tx/4.2.4.RELEASE/66e1a131263f5f9ba95943061b22ff2666930ca6/spring-tx-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpclient/4.5.1/7e3cecc566df91338c6c67883b89ddd05a17db43/httpclient-4.5.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/net.sf.json-lib/json-lib/2.3/f35340c0a0380141f62c72b76c8fb4bfa638d8c1/json-lib-2.3-jdk15.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/net.sourceforge.nekohtml/nekohtml/1.9.22/4f54af68ecb345f2453fb6884672ad08414154e3/nekohtml-1.9.22.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/xml-resolver/xml-resolver/1.2/3d0f97750b3a03e0971831566067754ba4bfd68c/xml-resolver-1.2.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot/1.3.1.RELEASE/7ea554d1d14e180ee080abc3e7c19e316a700188/spring-boot-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/mod                                                                                                                                                                ules-2/files-2.1/org.springframework.boot/spring-boot-autoconfigure/1.3.1.RELEASE/16ecb1f0b3ccbc8ecd52fa9de57a273d5a3eea00/spring-boot-autoconfigure-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.boot/spring-boot-starter-logging/1.3.1.RELEASE/ba9d2d5094d83cf40dab474d6526befb5ce85a74/spring-boot-starter-logging-1.3.1.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.yaml/snakeyaml/1.16/d64fb662c9e42789149f5078a62a22edda786c6a/snakeyaml-1.16.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-aop/4.2.4.RELEASE/3329cf71b4bc49c9767ca4f0704ed7b773f29fba/spring-aop-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.aspectj/aspectjweaver/1.8.7/f753e78bbe484e58b3b4e5ce3cc1751e50d11f6c/aspectjweaver-1.8.7.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.tomcat/tomcat-jdbc/8.0.30/44765cbbe3ea864923c16f19e081522f8058a6a5/tomcat-jdbc-8.0.30.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-jdbc/4.2.4.RELEASE/7aa1c3c817b0a04796e6570a2c07ac23248c1ee0/spring-jdbc-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging/3.3.0.Final/3616bb87707910296e2c195dc016287080bba5af/jboss-logging-3.3.0.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.jboss.logging/jboss-logging-annotations/1.2.0.Beta1/2f437f37bb265d9f8f1392823dbca12d2bec06d6/jboss-logging-annotations-1.2.0.Beta1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-core/4.3.11.Final/536ac0021240d97db99c7d2983067cef1a6f3af5/hibernate-core-4.3.11.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/dom4j/dom4j/1.6.1/5d3ccc056b6f056dbf0dddfdf43894b9065a8f94/dom4j-1.6.1.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.hibernate.common/hibernate-commons-annotations/4.0.5.Final/2a581b9edb8168e45060d8bad8b7f46712d2c52c/hibernate-commons-annotations-4.0.5.Final.jar, fi                                                                                                                                                                le:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.hibernate.javax.persistence/hibernate-jpa-2.1-api/1.0.0.Final/5e731d961297e5a07290bfaf3db1fbc8bbbf405a/hibernate-jpa-2.1-api-1.0.0.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.javassist/javassist/3.18.1-GA/d9a09f7732226af26bf99f19e2cffe0ae219db5b/javassist-3.18.1-GA.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework.data/spring-data-commons/1.11.2.RELEASE/6422e6f06584244d846d6bc74e5f2c163701b89a/spring-data-commons-1.11.2.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.springframework/spring-orm/4.2.4.RELEASE/f8cc11443ea62a189c4574e54116465960c490eb/spring-orm-4.2.4.RELEASE.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.slf4j/jcl-over-slf4j/1.7.13/d78d2242e14e4182625152d225f76ae52b43491d/jcl-over-slf4j-1.7.13.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.hibernate/hibernate-validator/5.2.2.Final/990905cd9184450c5f3e929ab2566305e3a67fa1/hibernate-validator-5.2.2.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/io.springfox/springfox-core/2.3.0/32fe407471bd68a19614d495d3907e3a9a42189c/springfox-core-2.3.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.httpcomponents/httpcore/4.4.4/b31526a230871fbe285fbcbe2813f9c0839ae9b0/httpcore-4.4.4.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/commons-codec/commons-codec/1.9/9ce04e34240f674bc72680f8b843b1457383161a/commons-codec-1.9.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/net.sf.ezmorph/ezmorph/1.0.6/1e55d2a0253ea37745d33062852fd2c90027432/ezmorph-1.0.6.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/xerces/xercesImpl/2.11.0/9bb329db1cfc4e22462c9d6b43a8432f5850e92c/xercesImpl-2.11.0.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-classic/1.1.3/d90276fff414f06cb375f2057f6778cd63c6082f/logback-classic-1.1.3.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.slf4j/jul-to-slf4j/1.7.                                                                                                                                                                13/43759e986de5fec7045e35e9533e5ad2f6cd1b05/jul-to-slf4j-1.7.13.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.slf4j/log4j-over-slf4j/1.7.13/b5f4685073a6ffba6bf7e1d51e2b5fb83bdfa953/log4j-over-slf4j-1.7.13.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.apache.tomcat/tomcat-juli/8.0.30/48258c438c681d1322ccb15f01d58238d14c1274/tomcat-juli-8.0.30.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/antlr/antlr/2.7.7/83cd2cd674a217ade95a4bb83a8a14f351f48bd0/antlr-2.7.7.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/org.jboss/jandex/1.1.0.Final/e84a2122e76f0b6503be78094ddf2108057ac15f/jandex-1.1.0.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/javax.validation/validation-api/1.1.0.Final/8613ae82954779d518631e05daa73a6a954817d5/validation-api-1.1.0.Final.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/ch.qos.logback/logback-core/1.1.3/e3c02049f2dbbc764681b40094ecf0dcbc99b157/logback-core-1.1.3.jar, file:/C:/Users/Bert/.gradle/caches/modules-2/files-2.1/xml-apis/xml-apis/1.4.01/3789d9fada2d3d458c4ba2de349d48780f381ee3/xml-apis-1.4.01.jar]
:adminservice:bootRun FAILED

There are two ways to get rid of this issue:

  • Add org.springframework.security:spring-security-config to the runtime dependencies. This addresses the startup issue, but enables basic authentication, which is undesirable in our situation
  • Exclude SecurityFilterAutoConfiguration from autoconfiguration.

Can't you automatically exclude this autoconfiguration when the Spring Security Config is unavailable?

I noticed a similar issue in apache/grails-spring-security#401. I do not know whether their fix could be applied to Spring Boot too.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 9, 2016
@wilkinsona wilkinsona added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 9, 2016
@wilkinsona
Copy link
Member

Yes, it looks like we need to tighten up the conditions of the auto-configuration for the filter.

I'm intrigued by your use case for Spring Security that means you weren't depending on its config module. How are you using it?

@wilkinsona wilkinsona modified the milestones: 1.3.3, 1.4.0.M1, 1.3.2 Jan 9, 2016
@Bert-R
Copy link
Author

Bert-R commented Jan 9, 2016

Thanks for looking into this!
We are not directly using Spring Security. See our Gradle files here and here.

Bert-R added a commit to yonadev/yona-server that referenced this issue Jan 9, 2016
* Upgraded from 1.2.7 to 1.3.1
* Replaced run with bootRun
* Excluded org.springframework.boot.autoconfigure.security.SecurityFilterAutoConfiguration from autoconfiguration (see issue spring-projects/spring-boot#4919)
* Updated MessagingTest.groovy, as the self-link is now canonical, not templated. This is a fix for https://jira.spring.io/browse/DATACMNS-515.
* Removed the dummy mainClassName from build.gradle in core
* Removed a catch of UnsupportedEncodingException from PlivoSmsService, as that's not being thrown anymore
@snicoll
Copy link
Member

snicoll commented Jan 11, 2016

Duplicates #3888

@snicoll snicoll closed this as completed Jan 11, 2016
@snicoll
Copy link
Member

snicoll commented Jan 11, 2016

@Bert-R I guess @wilkinsona meant to ask why security kicks in. You must have a configuration from the management.security namespace somewhere. Can you check and let us know on #3888?

@wilkinsona
Copy link
Member

@snicoll This isn't a duplicate of #3888 as the stack is different. This one is caused by SecurityFilterAutoConfiguration. Furthermore, there's no actuator involved here.

@wilkinsona wilkinsona reopened this Jan 11, 2016
@Bert-R
Copy link
Author

Bert-R commented Jan 11, 2016

@snicoll The string management.security does not occur in our repository.

@wilkinsona wilkinsona self-assigned this Jan 13, 2016
Bert-R added a commit to yonadev/yona-server that referenced this issue Feb 11, 2016
Removed the workaround for spring-projects/spring-boot#4919, as that issue is fixed.
@Bert-R
Copy link
Author

Bert-R commented Feb 11, 2016

I just removed our workaround.
Thanks for fixing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants