java.lang.annotation.AnnotationFormatError in Spring Redis integration - spring

I have developed a library (smartconnect-commons) which has integration with redis caching using spring-data-redis. This library can be plugged-in with any application which ever wants to use redis. JUnit tests in that library are successful. No issues so far.
Now I am using above library as a dependency in a Spring boot app. When running the spring boot app, it is failed with application context initialization errors.
2017-08-17 10:38:25,118 [main] ERROR org.springframework.boot.SpringApplication - - Application startup failed
java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.redis.repository.configuration.EnableRedisRepositories.repositoryFactoryBeanClass()
at java.lang.reflect.Method.getDefaultValue(Method.java:612)
at sun.reflect.annotation.AnnotationType.<init>(AnnotationType.java:132)
at sun.reflect.annotation.AnnotationType.getInstance(AnnotationType.java:85)
at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:266)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
at java.lang.Class.createAnnotationData(Class.java:3521)
at java.lang.Class.annotationData(Class.java:3510)
at java.lang.Class.getAnnotations(Class.java:3446)
at org.springframework.core.type.StandardAnnotationMetadata.<init>(StandardAnnotationMetadata.java:68)
at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport.getConfigurationSource(AbstractRepositoryConfigurationSourceSupport.java:65)
at org.springframework.boot.autoconfigure.data.AbstractRepositoryConfigurationSourceSupport.registerBeanDefinitions(AbstractRepositoryConfigurationSourceSupport.java:58)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsFromRegistrars(ConfigurationClassBeanDefinitionReader.java:354)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:143)
at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:116)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:320)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:228)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:270)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:93)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:686)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:524)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:314)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1162)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1151)
at com.adp.smartconnect.SmartconnectWPInitializer.main(SmartconnectWPInitializer.java:32)
Looks like there is a mis match with spring dependency versions, I spent lot of time but could not figure out that. Please see dependency tree of spring boot app.
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) # smartconnect-wage-payments-writer ---
[INFO] com.adp.smartconnect:smartconnect-wage-payments-writer:war:1.0.0-SNAPSHOT
[INFO] +- com.adp.smartconnect:smartconnect-config:jar:2.3.42:compile
[INFO] | +- org.mule.modules:mule-module-mongo:jar:5.0.999:compile
[INFO] | \- org.mongodb:mongo-java-driver:jar:3.4.2:compile
[INFO] +- com.adp.smartconnect:smartconnect-commons:jar:1.0.9-SNAPSHOT:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.8.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-redis:jar:1.8.3.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-keyvalue:jar:1.2.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-oxm:jar:4.3.8.RELEASE:compile
[INFO] | | +- org.springframework:spring-context-support:jar:4.3.8.RELEASE:compile
[INFO] | | \- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
[INFO] | +- redis.clients:jedis:jar:2.9.0:compile
[INFO] | | \- org.apache.commons:commons-pool2:jar:2.4.2:compile
[INFO] | +- org.springframework:spring-core:jar:4.3.8.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:4.3.8.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-mongodb:jar:1.10.3.RELEASE:compile
[INFO] | | +- org.springframework:spring-expression:jar:4.3.8.RELEASE:compile
[INFO] | | \- org.springframework.data:spring-data-commons:jar:1.13.3.RELEASE:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.8.8:compile
[INFO] | +- org.json:json:jar:20140107:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.8:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | +- com.adp.avs.domain:cdm:jar:1.0.9:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-jsonSchema:jar:2.8.8:compile
[INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- com.adp.smartconnect:avs-prod-payload:jar:2.3.3:compile
[INFO] | +- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] | +- commons-collections:commons-collections:jar:3.2.2:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.3:compile
[INFO] | +- org.projectlombok:lombok:jar:1.16.16:compile
[INFO] | +- com.adp.smartconnect:smartconnect-mongo-cdm-library-cdm-0.9:jar:1.0.90:compile
[INFO] | | +- org.apache.commons:commons-collections4:jar:4.1:compile
[INFO] | | \- org.mule.modules:smartconnect-tracking-service-connector-cdm-0.9:jar:1.0.90:compile
[INFO] | | \- org.mule.tools.devkit:mule-devkit-shade:jar:3.8.0:compile
[INFO] | +- org.apache.logging.log4j:log4j-api:jar:2.7:compile
[INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.7:compile
[INFO] | \- ch.qos.logback:logback-classic:jar:1.1.11:compile
[INFO] | \- ch.qos.logback:logback-core:jar:1.1.11:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.3.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:1.5.3.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:1.5.3.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.3.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.3.RELEASE:compile
[INFO] | | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.17:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.3.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.14:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.14:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.14:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:5.3.5.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:1.1.0.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.3:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.8.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.3.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.3.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.2.1:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] | +- org.assertj:assertj-core:jar:2.6.0:test
[INFO] | +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | | \- org.objenesis:objenesis:jar:2.1:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | \- org.skyscreamer:jsonassert:jar:1.4.0:test
[INFO] | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] +- com.typesafe.akka:akka-actor_2.11:jar:2.5.0:compile
[INFO] | +- org.scala-lang:scala-library:jar:2.11.8:compile
[INFO] | +- com.typesafe:config:jar:1.3.1:compile
[INFO] | \- org.scala-lang.modules:scala-java8-compat_2.11:jar:0.7.0:compile
[INFO] +- com.typesafe.akka:akka-remote_2.11:jar:2.5.0:compile
[INFO] | +- com.typesafe.akka:akka-stream_2.11:jar:2.5.0:compile
[INFO] | | +- org.reactivestreams:reactive-streams:jar:1.0.0:compile
[INFO] | | \- com.typesafe:ssl-config-core_2.11:jar:0.2.1:compile
[INFO] | | \- org.scala-lang.modules:scala-parser-combinators_2.11:jar:1.0.4:compile
[INFO] | +- com.typesafe.akka:akka-protobuf_2.11:jar:2.5.0:compile
[INFO] | +- io.netty:netty:jar:3.10.6.Final:compile
[INFO] | +- io.aeron:aeron-driver:jar:1.2.3:compile
[INFO] | \- io.aeron:aeron-client:jar:1.2.3:compile
[INFO] | \- org.agrona:agrona:jar:0.9.3:compile
[INFO] +- com.typesafe.akka:akka-cluster_2.11:jar:2.5.0:compile
[INFO] +- com.typesafe.akka:akka-testkit_2.11:jar:2.5.0:compile
[INFO] +- com.typesafe.akka:akka-slf4j_2.11:jar:2.5.0:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- javax.jms:javax.jms-api:jar:2.0:compile
[INFO] +- com.ibm.mq:mqallclient:jar:8.0:compile
[INFO] +- org.springframework:spring-jms:jar:4.3.0.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.8.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:4.3.8.RELEASE:compile
[INFO] | +- org.springframework:spring-context:jar:4.3.8.RELEASE:compile
[INFO] | +- org.springframework:spring-messaging:jar:4.3.8.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:4.3.8.RELEASE:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.0:compile
[INFO] +- commons-io:commons-io:jar:2.5:compile
[INFO] +- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | +- commons-lang:commons-lang:jar:2.4:compile
[INFO] | +- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] | \- commons-digester:commons-digester:jar:2.1:compile
[INFO] | \- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] +- org.mockito:mockito-all:jar:1.10.19:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.7.0:test
[INFO] | \- org.powermock:powermock-api-mockito-common:jar:1.7.0:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.7.0:test
[INFO] +- org.powermock:powermock-module-junit4:jar:1.7.0:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.7.0:test
[INFO] | +- org.powermock:powermock-reflect:jar:1.7.0:test
[INFO] | \- org.powermock:powermock-core:jar:1.7.0:test
[INFO] | \- org.javassist:javassist:jar:3.21.0-GA:test
[INFO] \- junit:junit:jar:4.12:test

I observed that spring-data-redis module is not working with spring boot 1.5.3 version. So when I upgraded spring boot version to 1.5.6, issue is resolved.

I had the same problem.
[ERROR] [org.springframework.boot.SpringApplication:771] Application startup failed
java.lang.annotation.AnnotationFormatError: Invalid default: public abstract java.lang.Class org.springframework.data.redis.repository.configuration.EnableRedisRepositories.repositoryFactoryBeanClass()
That is because I pull some new code from git, which including code about redis, need the spring-boot-starter-data-redis library.
As the problems given by IDEA, I press alt+enter to auto import this library.
So the problem comes.
I finally click "In IDEA menu File -->Project Structure->Project Settings-->Libraries"
I found the version here is not the same version in build.gradle.
I guess this version maybe mismatch the other libraries of spring boot.
So I remove this library and try to run gradle command to build the project.
I solved the problem in this way.

Related

see a strange php exception in a springboot application

I recently deployed a spring boot application on google cloud compute engine and I see the below error during deployment. The application started fine and everything else works perfectly. Is it a known issue or how can I investigate into this. I looked online here and there were no clear actions. How do I proceed to make sure that my application is safe from this vulnerability.
2021-02-28 15:41:11.249 INFO 9385 --- [nio-8080-exec-5] o.apache.coyote.http11.Http11Processor : Error parsing HTTP request header
Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
java.lang.IllegalArgumentException: Invalid character found in the request target [/index.php?s=/Index/\think\app/invokefunction&function=call_user_func_array&vars[0]=md5&vars[1][]=HelloThinkPHP21]. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:490) ~[tomcat-embed-core-9.0.41.jar!/:9.0.41]
at org.apache.
Dependency tree: I looked for php related dependencies but couldn't find any.
[INFO]
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) # assessments ---
[INFO] com.lte.assessment:assessments:jar:0.0.1-SNAPSHOT
[INFO] +- org.spockframework:spock-core:jar:1.3-groovy-2.4:test
[INFO] | +- org.codehaus.groovy:groovy-all:jar:2.4.15:test
[INFO] | \- junit:junit:jar:4.13.1:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] +- org.spockframework:spock-spring:jar:1.3-groovy-2.4:test
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.4.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.4.1:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.4.1:compile
[INFO] | | +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.3.2:compile
[INFO] | +- jakarta.transaction:jakarta.transaction-api:jar:1.3.3:compile
[INFO] | +- jakarta.persistence:jakarta.persistence-api:jar:2.2.3:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.4.25.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.27.0-GA:compile
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.10.18:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.1.3.Final:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.3:compile
[INFO] | | +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.2.Final:compile
[INFO] | | \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.3:compile
[INFO] | | +- org.glassfish.jaxb:txw2:jar:2.3.3:compile
[INFO] | | \- com.sun.istack:istack-commons-runtime:jar:3.0.11:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.4.2:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.4.2:compile
[INFO] | | \- org.springframework:spring-orm:jar:5.3.2:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.3.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-cache:jar:2.4.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.4.1:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.4.1:compile
[INFO] | | | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | | | +- org.apache.logging.log4j:log4j-to-slf4j:jar:2.13.3:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.13.3:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.27:compile
[INFO] | \- org.springframework:spring-context-support:jar:5.3.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.4.1:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.4.1:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:2.4.1:compile
[INFO] | | \- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.3:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.6.2:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] +- net.sf.ehcache:ehcache:jar:2.10.6:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.4.1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.4.1:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.3:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.4.1:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.41:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.41:compile
[INFO] | +- org.springframework:spring-web:jar:5.3.2:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.3.2:compile
[INFO] | \- org.springframework:spring-expression:jar:5.3.2:compile
[INFO] +- org.springframework.boot:spring-boot-devtools:jar:2.4.1:runtime
[INFO] | +- org.springframework.boot:spring-boot:jar:2.4.1:compile
[INFO] | \- org.springframework.boot:spring-boot-autoconfigure:jar:2.4.1:compile
[INFO] +- com.h2database:h2:jar:1.4.200:runtime
[INFO] +- org.projectlombok:lombok:jar:1.18.16:compile (optional)
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.4.1:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.4.1:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.4.1:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.3:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] | | \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] | +- org.assertj:assertj-core:jar:3.18.1:test
[INFO] | +- org.hamcrest:hamcrest:jar:2.2:test
[INFO] | +- org.junit.jupiter:junit-jupiter:jar:5.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.7.0:test
[INFO] | | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.7.0:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.7.0:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.7.0:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.7.0:test
[INFO] | +- org.mockito:mockito-core:jar:3.6.28:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.10.18:test
[INFO] | | \- org.objenesis:objenesis:jar:3.1:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.6.28:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:runtime
[INFO] | +- org.springframework:spring-core:jar:5.3.2:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.3.2:compile
[INFO] | +- org.springframework:spring-test:jar:5.3.2:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.7.0:test
[INFO] +- mysql:mysql-connector-java:jar:8.0.22:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:2.4.1:compile
[INFO] | +- org.springframework:spring-aop:jar:5.3.2:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:5.4.2:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:5.4.2:compile
[INFO] +- org.springframework.security:spring-security-ldap:jar:5.4.2:compile
[INFO] | +- org.springframework.ldap:spring-ldap-core:jar:2.3.3.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-core:jar:5.4.2:compile
[INFO] | +- org.springframework:spring-beans:jar:5.3.2:compile
[INFO] | +- org.springframework:spring-context:jar:5.3.2:compile
[INFO] | \- org.springframework:spring-tx:jar:5.3.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-thymeleaf:jar:2.4.1:compile
[INFO] | +- org.thymeleaf:thymeleaf-spring5:jar:3.0.11.RELEASE:compile
[INFO] | | \- org.thymeleaf:thymeleaf:jar:3.0.11.RELEASE:compile
[INFO] | | +- org.attoparser:attoparser:jar:2.0.5.RELEASE:compile
[INFO] | | \- org.unbescape:unbescape:jar:1.1.6.RELEASE:compile
[INFO] | \- org.thymeleaf.extras:thymeleaf-extras-java8time:jar:3.0.4.RELEASE:compile
[INFO] +- org.springframework.security.oauth:spring-security-oauth2:jar:2.1.0.RELEASE:compile
[INFO] | +- commons-codec:commons-codec:jar:1.15:compile
[INFO] | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] +- org.springframework.security:spring-security-jwt:jar:1.0.9.RELEASE:compile
[INFO] | \- org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | \- org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] +- org.springframework.boot:spring-boot-properties-migrator:jar:2.4.1:runtime
[INFO] | \- org.springframework.boot:spring-boot-configuration-metadata:jar:2.4.1:runtime
[INFO] +- org.springframework:spring:jar:2.0-m1:compile
[INFO] | \- commons-logging:commons-logging:jar:1.0.4:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.4.1:compile
[INFO] | \- com.sun.mail:jakarta.mail:jar:1.6.5:compile
[INFO] | \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- io.springfox:springfox-swagger2:jar:2.6.1:compile
[INFO] | +- io.swagger:swagger-annotations:jar:1.5.10:compile
[INFO] | +- io.swagger:swagger-models:jar:1.5.10:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.3:compile
[INFO] | +- io.springfox:springfox-spi:jar:2.6.1:compile
[INFO] | | \- io.springfox:springfox-core:jar:2.6.1:compile
[INFO] | +- io.springfox:springfox-schema:jar:2.6.1:compile
[INFO] | +- io.springfox:springfox-swagger-common:jar:2.6.1:compile
[INFO] | +- io.springfox:springfox-spring-web:jar:2.6.1:compile
[INFO] | +- com.google.guava:guava:jar:18.0:compile
[INFO] | +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] | +- org.springframework.plugin:spring-plugin-core:jar:1.2.0.RELEASE:compile
[INFO] | +- org.springframework.plugin:spring-plugin-metadata:jar:1.2.0.RELEASE:compile
[INFO] | \- org.mapstruct:mapstruct:jar:1.0.0.Final:compile
[INFO] +- io.springfox:springfox-swagger-ui:jar:2.6.1:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:3.9:compile
[INFO] | +- org.apache.poi:poi:jar:3.9:compile
[INFO] | +- org.apache.poi:poi-ooxml-schemas:jar:3.9:compile
[INFO] | | \- org.apache.xmlbeans:xmlbeans:jar:2.3.0:compile
[INFO] | | \- stax:stax-api:jar:1.0.1:compile
[INFO] | \- dom4j:dom4j:jar:1.6.1:compile
[INFO] | \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.7:compile
[INFO] +- com.auth0:java-jwt:jar:3.4.0:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-databind:jar:2.11.3:compile
[INFO] | \- com.fasterxml.jackson.core:jackson-core:jar:2.11.3:compile
[INFO] +- org.springframework.kafka:spring-kafka:jar:2.6.4:compile
[INFO] | +- org.springframework:spring-messaging:jar:5.3.2:compile
[INFO] | +- org.springframework.retry:spring-retry:jar:1.3.0:compile
[INFO] | \- org.apache.kafka:kafka-clients:jar:2.6.0:compile
[INFO] | +- com.github.luben:zstd-jni:jar:1.4.4-7:compile
[INFO] | +- org.lz4:lz4-java:jar:1.7.1:compile
[INFO] | \- org.xerial.snappy:snappy-java:jar:1.1.7.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-validation:jar:2.4.1:compile
[INFO] | \- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] \- org.hibernate.validator:hibernate-validator:jar:7.0.0.Final:compile
[INFO] +- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] \- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile

Hibernate validator issue in spring boot on PCF

Deployment to Pivotal cloud foundry of my spring boot app fails with the following error:
Error creating bean with name 'tomcatEmbeddedServletContainerFactory' defined in class path resource [org/springframework/boot/autoconfigure/web/EmbeddedServletContainerAutoConfiguration$EmbeddedTomcat.class]:
java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
Using its java buildpack 4.17.2
Problem only in cloud foundry deployment, locally works fine.
Cleaned up dependencies, using spring boot 1.5.19 and its started validator.
How to get rid of this missing dependency? spring-boot-starter-validation includes hibernate validator.
[INFO] +- org.springframework.boot:spring-boot-starter:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-logging:jar:1.5.19.RELEASE:compile
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | \- org.slf4j:log4j-over-slf4j:jar:1.7.25:compile
[INFO] | +- org.springframework:spring-core:jar:4.3.22.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.17:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.5.19.RELEASE:compile
[INFO] | | +- org.apache.tomcat.embed:tomcat-embed-core:jar:8.5.37:compile
[INFO] | | | \- org.apache.tomcat:tomcat-annotations-api:jar:8.5.37:compile
[INFO] | | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:8.5.37:compile
[INFO] | +- org.springframework:spring-web:jar:4.3.22.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:4.3.22.RELEASE:compile
[INFO] | \- org.springframework:spring-webmvc:jar:4.3.22.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:4.3.22.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-validation:jar:1.5.19.RELEASE:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:8.5.37:compile
[INFO] | \- org.hibernate:hibernate-validator:jar:5.3.6.Final:compile
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
[INFO] | \- com.fasterxml:classmate:jar:1.3.1:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:1.5.19.RELEASE:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:4.3.22.RELEASE:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.0.12.Final:compile
[INFO] | | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | | +- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.0.Final:compile
[INFO] | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.1.Final:compile
[INFO] | +- org.hibernate:hibernate-entitymanager:jar:5.0.12.Final:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:1.11.18.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.13.18.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:4.3.22.RELEASE:compile
[INFO] | | \- org.springframework:spring-tx:jar:4.3.22.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:4.3.22.RELEASE:compile
[INFO] +- org.liquibase:liquibase-core:jar:3.6.3:compile
[INFO] | \- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-security:jar:1.5.19.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:4.3.22.RELEASE:compile
[INFO] | +- org.springframework.security:spring-security-config:jar:4.2.11.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-core:jar:4.2.11.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-web:jar:4.2.11.RELEASE:compile
[INFO] +- wsl-java-validate:wslvalidate4:jar:4.0.1:compile
[INFO] +- wsl-java-validate:asn1:jar:4.0.1:compile
[INFO] +- wsl-java-validate:jsafe:jar:4.0.1:compile
[INFO] +- wsl-java-validate:certj:jar:4.0.1:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.8.6:compile
[INFO] +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
[INFO] +- org.springframework.security:spring-security-jwt:jar:1.0.9.RELEASE:compile
[INFO] | \- org.bouncycastle:bcpkix-jdk15on:jar:1.56:compile
[INFO] | \- org.bouncycastle:bcprov-jdk15on:jar:1.56:compile
[INFO] +- org.springframework.boot:spring-boot-starter-quartz:jar:2.1.4.RELEASE:compile
[INFO] | \- org.quartz-scheduler:quartz:jar:2.3.1:compile
[INFO] | +- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] | \- com.zaxxer:HikariCP-java7:jar:2.4.13:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.5.19.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:1.5.19.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:1.5.19.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.2.0:test
[INFO] | | \- net.minidev:json-smart:jar:2.2.1:test
[INFO] | | \- net.minidev:accessors-smart:jar:1.1:test
[INFO] | | \- org.ow2.asm:asm:jar:5.0.3:test
[INFO] | +- org.assertj:assertj-core:jar:2.6.0:test
[INFO] | \- org.springframework:spring-test:jar:4.3.22.RELEASE:test
EDIT:
FIXED. Turns out it has been a problem caused by below jboss libraries I have picked up from another module of my webapp.
After excluding below libraries from target jar file, all works as expected.
Still strange my local deployments did not detect similar hibernate validator issues, need to understand more diffs between PCF java build packs and local java runtime.
[INFO] | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3.2:compile
[INFO] | | \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] | +- xml-security:xmlsec:jar:1.3.0:compile
[INFO] | +- com.sun.xml.rpc:jaxrpc-impl:jar:1.1.3_01:compile
[INFO] | +- com.sun.xml.rpc:jaxrpc-spi:jar:1.1.3_01:compile
[INFO] | +- com.sun.xml.fastinfoset:FastInfoset:jar:1.0.2:compile
[INFO] | +- jboss:jbossws-core:jar:1.0.4.GA:compile
[INFO] | +- jboss:jboss-common-client:jar:4.0.4.GA:compile
[INFO] | +- jboss.jbossws:jboss-jaxws-ext:jar:3.0.1-native-2.0.4.GA:compile
[INFO] | \- org.jboss:jbossxb:jar:2.0.3.GA:compile
[INFO] | +- org.jboss.logging:jboss-logging-spi:jar:2.0.5.GA:compile
[INFO] | +- org.jboss:jboss-common-core:jar:2.2.9.GA:compile
[INFO] | +- org.jboss:jboss-reflect:jar:2.0.2.GA:compile
[INFO] | +- xml-apis:xml-apis:jar:1.3.04:compile
[INFO] | +- xerces:xercesImpl:jar:2.9.1:compile
[INFO] | +- com.wutka:dtdparser:jar:1.21:compile
[INFO] | \- sun-jaxb:jaxb-api:jar:2.1.9:compile

Where is the slf4j binding?

I want to configure logging correctly in my project and removed the omnipresent warning
SLF4J: Found binding in [jar:file:/home/richter/.m2/repository/ch/qos/logback/logback-classic/1.1.8/logback-classic-1.1.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/richter/.m2/repository/org/glassfish/extras/glassfish-embedded-all/3.2-b06/glassfish-embedded-all-3.2-b06.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
by excluding logging implementations through Maven exclusions. Now, I ended up with
SLF4J: The requested version 1.5.6 by your slf4j binding is not compatible with [1.6, 1.7]
SLF4J: See http://www.slf4j.org/codes.html#version_mismatch for further details.
The referenced website paragraph doesn't contain any hints what to do and existing questions, like Exception thrown while using logback/slf4j, suggest to do what I did afaik. My mvn dependency:tree is now
[INFO] --- maven-dependency-plugin:2.10:tree (default-cli) # project1-web ---
[INFO] richtercloud:project1-web:war:1.0-SNAPSHOT
[INFO] +- richtercloud:project1-jar:jar:1.0-SNAPSHOT:compile
[INFO] | +- org.eclipse.persistence:eclipselink:jar:2.5.2:compile
[INFO] | | +- org.eclipse.persistence:javax.persistence:jar:2.1.0:compile
[INFO] | | \- org.eclipse.persistence:commonj.sdo:jar:2.1.1:compile
[INFO] | +- org.eclipse.persistence:org.eclipse.persistence.jpa.modelgen.processor:jar:2.5.2:compile
[INFO] | | +- org.eclipse.persistence:org.eclipse.persistence.core:jar:2.5.2:compile
[INFO] | | | \- org.eclipse.persistence:org.eclipse.persistence.asm:jar:2.5.2:compile
[INFO] | | \- org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.5.2:compile
[INFO] | | +- org.eclipse.persistence:org.eclipse.persistence.antlr:jar:2.5.2:compile
[INFO] | | \- org.eclipse.persistence:org.eclipse.persistence.jpa.jpql:jar:2.5.2:compile
[INFO] | +- commons-validator:commons-validator:jar:1.4.0:compile
[INFO] | | +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] | | \- commons-digester:commons-digester:jar:1.8:compile
[INFO] | +- org.jscience:jscience:jar:4.3.1:compile
[INFO] | | \- org.javolution:javolution:jar:5.2.3:compile
[INFO] | +- org.apache.solr:solr-solrj:jar:6.5.0:compile
[INFO] | | +- org.apache.httpcomponents:httpclient:jar:4.4.1:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.1:compile
[INFO] | | +- org.apache.httpcomponents:httpmime:jar:4.4.1:compile
[INFO] | | +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile
[INFO] | | +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] | | \- org.noggit:noggit:jar:0.6:compile
[INFO] | +- javax:javaee-api:jar:7.0:compile
[INFO] | | \- com.sun.mail:javax.mail:jar:1.5.0:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- richtercloud:message-handler:jar:1.0-SNAPSHOT:compile
[INFO] | | +- org.apache.commons:commons-lang3:jar:3.4:compile
[INFO] | | \- com.getsentry.raven:raven:jar:7.8.1:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.7.3:compile
[INFO] | \- richtercloud:message-handler-raven-bug-handler:jar:1.0-SNAPSHOT:compile
[INFO] +- org.primefaces:primefaces:jar:6.1:compile
[INFO] +- net.glxn:qrgen:jar:1.4:compile
[INFO] | \- com.google.zxing:javase:jar:3.0.0:compile
[INFO] | \- com.google.zxing:core:jar:3.0.0:compile
[INFO] +- net.sf.barcode4j:barcode4j-light:jar:2.1:compile
[INFO] +- com.google.guava:guava:jar:18.0:compile
[INFO] +- junit:junit:jar:4.12:test
[INFO] +- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- richtercloud:validation-tools:jar:1.0-SNAPSHOT:compile
[INFO] +- org.httpunit:httpunit:jar:1.7.2:test
[INFO] | +- rhino:js:jar:1.6R5:test
[INFO] | +- nekohtml:nekohtml:jar:0.9.5:test
[INFO] | +- javax.servlet:servlet-api:jar:2.4:test
[INFO] | +- net.sf.jtidy:jtidy:jar:r938:test
[INFO] | \- xerces:xmlParserAPIs:jar:2.6.1:test
[INFO] +- commons-io:commons-io:jar:2.5:compile
[INFO] +- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-javaee:jar:2.0.0-alpha-10:test
[INFO] | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-10:compile
[INFO] +- org.jboss.jsfunit:jsfunit-arquillian:jar:2.0.0.Beta3-SNAPSHOT:test
[INFO] | +- org.jboss.jsfunit:jboss-jsfunit-core:jar:2.0.0.Beta3-SNAPSHOT:test
[INFO] | | +- net.sourceforge.htmlunit:htmlunit:jar:2.8:test
[INFO] | | | \- commons-codec:commons-codec:jar:1.4:test
[INFO] | | +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.8:test
[INFO] | | +- org.apache.james:apache-mime4j:jar:0.6:test
[INFO] | | +- commons-lang:commons-lang:jar:2.4:test
[INFO] | | +- commons-collections:commons-collections:jar:3.2.1:test
[INFO] | | +- net.sourceforge.cssparser:cssparser:jar:0.9.5:test
[INFO] | | | \- org.w3c.css:sac:jar:1.3:test
[INFO] | | +- net.sourceforge.nekohtml:nekohtml:jar:1.9.14:test
[INFO] | | \- xalan:xalan:jar:2.7.1:test
[INFO] | | \- xalan:serializer:jar:2.7.1:test
[INFO] | +- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.2.6:test
[INFO] | \- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.1.13.Final:test
[INFO] | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0-alpha-10:compile
[INFO] +- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-impl-javaee:jar:2.0.0-alpha-10:compile
[INFO] | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-impl-base:jar:2.0.0-alpha-10:compile
[INFO] +- xerces:xercesImpl:jar:2.11.0:test
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- javax:javaee-web-api:jar:7.0:provided
[INFO] +- org.powermock:powermock-module-junit4:jar:1.7.0RC4:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.7.0RC4:test
[INFO] | +- org.powermock:powermock-reflect:jar:1.7.0RC4:test
[INFO] | \- org.powermock:powermock-core:jar:1.7.0RC4:test
[INFO] | \- org.javassist:javassist:jar:3.21.0-GA:test
[INFO] +- org.powermock:powermock-api-mockito2:jar:1.7.0RC4:test
[INFO] | +- org.powermock:powermock-api-mockito-common:jar:1.7.0RC4:test
[INFO] | | \- org.powermock:powermock-api-support:jar:1.7.0RC4:test
[INFO] | \- org.mockito:mockito-core:jar:2.7.5:test
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.6.5:test
[INFO] | +- net.bytebuddy:byte-buddy-agent:jar:1.6.5:test
[INFO] | \- org.objenesis:objenesis:jar:2.5:test
[INFO] +- net.sf.jmimemagic:jmimemagic:jar:0.1.3:compile
[INFO] | +- oro:oro:jar:2.0.8:compile
[INFO] | +- xml-apis:xmlParserAPIs:jar:2.0.2:compile
[INFO] | +- org.codehaus.jackson:jackson-jaxrs:jar:1.5.2:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.5.2:compile
[INFO] | | \- org.codehaus.jackson:jackson-mapper-asl:jar:1.5.2:compile
[INFO] | \- org.codehaus.jackson:jackson-xc:jar:1.5.2:compile
[INFO] +- org.imgscalr:imgscalr-lib:jar:4.3-SNAPSHOT:compile
[INFO] +- org.ocpsoft.prettytime:prettytime:jar:3.2.7.Final:compile
[INFO] +- org.bitbucket.cowwoc:diff-match-patch:jar:1.1:compile
[INFO] +- org.rauschig:jarchivelib:jar:0.7.1:compile
[INFO] | \- org.apache.commons:commons-compress:jar:1.9:compile
[INFO] +- org.jboss.arquillian.junit:arquillian-junit-container:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-api:jar:1.1.13.Final:test
[INFO] | | \- org.jboss.arquillian.core:arquillian-core-api:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-impl-base:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.1.13.Final:test
[INFO] | \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.2.6:test
[INFO] | \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.2.6:test
[INFO] +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.core:arquillian-core-spi:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.config:arquillian-config-api:jar:1.1.13.Final:test
[INFO] | \- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.1.13.Final:test
[INFO] +- org.jboss.arquillian.container:arquillian-glassfish-embedded-3.1:jar:1.0.0.Final:test
[INFO] | +- org.jboss.arquillian.testenricher:arquillian-testenricher-cdi:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.testenricher:arquillian-testenricher-ejb:jar:1.1.13.Final:test
[INFO] | +- org.jboss.arquillian.testenricher:arquillian-testenricher-resource:jar:1.1.13.Final:test
[INFO] | \- org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext:jar:1.1.13.Final:test
[INFO] +- org.glassfish.extras:glassfish-embedded-all:jar:3.2-b06:test
[INFO] \- org.ow2.asm:asm-commons:jar:5.0.3:runtime
[INFO] \- org.ow2.asm:asm-tree:jar:5.0.3:runtime
[INFO] \- org.ow2.asm:asm:jar:5.0.3:runtime
I need slf4j-api in order to be able to compile the project. Where is the old API request coming from?
SLF4J: Found binding in [jar:file:/home/richter/.m2/repository/ch/qos/logback/logback-classic/1.1.8/logback-classic-1.1.8.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/richter/.m2/repository/org/glassfish/extras/glassfish-embedded-all/3.2-b06/glassfish-embedded-all-3.2-b06.jar!/org/slf4j/impl/StaticLoggerBinder.class]
It said quite clear, you have slf4j bingding in both glassfish-embedded-all-3.2-b06.jar and logback-classic-1.1.8.jar.
Logback should be what you really need to print the log. But org/slf4j/impl/StaticLoggerBinder.class in glassfish jar also can implenment slf4j logging api.
So, what you should do is exclude glassfish-embedded-all. If you really need it ,you should include some other version of glassfish-embedded, not -all jar. Or at least, you can just remove org/slf4j/impl/StaticLoggerBinder.class in glassfish-embedded-all.jar

GoogleCredentialas.getApplicationDefault NoSuchMethodError

I'm trying to use the cloud bigtable v2 API and while I know it works in my Apache Beam job, when I try to use the API directly I encounter this error:
Caused by: java.lang.NoSuchMethodError: com.google.auth.oauth2.GoogleCredentials.getApplicationDefault(Lcom/google/api/client/http/HttpTransport;)Lcom/google/auth/oauth2/GoogleCredentials;
at com.google.cloud.bigtable.config.CredentialFactory.getApplicationDefaultCredential(CredentialFactory.java:207)
at com.google.cloud.bigtable.config.CredentialFactory.getCredentials(CredentialFactory.java:112)
at com.google.cloud.bigtable.grpc.io.CredentialInterceptorCache.getCredentialsInterceptor(CredentialInterceptorCache.java:94)
at com.google.cloud.bigtable.grpc.BigtableSession.<init>(BigtableSession.java:272)
I understand that this is some sort of maven/dependency related issue but I'm new to maven and java so I don't really know how to go about debugging this.
How do I triage this?
[INFO] +- org.apache.beam:beam-sdks-java-core:jar:0.6.0:compile
[INFO] | +- org.apache.beam:beam-sdks-common-runner-api:jar:0.6.0:compile
[INFO] | +- io.grpc:grpc-auth:jar:1.0.1:compile
[INFO] | +- io.grpc:grpc-core:jar:1.0.1:compile
[INFO] | | \- io.grpc:grpc-context:jar:1.0.1:compile
[INFO] | +- io.grpc:grpc-netty:jar:1.0.1:compile
[INFO] | | \- io.netty:netty-codec-http2:jar:4.1.3.Final:compile (version selected from constraint [4.1.3.Final,4.1.3.Final])
[INFO] | | \- io.netty:netty-codec-http:jar:4.1.3.Final:compile
[INFO] | +- io.grpc:grpc-stub:jar:1.0.1:compile
[INFO] | +- io.grpc:grpc-all:jar:1.0.1:runtime
[INFO] | | +- io.grpc:grpc-protobuf:jar:1.0.1:compile
[INFO] | | | \- com.google.protobuf:protobuf-java-util:jar:3.0.0:compile
[INFO] | | | \- com.google.code.gson:gson:jar:2.3:compile
[INFO] | | +- io.grpc:grpc-protobuf-nano:jar:1.0.1:runtime
[INFO] | | | \- com.google.protobuf.nano:protobuf-javanano:jar:3.0.0-alpha-5:runtime
[INFO] | | \- io.grpc:grpc-okhttp:jar:1.0.1:runtime
[INFO] | | +- com.squareup.okio:okio:jar:1.6.0:runtime
[INFO] | | \- com.squareup.okhttp:okhttp:jar:2.5.0:runtime
[INFO] | +- io.grpc:grpc-protobuf-lite:jar:1.0.1:compile
[INFO] | +- com.google.protobuf:protobuf-lite:jar:3.0.1:compile
[INFO] | +- com.google.auth:google-auth-library-credentials:jar:0.6.0:compile
[INFO] | +- com.google.auth:google-auth-library-oauth2-http:jar:0.6.0:compile
[INFO] | +- io.netty:netty-handler:jar:4.1.3.Final:compile
[INFO] | | +- io.netty:netty-buffer:jar:4.1.3.Final:compile
[INFO] | | | \- io.netty:netty-common:jar:4.1.3.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.3.Final:compile
[INFO] | | | \- io.netty:netty-resolver:jar:4.1.3.Final:compile
[INFO] | | \- io.netty:netty-codec:jar:4.1.3.Final:compile
[INFO] | +- com.google.api.grpc:grpc-google-pubsub-v1:jar:0.1.0:compile
[INFO] | | +- com.google.api.grpc:grpc-google-common-protos:jar:0.1.0:compile
[INFO] | | \- com.google.api.grpc:grpc-google-iam-v1:jar:0.1.0:compile
[INFO] | +- com.google.apis:google-api-services-cloudresourcemanager:jar:v1-rev6-1.22.0:compile
[INFO] | +- com.google.apis:google-api-services-storage:jar:v1-rev71-1.22.0:compile
[INFO] | +- com.google.http-client:google-http-client-jackson:jar:1.22.0:compile
[INFO] | +- com.google.http-client:google-http-client-jackson2:jar:1.22.0:compile
[INFO] | +- com.google.http-client:google-http-client-protobuf:jar:1.22.0:compile
[INFO] | +- com.google.oauth-client:google-oauth-client:jar:1.22.0:compile
[INFO] | +- com.google.cloud.bigdataoss:gcsio:jar:1.4.5:compile
[INFO] | | +- com.google.api-client:google-api-client-java6:jar:1.20.0:compile
[INFO] | | +- com.google.api-client:google-api-client-jackson2:jar:1.20.0:compile
[INFO] | | \- com.google.oauth-client:google-oauth-client-java6:jar:1.20.0:compile
[INFO] | +- com.google.cloud.bigdataoss:util:jar:1.4.5:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:3.1.0:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.7.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.7.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.7.2:compile
[INFO] | +- net.bytebuddy:byte-buddy:jar:1.6.8:compile
[INFO] | +- org.apache.avro:avro:jar:1.8.1:compile
[INFO] | | +- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
[INFO] | | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
[INFO] | | +- com.thoughtworks.paranamer:paranamer:jar:2.7:compile
[INFO] | | \- org.tukaani:xz:jar:1.5:compile
[INFO] | +- org.xerial.snappy:snappy-java:jar:1.1.2.1:compile
[INFO] | +- org.apache.commons:commons-compress:jar:1.9:compile
[INFO] | \- org.apache.commons:commons-lang3:jar:3.5:compile
[INFO] +- org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:0.6.0:compile
[INFO] | +- com.google.cloud.datastore:datastore-v1-proto-client:jar:1.4.0:compile
[INFO] | +- com.google.cloud.datastore:datastore-v1-protos:jar:1.3.0:compile
[INFO] | +- com.google.cloud.bigtable:bigtable-protos:jar:0.9.2:compile
[INFO] | +- com.google.cloud.bigtable:bigtable-client-core:jar:0.9.2:compile
[INFO] | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | +- com.google.auth:google-auth-library-appengine:jar:0.4.0:compile
[INFO] | | | \- com.google.appengine:appengine-api-1.0-sdk:jar:1.9.34:compile
[INFO] | | \- io.dropwizard.metrics:metrics-core:jar:3.1.2:compile
[INFO] | \- io.netty:netty-tcnative-boringssl-static:jar:1.1.33.Fork18:runtime
[INFO] +- org.apache.beam:beam-sdks-java-extensions-json-jackson:jar:0.6.0:compile
[INFO] +- com.google.api-client:google-api-client:jar:1.22.0:compile
[INFO] +- com.google.apis:google-api-services-bigquery:jar:v2-rev295-1.22.0:compile
[INFO] +- com.google.http-client:google-http-client:jar:1.22.0:compile
[INFO] | \- org.apache.httpcomponents:httpclient:jar:4.0.1:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.0.1:compile
[INFO] | \- commons-codec:commons-codec:jar:1.3:compile
[INFO] +- com.google.apis:google-api-services-pubsub:jar:v1-rev10-1.22.0:compile
[INFO] +- joda-time:joda-time:jar:2.4:compile
[INFO] +- com.google.cloud:google-cloud-storage:jar:0.10.0-beta:compile
[INFO] | \- com.google.cloud:google-cloud-core:jar:0.10.0-alpha:compile
[INFO] | +- com.google.api-client:google-api-client-appengine:jar:1.21.0:compile
[INFO] | | +- com.google.oauth-client:google-oauth-client-appengine:jar:1.21.0:compile
[INFO] | | | +- com.google.oauth-client:google-oauth-client-servlet:jar:1.21.0:compile
[INFO] | | | | \- com.google.http-client:google-http-client-jdo:jar:1.21.0:compile
[INFO] | | | \- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | | +- com.google.api-client:google-api-client-servlet:jar:1.21.0:compile
[INFO] | | | \- javax.jdo:jdo2-api:jar:2.3-eb:compile
[INFO] | | | \- javax.transaction:transaction-api:jar:1.1:compile
[INFO] | | \- com.google.http-client:google-http-client-appengine:jar:1.21.0:compile
[INFO] | +- org.json:json:jar:20151123:compile
[INFO] | \- com.google.api:gax:jar:0.4.0:compile
[INFO] | +- com.google.inject:guice:jar:4.0:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- com.google.auto.value:auto-value:jar:1.2:compile
[INFO] +- com.google.guava:guava:jar:21.0:compile
[INFO] +- eu.bitwalker:UserAgentUtils:jar:1.20:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.7.14:compile
[INFO] +- org.slf4j:slf4j-jdk14:jar:1.7.14:runtime
[INFO] +- org.hamcrest:hamcrest-all:jar:1.3:compile
[INFO] +- junit:junit:jar:4.12:compile
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] +- org.apache.beam:beam-runners-direct-java:jar:0.6.0:runtime
[INFO] | +- org.apache.beam:beam-runners-core-construction-java:jar:0.6.0:runtime
[INFO] | \- org.apache.beam:beam-runners-core-java:jar:0.6.0:runtime
[INFO] \- org.apache.beam:beam-sdks-java-io-kafka:jar:0.6.0:compile
[INFO] +- org.apache.kafka:kafka-clients:jar:0.9.0.1:compile
[INFO] | \- net.jpountz.lz4:lz4:jar:1.2.0:compile
[INFO] \- org.springframework:spring-expression:jar:4.3.5.RELEASE:compile
[INFO] \- org.springframework:spring-core:jar:4.3.5.RELEASE:compile
The 0.9.2 client uses an older version of google-auth-library-oauth2-http (0.4.0) than the Beam SDK (0.6.0). The GoogleCredentials object seems to have changed between versions.
The Beam SDK will be using the 0.9.6 cloud-bigtable-client in the near future, which should fix the problem.
Alternatively, you can use the the HBase oriented CloudBigtableIO connector, which shades the dependencies, and doesn't have this specific problem.

Version Incompatibility between Spring batch and cloudera hadoop

I was trying the spring batch word count program and faced a version issue like this :
ERROR [org.springframework.batch.core.step.AbstractStep] - <Encountered an error executing the step>
java.lang.IncompatibleClassChangeError: Found interface org.apache.hadoop.mapreduce.Counter, but class was expected
I use Cloudera Hadoop2 cdh4.5.0 and Spring hadoop version 1.0.1.RELEASE. I cant identify the exact problem as Spring batch is compatible with hadoop cdh4.
My dependency tree is as shown below.
[INFO] org.springframework.data:batch-wordcount:jar:0.0.1
[INFO] +- org.springframework:spring-context:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-aop:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.0.5.RELEASE:compile
[INFO] | +- org.springframework:spring-expression:jar:3.0.5.RELEASE:compile
[INFO] | \- org.springframework:spring-asm:jar:3.0.5.RELEASE:compile
[INFO] +- org.springframework:spring-core:jar:3.0.5.RELEASE:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.springframework:spring-tx:jar:3.0.5.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework.batch:spring-batch-core:jar:2.2.0.RELEASE:compile
[INFO] | +- com.thoughtworks.xstream:xstream:jar:1.3:compile
[INFO] | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | +- org.codehaus.jettison:jettison:jar:1.1:compile
[INFO] +- org.springframework.batch:spring-batch-infrastructure:jar:2.2.0.RELEASE:compile
[INFO] | \- org.springframework.retry:spring-retry:jar:1.0.2.RELEASE:compile
[INFO] +- org.springframework.batch:spring-batch-test:jar:2.2.0.RELEASE:compile
[INFO] | +- (junit:junit:jar:4.10:compile - omitted for conflict with 4.11)
[INFO] | +- (org.springframework:spring-test:jar:3.2.0.RELEASE:compile - omitted for conflict with 3.0.5.RELEASE)
[INFO] | +- commons-io:commons-io:jar:1.4:compile
[INFO] | +- commons-dbcp:commons-dbcp:jar:1.2.2:compile
[INFO] | | \- commons-pool:commons-pool:jar:1.3:compile
[INFO] | \- commons-collections:commons-collections:jar:3.2:compile
[INFO] +- junit:junit:jar:4.11:test (scope not updated to compile)
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.springframework.data:spring-data-hadoop:jar:1.0.2.RELEASE:compile
[INFO] +- org.apache.hadoop:hadoop-common:jar:2.0.0-cdh4.5.0:compile
[INFO] | +- org.apache.hadoop:hadoop-annotations:jar:2.0.0-cdh4.5.0:compile
[INFO] | | \- jdk.tools:jdk.tools:jar:1.6:system
[INFO] | +- com.google.guava:guava:jar:11.0.2:compile
[INFO] | +- commons-net:commons-net:jar:3.1:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | +- org.mortbay.jetty:jetty:jar:6.1.26.cloudera.2:compile
[INFO] | +- org.mortbay.jetty:jetty-util:jar:6.1.26.cloudera.2:compile
[INFO] | +- com.sun.jersey:jersey-core:jar:1.8:compile
[INFO] | +- com.sun.jersey:jersey-json:jar:1.8:compile
[INFO] | | +- com.sun.xml.bind:jaxb-impl:jar:2.2.3-1:compile
[INFO] | | | \- javax.xml.bind:jaxb-api:jar:2.2.2:compile
[INFO] | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | \- (com.sun.jersey:jersey-core:jar:1.8:compile - omitted for duplicate)
[INFO] | +- log4j:log4j:jar:1.2.17:compile
[INFO] | +- org.apache.hadoop:cloudera-jets3t:jar:2.0.0-cdh4.5.0:compile
[INFO] | | \- (net.java.dev.jets3t:jets3t:jar:0.9.0:compile - omitted for conflict with 0.6.1)
[INFO] | +- net.java.dev.jets3t:jets3t:jar:0.6.1:compile
[INFO] | | +- (commons-codec:commons-codec:jar:1.3:compile - omitted for conflict with 1.4)
[INFO] | | +- (commons-logging:commons-logging:jar:1.1.1:compile - omitted for duplicate)
[INFO] | | \- (commons-httpclient:commons-httpclient:jar:3.1:compile - omitted for duplicate)
[INFO] | +- (junit:junit:jar:4.8.2:compile - omitted for conflict with 4.11)
[INFO] | +- commons-lang:commons-lang:jar:2.5:compile
[INFO] | +- commons-configuration:commons-configuration:jar:1.6:compile
[INFO] | | +- commons-digester:commons-digester:jar:1.8:compile
[INFO] | | | +- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] | | \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.6.1:compile
[INFO] | +- org.slf4j:slf4j-log4j12:jar:1.6.1:runtime
[INFO] | +- org.codehaus.jackson:jackson-core-asl:jar:1.8.8:compile
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.8.8:compile
[INFO] | +- net.sf.kosmosfs:kfs:jar:0.3:compile
[INFO] | +- com.google.protobuf:protobuf-java:jar:2.4.0a:compile
[INFO] | +- org.apache.hadoop:hadoop-auth:jar:2.0.0-cdh4.5.0:compile
[INFO] | +- com.jcraft:jsch:jar:0.1.42:compile
[INFO] | \- org.apache.zookeeper:zookeeper:jar:3.4.5-cdh4.5.0:compile
[INFO] | \- jline:jline:jar:0.9.94:compile
[INFO] +- org.apache.hadoop:hadoop-hdfs:jar:2.0.0-cdh4.5.0:compile
[INFO] | +- tomcat:jasper-runtime:jar:5.5.23:compile
[INFO] | | \- commons-el:commons-el:jar:1.0:compile
[INFO] +- org.apache.hadoop:hadoop-tools:jar:2.0.0-mr1-cdh4.5.0:compile
[INFO] | +- com.cloudera.cdh:hadoop-ant:pom:2.0.0-mr1-cdh4.5.0:compile
[INFO] | \- org.apache.hadoop:hadoop-core:jar:2.0.0-mr1-cdh4.5.0:compile
[INFO] | +- hsqldb:hsqldb:jar:1.8.0.10:compile
[INFO] | +- org.eclipse.jdt:core:jar:3.1.1:compile
[INFO] +- org.hamcrest:hamcrest-all:jar:1.1:compile
[INFO] +- org.apache.hadoop:hadoop-client:jar:2.0.0-mr1-cdh4.5.0:compile
[INFO] +- org.apache.hadoop:hadoop-streaming:jar:2.0.0-mr1-cdh4.5.0:compile
[INFO] \- org.springframework:spring-test:jar:3.0.5.RELEASE:compile
Also, Does ommited for duplicate dependencies cause any error ?
You should use the 1.0.2.RELEASE-cdh4 version with Cloudera CDH4 - these distro specific releases are available in the Spring repository:
<repository>
<id>spring-releases</id>
<name>Spring Release Repository</name>
<url>http://repo.spring.io/libs-release</url>
</repository>
More info here: https://github.com/spring-projects/spring-hadoop/wiki/Build-with-Cloudera-CDH4

Resources