Closed RawSanj closed 6 years ago
Thanks for the sample. This is a duplicate of https://github.com/spring-projects/spring-boot/issues/12457. In this case, it's Spring Cloud Open Service Broker that's causing Commons Logging to get onto the class path:
[INFO] +- org.springframework.cloud:spring-cloud-open-service-broker-starter-webmvc:jar:2.0.0.M2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:2.0.1.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.1.RELEASE:compile
[INFO] | | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.5:compile
[INFO] | | | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | | | | \- com.fasterxml.jackson.core:jackson-core:jar:2.9.5:compile
[INFO] | | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.5:compile
[INFO] | | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.5:compile
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.5:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.0.1.RELEASE:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.29:compile
[INFO] | | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.29:compile
[INFO] | | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.29:compile
[INFO] | | +- org.hibernate.validator:hibernate-validator:jar:6.0.9.Final:compile
[INFO] | | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | | +- org.springframework:spring-web:jar:5.0.5.RELEASE:compile
[INFO] | | | \- org.springframework:spring-beans:jar:5.0.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-webmvc:jar:5.0.5.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.0.5.RELEASE:compile
[INFO] | | +- org.springframework:spring-context:jar:5.0.5.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.0.5.RELEASE:compile
[INFO] | \- org.springframework.cloud:spring-cloud-open-service-broker-autoconfigure:jar:2.0.0.M2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-security:jar:2.0.1.RELEASE:compile
[INFO] | | +- org.springframework.security:spring-security-config:jar:5.0.4.RELEASE:compile
[INFO] | | | \- org.springframework.security:spring-security-core:jar:5.0.4.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-web:jar:5.0.4.RELEASE:compile
[INFO] | \- org.springframework.cloud:spring-cloud-open-service-broker-core:jar:2.0.0.M2:compile
[INFO] | \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2.2:compile
Please open an issue against that project as they should not be pulling in Commons Logging as a transitive dependency.
Spring Framework's handling of Commons Logging polluting the classpath will be improved in SPR-16585.
Before these changes are available, you can work around the problem by excluding Commons Logging:
diff --git a/pom.xml b/pom.xml
index 489bee2..284a881 100644
--- a/pom.xml
+++ b/pom.xml
@@ -31,6 +31,12 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-open-service-broker-starter-webmvc</artifactId>
<version>2.0.0.M2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
Bug report:
Spring Boot 2.0.X exists without giving any proper error info when
application.yml
is invalid and spring-cloud-open-service-broker-starter-webmvc is on classpath.Sample Application - boot-open-service-yaml-issue
Logs when running above Application:
Note:
I was going to create this Issue at spring-cloud-open-service-broker but when I update the Spring Boot version to 1,5,x I get the expected Invalid YAML error. So it seems to be Spring Boot 2.X issue occurring due to some auto-configuration in Spring Cloud Open Service Broker,