I have a class need to be tested:
public class TestClazz {
public void abc() {
List<String> sa = Collections.singletonList("sa");
Stream<PropertySource<?>> stream = StreamSupport.stream(Mockito.mock(Spliterator.class), false);
ICampaignHandler campaignHandler = CampaignHandlerFactory.getCampaignHandler(ProcessorTypeEnum.RETRY_CAMPAIGN);
System.out.println("============INSIDE ABC===========");
System.out.println(sa);
System.out.println(stream);
System.out.println(campaignHandler);
//Other logic code
}
}
And a test class:
#RunWith(PowerMockRunner.class)
#PrepareForTest({ Collections.class, StreamSupport.class, CampaignHandlerFactory.class})
public class DefaultSystemAppConfigServiceTest {
#Test
public void testing() {
PowerMockito.mockStatic(StreamSupport.class);
PowerMockito.mockStatic(Collections.class);
PowerMockito.mockStatic(CampaignHandlerFactory.class);
//Stubbing
Mockito.when(StreamSupport.stream(Mockito.any(Spliterator.class), Mockito.anyBoolean()))
.thenReturn(Mockito.mock(Stream.class));
Mockito.when(Collections.singletonList(Mockito.any()))
.thenReturn(Mockito.mock(List.class));
Mockito.when(CampaignHandlerFactory.getCampaignHandler(Mockito.any()))
.thenReturn(Mockito.mock(ICampaignHandler.class));
//Here invoked method under test
new TestClazz().abc();
Stream<PropertySource<?>> stream = StreamSupport.stream(Mockito.mock(Spliterator.class), false);
List<String> sa = Collections.singletonList("sa");
ICampaignHandler campaignHandler = CampaignHandlerFactory.getCampaignHandler(ProcessorTypeEnum.RETRY_CAMPAIGN);
System.out.println();
System.out.println("============OUTSIDE ABC===========");
System.out.println(sa);
System.out.println(stream);
System.out.println(campaignHandler);
}
}
I have to mock statics call so that it return as my expectation
I followed steps:
#RunWith(PowerMockRunner.class)
#PrepareForTest({ Collections.class, StreamSupport.class, CampaignHandlerFactory.class})
PowerMockito.mockStatic(clazz)
Mockito.when(method call).thenReturn(my mock)
Invoke method need to be tested
The result:
============INSIDE ABC===========
[sa]
java.util.stream.ReferencePipeline$Head#dffa30b
Mock for ICampaignHandler, hashCode: 81269359
============OUTSIDE ABC===========
Mock for List, hashCode: 628164202
Mock for Stream, hashCode: 1962826086
Mock for ICampaignHandler, hashCode: 81269359
Process finished with exit code 0
You guys can see 2/3 my stubbing setup does not work if the static calls are inside abc(), and it works if I copy static call outside abc() (copy to testing() directly). Only 1/3 stubbing works (inside and outside):
CampaignHandlerFactory.getCampaignHandler(param) //this return as my expectiation
Hint: CampaignHandlerFactory is my implementation; Collections, StreamSupport are built-in classes. This is spring boot application
Test dependencies tree:
mvn test dependency:tree -DskipTests=true
[INFO] --- maven-dependency-plugin:3.1.2:tree (default-cli) # ota-service ---
[INFO] com.sirea.ota:ota-service:jar:0.0.1-SNAPSHOT
[INFO] +- com.sirea.ota:ota-logging:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework:spring-aop:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] | +- com.sirea:logFormattor:jar:1.0.9:compile
[INFO] | | \- org.codehaus.janino:janino:jar:3.1.2:compile
[INFO] | | \- org.codehaus.janino:commons-compiler:jar:3.1.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-web:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-json:jar:2.3.8.RELEASE:compile
[INFO] | | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.11.4:compile
[INFO] | | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.11.4:compile
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.11.4:compile
[INFO] | | +- org.springframework:spring-web:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-webmvc:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-expression:jar:5.2.12.RELEASE:compile
[INFO] | \- org.springframework.boot:spring-boot-starter-jetty:jar:2.3.8.RELEASE:compile
[INFO] | +- jakarta.servlet:jakarta.servlet-api:jar:4.0.4:compile
[INFO] | +- jakarta.websocket:jakarta.websocket-api:jar:1.1.2:compile
[INFO] | +- org.eclipse.jetty:jetty-servlets:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty:jetty-continuation:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty:jetty-http:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty:jetty-util:jar:9.4.35.v20201120:compile
[INFO] | | \- org.eclipse.jetty:jetty-io:jar:9.4.35.v20201120:compile
[INFO] | +- org.eclipse.jetty:jetty-webapp:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty:jetty-xml:jar:9.4.35.v20201120:compile
[INFO] | | \- org.eclipse.jetty:jetty-servlet:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty:jetty-security:jar:9.4.35.v20201120:compile
[INFO] | | | \- org.eclipse.jetty:jetty-server:jar:9.4.35.v20201120:compile
[INFO] | | \- org.eclipse.jetty:jetty-util-ajax:jar:9.4.35.v20201120:compile
[INFO] | +- org.eclipse.jetty.websocket:websocket-server:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty.websocket:websocket-common:jar:9.4.35.v20201120:compile
[INFO] | | | \- org.eclipse.jetty.websocket:websocket-api:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty.websocket:websocket-client:jar:9.4.35.v20201120:compile
[INFO] | | | \- org.eclipse.jetty:jetty-client:jar:9.4.35.v20201120:compile
[INFO] | | \- org.eclipse.jetty.websocket:websocket-servlet:jar:9.4.35.v20201120:compile
[INFO] | +- org.eclipse.jetty.websocket:javax-websocket-server-impl:jar:9.4.35.v20201120:compile
[INFO] | | +- org.eclipse.jetty:jetty-annotations:jar:9.4.35.v20201120:compile
[INFO] | | | +- org.eclipse.jetty:jetty-plus:jar:9.4.35.v20201120:compile
[INFO] | | | +- org.ow2.asm:asm:jar:9.0:compile
[INFO] | | | \- org.ow2.asm:asm-commons:jar:9.0:compile
[INFO] | | | +- org.ow2.asm:asm-tree:jar:9.0:compile
[INFO] | | | \- org.ow2.asm:asm-analysis:jar:9.0:compile
[INFO] | | \- org.eclipse.jetty.websocket:javax-websocket-client-impl:jar:9.4.35.v20201120:compile
[INFO] | \- org.glassfish:jakarta.el:jar:3.0.3:compile
[INFO] +- com.sirea.common:sirea-logging:jar:1.2.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.11.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.11.4:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.11.4:compile
[INFO] | \- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] +- com.sirea.ota:ota-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | +- org.springframework.hateoas:spring-hateoas:jar:1.2.3:compile
[INFO] | | +- org.springframework:spring-beans:jar:5.2.12.RELEASE:compile
[INFO] | | +- org.springframework:spring-context:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.11: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] | +- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] | +- com.sirea.amp.partner.oemil:oemil-integration:jar:1.0.4-7:compile
[INFO] | | +- com.nimbusds:nimbus-jose-jwt:jar:8.19:compile
[INFO] | | | \- com.github.stephenc.jcip:jcip-annotations:jar:1.0-1:compile
[INFO] | | \- com.sirea.amp:amp-schema:jar:0.0.2-SNAPSHOT:compile
[INFO] | | +- com.google.protobuf:protobuf-java:jar:3.14.0:compile
[INFO] | | \- com.google.protobuf:protobuf-java-util:jar:3.14.0:compile
[INFO] | | \- com.google.code.gson:gson:jar:2.8.6:compile
[INFO] | +- javax:javaee-api:jar:8.0.1:compile
[INFO] | | \- com.sun.mail:javax.mail:jar:1.6.2:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | \- org.bouncycastle:bcpkix-jdk15on:jar:1.68:compile
[INFO] | \- org.bouncycastle:bcprov-jdk15on:jar:1.68:compile
[INFO] +- com.sirea.ota:server-interface-api:jar:0.0.1-SNAPSHOT:compile
[INFO] +- com.sirea.ota:ota-jpa:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- org.flywaydb:flyway-core:jar:6.5.7:compile
[INFO] | \- org.projectlombok:lombok:jar:1.18.16:compile
[INFO] +- com.sirea.ota:ota-converter:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- com.bazaarvoice.jolt:jolt-core:jar:0.1.1:compile
[INFO] | | \- javax.inject:javax.inject:jar:1:compile
[INFO] | \- com.bazaarvoice.jolt:json-utils:jar:0.1.1:compile
[INFO] +- com.sirea.ota:ota-rest-common:jar:0.0.1-SNAPSHOT:compile
[INFO] | +- com.google.guava:guava:jar:30.1-jre:compile
[INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | | +- org.checkerframework:checker-qual:jar:3.5.0:compile
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.3.4:compile
[INFO] | | \- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] | +- org.springframework.data:spring-data-commons:jar:2.3.6.RELEASE:compile
[INFO] | +- org.springframework.data:spring-data-redis:jar:2.3.6.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-keyvalue:jar:2.3.6.RELEASE:compile
[INFO] | | +- org.springframework:spring-tx:jar:5.2.12.RELEASE:compile
[INFO] | | +- org.springframework:spring-oxm:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-context-support:jar:5.2.12.RELEASE:compile
[INFO] | +- io.lettuce:lettuce-core:jar:5.3.6.RELEASE:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.58.Final:compile
[INFO] | | +- io.netty:netty-handler:jar:4.1.58.Final:compile
[INFO] | | | +- io.netty:netty-resolver:jar:4.1.58.Final:compile
[INFO] | | | +- io.netty:netty-buffer:jar:4.1.58.Final:compile
[INFO] | | | \- io.netty:netty-codec:jar:4.1.58.Final:compile
[INFO] | | +- io.netty:netty-transport:jar:4.1.58.Final:compile
[INFO] | | \- io.projectreactor:reactor-core:jar:3.3.13.RELEASE:compile
[INFO] | | \- org.reactivestreams:reactive-streams:jar:1.0.3:compile
[INFO] | +- org.apache.commons:commons-pool2:jar:2.8.1:compile
[INFO] | \- commons-io:commons-io:jar:2.8.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-amqp:jar:2.3.8.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.3.8.RELEASE:compile
[INFO] | | +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.26:compile
[INFO] | +- org.springframework:spring-messaging:jar:5.2.12.RELEASE:compile
[INFO] | \- org.springframework.amqp:spring-rabbit:jar:2.3.4:compile
[INFO] | +- org.springframework.amqp:spring-amqp:jar:2.3.4:compile
[INFO] | \- com.rabbitmq:amqp-client:jar:5.9.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.3.8.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.3.8.RELEASE:compile
[INFO] | | +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.2.12.RELEASE: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.27.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.1.3.Final:compile
[INFO] | | +- com.fasterxml:classmate:jar:1.5.1: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] | | \- com.sun.activation:jakarta.activation:jar:1.2.2:runtime
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.3.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-orm:jar:5.2.12.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.2.12.RELEASE:compile
[INFO] +- com.sirea.atsp:oemResponseExtension:jar:1.0.2:compile
[INFO] +- redis.clients:jedis:jar:2.7.2:compile
[INFO] +- com.sirea.atsp:redis-client-wrapper:jar:1.1.0-SNAPSHOT:compile
[INFO] +- javax.el:javax.el-api:jar:3.0.0:test
[INFO] +- ru.yandex.qatools.allure:allure-junit-adaptor:jar:1.5.4:test
[INFO] | +- ru.yandex.qatools.allure:allure-java-aspects:jar:1.5.4:test
[INFO] | | +- ru.yandex.qatools.allure:allure-java-adaptor-api:jar:1.5.4:test
[INFO] | | | +- ru.yandex.qatools.allure:allure-java-annotations:jar:1.5.4:test
[INFO] | | | | \- ru.yandex.qatools.allure:allure-model:jar:1.5.4:test
[INFO] | | | | +- org.jvnet.jaxb2_commons:jaxb2-basics-runtime:jar:0.9.3:test
[INFO] | | | | \- ru.qatools.commons:properties:jar:2.0.RC5:test
[INFO] | | | \- org.apache.tika:tika-core:jar:1.7:test
[INFO] | | \- org.aspectj:aspectjrt:jar:1.9.6:test
[INFO] | \- junit:junit:jar:4.13.1:test
[INFO] +- org.powermock:powermock-module-junit4:jar:2.0.9:test
[INFO] | +- org.powermock:powermock-module-junit4-common:jar:2.0.9:test
[INFO] | | +- org.powermock:powermock-reflect:jar:2.0.9:test
[INFO] | | | \- net.bytebuddy:byte-buddy-agent:jar:1.10.19:test
[INFO] | | \- org.powermock:powermock-core:jar:2.0.9:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:2.2:test
[INFO] +- org.javassist:javassist:jar:3.20.0-GA:compile
[INFO] +- com.sirea.orchestrator:sirea-job-orchestrator:jar:1.0.2.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-webflux:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.3.8.RELEASE:compile
[INFO] | | | \- io.projectreactor.netty:reactor-netty:jar:0.9.16.RELEASE:compile
[INFO] | | | +- io.netty:netty-codec-http:jar:4.1.58.Final:compile
[INFO] | | | +- io.netty:netty-codec-http2:jar:4.1.58.Final:compile
[INFO] | | | +- io.netty:netty-handler-proxy:jar:4.1.58.Final:compile
[INFO] | | | | \- io.netty:netty-codec-socks:jar:4.1.58.Final:compile
[INFO] | | | \- io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.58.Final:compile
[INFO] | | | \- io.netty:netty-transport-native-unix-common:jar:4.1.58.Final:compile
[INFO] | | +- org.springframework:spring-webflux:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.synchronoss.cloud:nio-multipart-parser:jar:1.1.0:compile
[INFO] | | \- org.synchronoss.cloud:nio-stream-storage:jar:1.1.3:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-actuator:jar:2.3.8.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.3.8.RELEASE:compile
[INFO] | | | \- org.springframework.boot:spring-boot-actuator:jar:2.3.8.RELEASE:compile
[INFO] | | \- io.micrometer:micrometer-core:jar:1.5.10:compile
[INFO] | | +- org.hdrhistogram:HdrHistogram:jar:2.1.12:compile
[INFO] | | \- org.latencyutils:LatencyUtils:jar:2.0.3:runtime
[INFO] | +- org.springframework.kafka:spring-kafka:jar:2.5.11.RELEASE:compile
[INFO] | | +- org.springframework.retry:spring-retry:jar:1.2.5.RELEASE:compile
[INFO] | | \- org.apache.kafka:kafka-clients:jar:2.5.1: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] | +- mysql:mysql-connector-java:jar:8.0.23:runtime
[INFO] | \- org.springframework.cloud:spring-cloud-starter-stream-kafka:jar:3.0.13.RELEASE:compile
[INFO] | \- org.springframework.cloud:spring-cloud-stream-binder-kafka:jar:3.0.13.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-stream-binder-kafka-core:jar:3.0.13.RELEASE:compile
[INFO] | | \- org.springframework.integration:spring-integration-kafka:jar:3.3.1.RELEASE:compile
[INFO] | \- org.springframework.cloud:spring-cloud-stream:jar:3.0.13.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.3.8.RELEASE:compile
[INFO] | | \- org.hibernate.validator:hibernate-validator:jar:6.1.7.Final:compile
[INFO] | | \- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] | +- org.springframework.integration:spring-integration-core:jar:5.3.5.RELEASE:compile
[INFO] | +- org.springframework.integration:spring-integration-jmx:jar:5.3.5.RELEASE:compile
[INFO] | \- org.springframework.cloud:spring-cloud-function-context:jar:3.0.14.RELEASE:compile
[INFO] | +- net.jodah:typetools:jar:0.6.2:compile
[INFO] | \- org.springframework.cloud:spring-cloud-function-core:jar:3.0.14.RELEASE:compile
[INFO] +- org.powermock:powermock-api-mockito2:jar:2.0.9:test
[INFO] | +- org.powermock:powermock-api-support:jar:2.0.9:test
[INFO] | \- org.mockito:mockito-core:jar:3.3.3:test
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.3.8.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.3.8.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.3.8.RELEASE:test
[INFO] | +- com.jayway.jsonpath:json-path:jar:2.5.0:compile
[INFO] | | \- net.minidev:json-smart:jar:2.3:compile
[INFO] | | \- net.minidev:accessors-smart:jar:1.2:compile
[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.6.3:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-api:jar:5.6.3:test
[INFO] | | | +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] | | | \- org.junit.platform:junit-platform-commons:jar:1.6.3:test
[INFO] | | +- org.junit.jupiter:junit-jupiter-params:jar:5.6.3:test
[INFO] | | \- org.junit.jupiter:junit-jupiter-engine:jar:5.6.3:test
[INFO] | +- org.junit.vintage:junit-vintage-engine:jar:5.6.3:test
[INFO] | | +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] | | \- org.junit.platform:junit-platform-engine:jar:1.6.3:test
[INFO] | +- org.mockito:mockito-junit-jupiter:jar:3.3.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.2.12.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.2.12.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.2.12.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.7.0:test
[INFO] +- org.awaitility:awaitility:jar:3.0.0:test
[INFO] | +- org.hamcrest:hamcrest-library:jar:2.2:test
[INFO] | \- org.objenesis:objenesis:jar:2.5.1:test
[INFO] \- org.awaitility:awaitility-proxy:jar:3.0.0:test
[INFO] \- net.bytebuddy:byte-buddy:jar:1.10.19:compile
Question: So what is the problem here? Why my stubbing does not work if the static calls are inside abc(), but only CampaignHandlerFactory works?
Is there versions conflict?
java.util.Collections and java.util.stream.StreamSupport are system classes (Language and utility libraries that are part of JRE). The caller of the system class should be defined in #PrepareForTest({ClassThatCallsTheSystemClass.class}).
See documentation.
The way to go about mocking system classes are a bit different than
usual though. Normally you would prepare the class that contains the
static methods (let's call it X) you like to mock but because it's
impossible for PowerMock to prepare a system class for testing so
another approach has to be taken. So instead of preparing X you
prepare the class that calls the static methods in X!
So you need to add TestClazz.class into #PrepareForTest.
Correct definition:
#PrepareForTest({ CampaignHandlerFactory.class, TestClazz.class})
Execution test result:
============INSIDE ABC===========
Mock for List, hashCode: 1800605369
Mock for Stream, hashCode: 847606512
Mock for ICampaignHandler, hashCode: 1736458419
============OUTSIDE ABC===========
Mock for List, hashCode: 1800605369
Mock for Stream, hashCode: 847606512
Mock for ICampaignHandler, hashCode: 1736458419
Related
I have searched for a solution on the Internet before posting, I found nothing that helps my case.
I have a Tomcat (9.0.5) instance that contains two webapps, let's call them webapp foo and webapp bar. These webapps are compiled using Maven 3.5.3.
foo includes a Maven dependency: org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.4. This Java library is also included in foo's WEB-INF/lib directory, packed inside its own .war file (Maven build process seems to work fine). foo uses CXF 3.3.5 and WSS4J 2.2.4.
Webapp bar does not include org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.4, instead.
I must deploy these two webapps under the same Tomcat instance, so I upload them under ${catalina.base}/webapps and then I run Tomcat.
If Tomcat deploys foo webapp first, nothing goes wrong.
If Tomcat deploys bar webapp first, I got the following error instead:
Could not load or register WS-SecurityPolicy related classes. Please check that (the correct version of) Apache WSS4J is on the classpath: Could not initialize class org.apache.wss4j.stax.setup.WSSec
I am going crazy on this. Based on other topics I found way to enforce Tomcat deployment order, but honestly I do not like that solution. In my opinion, that is a wrong approach.
I do not have set customization on Tomcat classpath, I do not understand why this happens. You can fine below the results of mvn dependency:tree of foo and bar.
BAR:
[INFO] -------------------< bar >--------------------
[INFO] Building bar
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.3:tree (default-cli) # bar-web ---
[INFO] bar.modules:bar-web:war:5.0.1-SNAPSHOT
[INFO] +- bar.modules:bar-core:jar:5.0.1-SNAPSHOT:compile
[INFO] | +- bar.modules:bar-jpa:jar:5.0.1-SNAPSHOT:compile
[INFO] | | +- org.hibernate:hibernate-entitymanager:jar:4.3.5.Final:compile
[INFO] | | | +- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:compile
[INFO] | | | +- org.hibernate:hibernate-core:jar:4.3.5.Final:compile
[INFO] | | | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | | | \- org.jboss:jandex:jar:1.1.0.Final:compile
[INFO] | | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | +- org.hibernate.common:hibernate-commons-annotations:jar:4.0.4.Final:compile
[INFO] | | | +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:jar:1.0.0.Final:compile
[INFO] | | | \- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] | | \- org.springframework.data:spring-data-jpa:jar:1.6.0.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:1.8.0.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:3.2.9.RELEASE:compile
[INFO] | | \- org.slf4j:jcl-over-slf4j:jar:1.7.7:runtime
[INFO] | +- bar.modules:firmaremota-rest-core:jar:1.3.0:compile
[INFO] | +- org.springframework:spring-aop:jar:3.2.9.RELEASE:compile
[INFO] | +- org.springframework:spring-context-support:jar:3.2.9.RELEASE:compile
[INFO] | +- org.apache.commons:commons-collections4:jar:4.0:compile
[INFO] | +- org.apache.commons:commons-lang3:jar:3.3.2:compile
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.3:compile
[INFO] | | \- org.apache.httpcomponents:httpcore:jar:4.4.6:compile
[INFO] | +- org.apache.httpcomponents:httpmime:jar:4.5.3:compile
[INFO] | +- commons-httpclient:commons-httpclient:jar:3.1:compile
[INFO] | +- org.aspectj:aspectjrt:jar:1.7.0:compile
[INFO] | +- org.aspectj:aspectjweaver:jar:1.7.0:compile
[INFO] | +- org.hibernate:hibernate-validator:jar:4.3.1.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.1.0.CR2:compile
[INFO] | +- com.helger:peppol-smp-client:jar:5.2.7:compile
[INFO] | | +- com.helger:peppol-commons:jar:5.2.7:compile
[INFO] | | | +- com.helger:ph-security:jar:8.6.6:compile
[INFO] | | | +- com.helger:ph-xml:jar:8.6.6:compile
[INFO] | | | +- com.helger:ph-json:jar:8.6.6:compile
[INFO] | | | +- com.helger:ph-xsds-xmldsig:jar:1.0.1:compile
[INFO] | | | \- dnsjava:dnsjava:jar:2.1.8:compile
[INFO] | | +- com.helger:ph-httpclient:jar:8.8.2:compile
[INFO] | | | \- com.helger:ph-http:jar:8.8.2:compile
[INFO] | | | \- com.helger:ph-network:jar:8.8.2:compile
[INFO] | | \- com.helger:ph-settings:jar:8.6.6:compile
[INFO] | +- com.helger:peppol-directory-businesscard:jar:0.5.1:compile
[INFO] | | +- com.helger:ph-commons:jar:8.6.6:compile
[INFO] | | | \- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | | +- com.helger:ph-jaxb:jar:8.6.6:compile
[INFO] | | +- com.helger:ph-datetime:jar:8.6.6:compile
[INFO] | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | +- commons-codec:commons-codec:jar:1.8:compile
[INFO] | +- org.bouncycastle:bcprov-jdk15on:jar:1.60:compile
[INFO] | +- org.codehaus.groovy:groovy:jar:2.4.10:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.7:compile
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.0:compile
[INFO] | | \- com.fasterxml.jackson.core:jackson-core:jar:2.8.7:compile
[INFO] | +- org.glassfish.metro:webservices-rt:jar:2.3:compile
[INFO] | | \- org.glassfish.metro:webservices-api:jar:2.3:compile
[INFO] | | \- javax.annotation:javax.annotation-api:jar:1.2-b03:runtime
[INFO] | +- no.difi.oxalis:oxalis-document-sniffer:jar:4.1.1:compile
[INFO] | +- no.difi.vefa:peppol-icd:jar:1.1.3:compile
[INFO] | | \- no.difi.vefa:peppol-common:jar:1.1.3:compile
[INFO] | +- no.difi.vefa:peppol-sbdh:jar:1.1.3:compile
[INFO] | | +- no.difi.commons:commons-sbdh:jar:0.9.5:compile
[INFO] | | \- com.google.guava:guava:jar:28.1-jre:compile
[INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | | +- org.checkerframework:checker-qual:jar:2.8.1:compile
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.3.2:compile
[INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.3:compile
[INFO] | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.18:compile
[INFO] | +- com.oracle:ojdbc16:jar:11.2.0.3.0:compile
[INFO] | +- javax.mail:javax.mail-api:jar:1.6.0:compile
[INFO] | +- com.sun.mail:javax.mail:jar:1.5.1:compile
[INFO] | | \- javax.activation:activation:jar:1.1:compile
[INFO] | +- org.springframework:spring-aspects:jar:3.2.9.RELEASE:compile
[INFO] | +- net.sourceforge.saxon:saxon:jar:9.1.0.8:compile
[INFO] | +- net.sourceforge.saxon:saxon:jar:dom:9.1.0.8:compile
[INFO] | +- org.bouncycastle:bcmail-jdk15on:jar:1.60:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] | \- org.passay:passay:jar:1.5.0:compile
[INFO] +- bar.modules:bar-entity:jar:5.0.1-SNAPSHOT:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:compile
[INFO] | +- javax.validation:validation-api:jar:1.1.0.Final: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] +- bar.modules:bar-job:jar:5.0.1-SNAPSHOT:compile
[INFO] | \- org.quartz-scheduler:quartz:jar:2.2.1:compile
[INFO] | \- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- bar.modules:oxalis-bar-integration:jar:1.0.0:compile
[INFO] +- org.springframework:spring-oxm:jar:3.2.9.RELEASE:compile
[INFO] | +- org.springframework:spring-beans:jar:3.2.9.RELEASE:compile
[INFO] | \- org.springframework:spring-core:jar:3.2.9.RELEASE:compile
[INFO] +- org.springframework:spring-test:jar:3.2.9.RELEASE:test
[INFO] +- org.springframework.security:spring-security-core:jar:3.2.7.RELEASE:compile
[INFO] | +- aopalliance:aopalliance:jar:1.0:compile
[INFO] | \- org.springframework:spring-expression:jar:3.2.13.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-web:jar:3.2.7.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:3.2.7.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-acl:jar:3.2.7.RELEASE:compile
[INFO] | +- org.springframework:spring-jdbc:jar:3.2.13.RELEASE:compile
[INFO] | \- org.springframework:spring-tx:jar:3.2.13.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-config:jar:3.2.7.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:3.2.9.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.2.9.RELEASE:compile
[INFO] +- org.springframework:spring-web:jar:3.2.9.RELEASE:compile
[INFO] +- org.jvnet.jax-ws-commons.spring:jaxws-spring:jar:1.9:compile
[INFO] | \- org.apache.xbean:xbean-spring:jar:3.14:compile
[INFO] +- com.google.code.gson:gson:jar:2.2.2:compile
[INFO] +- joda-time:joda-time:jar:2.3:compile
[INFO] +- javax:javaee-web-api:jar:6.0:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3.1:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- org.apache.poi:poi:jar:3.16:compile
[INFO] +- org.apache.pdfbox:pdfbox:jar:2.0.0:compile
[INFO] | +- org.apache.pdfbox:fontbox:jar:2.0.0:compile
[INFO] | \- commons-logging:commons-logging:jar:1.2:compile
[INFO] +- ch.qos.logback:logback-classic:jar:1.1.2:compile
[INFO] | +- ch.qos.logback:logback-core:jar:1.1.2:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.6:compile
[INFO] +- org.webjars:bootstrap:jar:3.3.7-1:compile
[INFO] | \- org.webjars:jquery:jar:1.11.1:compile
[INFO] +- org.webjars:jquery-ui:jar:1.12.1:compile
[INFO] +- org.webjars:jquery-ui-themes:jar:1.12.1:compile
[INFO] +- org.webjars:datatables:jar:1.10.13:compile
[INFO] +- org.webjars:html5shiv:jar:3.7.2:compile
[INFO] +- org.webjars:respond:jar:1.4.2:compile
[INFO] +- org.webjars:font-awesome:jar:4.6.3:compile
[INFO] +- org.webjars.bower:tinymce:jar:4.4.3:compile
[INFO] +- org.webjars.bower:moment:jar:2.18.1:compile
[INFO] +- xerces:xercesImpl:jar:2.12.0:compile
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- org.mockito:mockito-core:jar:1.9.5:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] | \- org.objenesis:objenesis:jar:1.0:test
[INFO] \- junit:junit:jar:4.11:test
FOO:
[INFO] -------------------< foo >--------------------
[INFO] Building foo
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # bar-war ---
[INFO] foo.modules:bar-war:war:1.0.0
[INFO] +- foo.modules:bar-notier-core:jar:1.0.0:compile
[INFO] | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | +- com.sun.jersey:jersey-server:jar:1.17.1:compile
[INFO] | | \- com.sun.jersey:jersey-core:jar:1.17.1:compile
[INFO] | +- com.sun.jersey.contribs:jersey-guice:jar:1.11:compile
[INFO] | | +- javax.inject:javax.inject:jar:1:compile
[INFO] | | \- com.sun.jersey:jersey-servlet:jar:1.11:compile
[INFO] | +- foo.modules:bar-notier-integration:jar:1.0.0:compile
[INFO] | +- org.apache.commons:commons-dbcp2:jar:2.2.0:compile
[INFO] | | \- org.apache.commons:commons-pool2:jar:2.5.0:compile
[INFO] | +- no.difi.oxalis:bar-outbound:jar:4.1.1:compile
[INFO] | | +- no.difi.oxalis:bar-document-sniffer:jar:4.1.1:compile
[INFO] | | | \- no.difi.vefa:peppol-icd:jar:1.1.3:compile
[INFO] | | +- no.difi.vefa:peppol-lookup:jar:1.1.3:compile
[INFO] | | | +- no.difi.commons:commons-busdox:jar:0.9.5:compile
[INFO] | | | +- no.difi.commons:commons-bdx:jar:0.9.5:compile
[INFO] | | | \- dnsjava:dnsjava:jar:2.1.9:compile
[INFO] | | \- no.difi.vefa:peppol-security:jar:1.1.3:compile
[INFO] | | \- no.difi.commons:commons-certvalidator:jar:2.2.0:compile
[INFO] | | \- net.klakegg.pkix:pkix-ocsp:jar:0.9.0:compile
[INFO] | +- no.difi.oxalis:bar-commons:jar:4.1.1:compile
[INFO] | +- com.google.inject.extensions:guice-servlet:jar:4.2.2:compile
[INFO] | +- commons-io:commons-io:jar:1.3.2:compile
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.26:compile
[INFO] | +- ch.qos.logback:logback-classic:jar:1.2.3:compile
[INFO] | | \- ch.qos.logback:logback-core:jar:1.2.3:compile
[INFO] | \- javax.transaction:jta:jar:1.1:compile
[INFO] +- foo.modules:bar-rest:jar:1.0.0:compile
[INFO] | \- org.apache.httpcomponents:httpclient:jar:4.5.6:compile
[INFO] | +- org.apache.httpcomponents:httpcore:jar:4.4.10:compile
[INFO] | \- commons-codec:commons-codec:jar:1.11:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:4.0.1:provided
[INFO] +- no.difi.oxalis:bar-as4:jar:4.1.9:compile
[INFO] | +- org.apache.cxf:cxf-core:jar:3.3.5:compile
[INFO] | | +- org.glassfish.jaxb:jaxb-runtime:jar:2.3.2:compile
[INFO] | | | +- org.glassfish.jaxb:txw2:jar:2.3.2:compile
[INFO] | | | +- com.sun.istack:istack-commons-runtime:jar:3.0.8:compile
[INFO] | | | +- org.jvnet.staxex:stax-ex:jar:1.8.1:compile
[INFO] | | | \- com.sun.xml.fastinfoset:FastInfoset:jar:1.2.16:compile
[INFO] | | +- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] | | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-security:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-bindings-soap:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-databinding-jaxb:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-wsdl:jar:3.3.5:compile
[INFO] | | +- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] | | \- org.ow2.asm:asm:jar:7.1:compile
[INFO] | +- org.apache.cxf:cxf-rt-features-logging:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:3.3.5:compile
[INFO] | | +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] | | +- org.apache.cxf:cxf-rt-bindings-xml:jar:3.3.5:compile
[INFO] | | +- org.apache.cxf:cxf-rt-frontend-simple:jar:3.3.5:compile
[INFO] | | \- org.apache.cxf:cxf-rt-ws-addr:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-ws-policy:jar:3.3.5:compile
[INFO] | +- org.apache.cxf:cxf-rt-ws-security:jar:3.3.5:compile
[INFO] | | +- org.apache.cxf:cxf-rt-security-saml:jar:3.3.5:compile
[INFO] | | +- net.sf.ehcache:ehcache:jar:2.10.6:compile
[INFO] | | +- org.apache.wss4j:wss4j-ws-security-stax:jar:2.2.4:compile
[INFO] | | | \- org.apache.wss4j:wss4j-bindings:jar:2.2.4:compile
[INFO] | | \- org.apache.wss4j:wss4j-ws-security-policy-stax:jar:2.2.4:compile
[INFO] | +- org.apache.wss4j:wss4j-ws-security-common:jar:2.2.4:compile
[INFO] | | +- org.apache.santuario:xmlsec:jar:2.1.4:compile
[INFO] | | +- org.opensaml:opensaml-saml-impl:jar:3.3.0:compile
[INFO] | | | +- org.opensaml:opensaml-profile-api:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-core:jar:3.3.0:compile
[INFO] | | | | \- io.dropwizard.metrics:metrics-core:jar:3.1.2:compile
[INFO] | | | +- org.opensaml:opensaml-saml-api:jar:3.3.0:compile
[INFO] | | | | +- org.opensaml:opensaml-xmlsec-api:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-soap-api:jar:3.3.0:compile
[INFO] | | | +- org.opensaml:opensaml-security-impl:jar:3.3.0:compile
[INFO] | | | | \- org.opensaml:opensaml-security-api:jar:3.3.0:compile
[INFO] | | | | \- org.cryptacular:cryptacular:jar:1.1.1:compile
[INFO] | | | +- org.opensaml:opensaml-xmlsec-impl:jar:3.3.0:compile
[INFO] | | | \- net.shibboleth.utilities:java-support:jar:7.3.0:compile
[INFO] | | +- org.opensaml:opensaml-xacml-impl:jar:3.3.0:compile
[INFO] | | | \- org.opensaml:opensaml-xacml-api:jar:3.3.0:compile
[INFO] | | +- org.opensaml:opensaml-xacml-saml-impl:jar:3.3.0:compile
[INFO] | | | \- org.opensaml:opensaml-xacml-saml-api:jar:3.3.0:compile
[INFO] | | \- org.jasypt:jasypt:jar:1.9.3:compile
[INFO] | +- org.apache.wss4j:wss4j-ws-security-dom:jar:2.2.4:compile
[INFO] | +- org.apache.wss4j:wss4j-policy:jar:2.2.4:compile
[INFO] | +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.2:compile
[INFO] | +- jakarta.activation:jakarta.activation-api:jar:1.2.1:compile
[INFO] | \- org.apache.neethi:neethi:jar:3.1.1:compile
[INFO] +- foo.modules:bar-notier-rest-server:jar:1.0.0:compile
[INFO] +- no.difi.oxalis:bar-inbound:jar:4.1.1:compile
[INFO] | +- com.google.guava:guava:jar:27.0.1-jre:compile
[INFO] | | +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO] | | +- com.google.guava:listenablefuture:jar:9999.0-empty-to-avoid-conflict-with-guava:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO] | | +- org.checkerframework:checker-qual:jar:2.5.2:compile
[INFO] | | +- com.google.errorprone:error_prone_annotations:jar:2.2.0:compile
[INFO] | | +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
[INFO] | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.17:compile
[INFO] | +- joda-time:joda-time:jar:2.10.1:compile
[INFO] | +- no.difi.oxalis:bar-as2:jar:4.1.1:compile
[INFO] | | \- javax.mail:mail:jar:1.4.7:compile
[INFO] | +- org.bouncycastle:bcmail-jdk15on:jar:1.57:compile
[INFO] | | +- org.bouncycastle:bcprov-jdk15on:jar:1.57:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.57:compile
[INFO] | \- io.opentracing.contrib:opentracing-web-servlet-filter:jar:0.2.2:compile
[INFO] | +- io.opentracing:opentracing-api:jar:0.33.0:compile
[INFO] | \- io.opentracing:opentracing-util:jar:0.31.0:compile
[INFO] +- foo.modules:bar-quartz:jar:1.0.0:compile
[INFO] | \- org.quartz-scheduler:quartz:jar:2.2.1:compile
[INFO] | \- c3p0:c3p0:jar:0.9.1.1:compile
[INFO] +- foo.modules:bar-persist:jar:1.0.0:compile
[INFO] | +- javax.mail:javax.mail-api:jar:1.5.6:compile
[INFO] | +- org.quartz-scheduler:quartz-jobs:jar:2.2.1:compile
[INFO] | +- com.google.code.gson:gson:jar:2.2.2:compile
[INFO] | +- no.difi.oxalis:bar-api:jar:4.1.1:compile
[INFO] | | \- no.difi.vefa:peppol-common:jar:1.1.3:compile
[INFO] | +- org.slf4j:jcl-over-slf4j:jar:1.7.26:compile
[INFO] | +- com.google.inject:guice:jar:4.2.2:compile
[INFO] | | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] | +- no.difi.vefa:peppol-mode:jar:1.1.3:compile
[INFO] | | \- com.typesafe:config:jar:1.3.4:compile
[INFO] | +- no.difi.vefa:peppol-sbdh:jar:1.1.3:compile
[INFO] | | \- no.difi.commons:commons-sbdh:jar:0.9.5:compile
[INFO] | +- no.difi.vefa:peppol-evidence:jar:1.1.3:compile
[INFO] | +- io.zipkin.brave:brave:jar:5.6.5:compile
[INFO] | | +- io.zipkin.zipkin2:zipkin:jar:2.14.2:compile
[INFO] | | \- io.zipkin.reporter2:zipkin-reporter:jar:2.8.4:compile
[INFO] | +- io.zipkin.reporter2:zipkin-sender-urlconnection:jar:2.7.10:compile
[INFO] | +- io.opentracing:opentracing-noop:jar:0.33.0:compile
[INFO] | +- io.opentracing.contrib:opentracing-apache-httpclient:jar:0.1.0:compile
[INFO] | +- io.opentracing.contrib:opentracing-spanmanager:jar:0.0.5:compile
[INFO] | \- io.opentracing.brave:brave-opentracing:jar:0.33.7:compile
[INFO] +- org.projectlombok:lombok:jar:1.18.4:provided
[INFO] \- org.kohsuke.metainf-services:metainf-services:jar:1.8:provided
Any further help is truly appreciate. Thank you in advance.
EDIT:
Based on Konstantin Pribluda suggestion I added this in my ${catalina.base}/conf/context.xml:
<Loader delegate="true" />
After this, I got the following error:
Could not load or register WS-SecurityPolicy related classes. Please check that (the correct version of) Apache WSS4J is on the classpath: org/apache/xml/security/exceptions/XMLSecurityException
It seems to be the same error, but on another class.
Could be problem with delegation and classloader precedence. In java class resolves own dependencies from own classloader, and higher up in hierarchy. This can lead to classes from your application being ignored even if theyare included in war. Try to play around with delegate setting of classloader. Detailed explanation:
https://tomcat.apache.org/tomcat-9.0-doc/class-loader-howto.html
I'm trying to migrate my spring-boot web application from v 2.0.2 to 2.1.4 but i had a problem when i try to find one element with validator, hibernate throw exception
HV000243: Constraint
validators.annotations.StringaData references constraint validator type
validators.impl.DateValidator, but this validator is defined for constraint type
validators.annotations.StringaData.
Here SpringData.java
#Target({ElementType.FIELD })
#Retention(RUNTIME)
#Constraint(validatedBy = DateValidator.class)
public #interface StringaData {
String message() default MessagesKeys.MUST_BE_DATE;
Class<?>[] groups() default {};
Class<? extends Payload>[] payload() default {};
}
and DateValidator.java
public class DateValidator implements ConstraintValidator<StringaData, String> {
#Override
public boolean isValid(String str, ConstraintValidatorContext context) {
if( str != null && ValidationUtilsCustom.isNotEmptyOrWhitespace(str))
return ValidationUtilsCustom.isStringDate(str);
return true;
}
}
I had read documentation here https://docs.jboss.org/hibernate/stable/validator/reference/en-US/html_single/#validator-customconstraints-constraintannotation
Here my class with validator applied
public class elementDTO implements Serializable {
private BigDecimal Id; // Id or Primary Key
#StringaData
private String dataStr;
#StringaData
private String field2Str;
//getter and setter
}
what am i doing wrong?
Here are full list of dependencies in my web application
[INFO] +- org.springframework.boot:spring-boot-starter-jersey:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.1.4.RELEASE:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.8:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.8:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.8:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-validation:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework:spring-web:jar:5.1.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.1.6.RELEASE:compile
[INFO] | +- org.glassfish.jersey.core:jersey-server:jar:2.27:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.27:compile
[INFO] | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
[INFO] | | +- org.glassfish.jersey.core:jersey-client:jar:2.27:compile
[INFO] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.1:compile
[INFO] | | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.27:compile
[INFO] | | \- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.27:compile
[INFO] | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.27:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.27:compile
[INFO] | +- org.glassfish.jersey.ext:jersey-spring4:jar:2.27:compile
[INFO] | | +- org.glassfish.jersey.inject:jersey-hk2:jar:2.27:compile
[INFO] | | | \- org.glassfish.hk2:hk2-locator:jar:2.5.0-b42:compile
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b42:compile
[INFO] | | +- org.glassfish.hk2:hk2:jar:2.5.0-b42:compile
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b42:compile
[INFO] | | | +- org.glassfish.hk2:hk2-api:jar:2.5.0-b42:compile
[INFO] | | | +- org.glassfish.hk2:config-types:jar:2.5.0-b42:compile
[INFO] | | | +- org.glassfish.hk2:hk2-core:jar:2.5.0-b42:compile
[INFO] | | | +- org.glassfish.hk2:hk2-config:jar:2.5.0-b42:compile
[INFO] | | | +- org.glassfish.hk2:hk2-runlevel:jar:2.5.0-b42:compile
[INFO] | | | \- org.glassfish.hk2:class-model:jar:2.5.0-b42:compile
[INFO] | | | \- org.glassfish.hk2.external:asm-all-repackaged:jar:2.5.0-b42:compile
[INFO] | | +- org.glassfish.hk2:spring-bridge:jar:2.5.0-b42:compile
[INFO] | | \- org.springframework:spring-aop:jar:5.1.6.RELEASE:compile
[INFO] | +- org.glassfish.jersey.media:jersey-media-json-jackson:jar:2.27:compile
[INFO] | | \- org.glassfish.jersey.ext:jersey-entity-filtering:jar:2.27:compile
[INFO] | \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] | \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.1.4.RELEASE:provided
[INFO] | +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.17:provided
[INFO] | +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.17:compile
[INFO] | \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.17:provided
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.1.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.1.4.RELEASE:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.1.4.RELEASE: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.assertj:assertj-core:jar:3.11.1:test
[INFO] | +- org.mockito:mockito-core:jar:2.23.4:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.9.12:compile
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.9.12:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6: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.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.1.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.1.6.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.1.6.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.6.2:test
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.1.4.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-actuator:jar:2.1.4.RELEASE:compile
[INFO] | | \- org.springframework:spring-context:jar:5.1.6.RELEASE:compile
[INFO] | \- io.micrometer:micrometer-core:jar:1.1.4:compile
[INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.9:compile
[INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.1.4.RELEASE:compile
[INFO] | \- org.yaml:snakeyaml:jar:1.23:runtime
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:2.1.4.RELEASE:compile
[INFO] | +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.11.2:compile
[INFO] | +- org.apache.logging.log4j:log4j-core:jar:2.11.2:compile
[INFO] | +- org.apache.logging.log4j:log4j-jul:jar:2.11.2:compile
[INFO] | \- org.slf4j:jul-to-slf4j:jar:1.7.26:compile
[INFO] +- org.apache.logging.log4j:log4j-web:jar:2.11.2:compile
[INFO] | \- org.apache.logging.log4j:log4j-api:jar:2.11.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.1.4.RELEASE:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.16.Final:compile
[INFO] | | \- org.jboss.logging:jboss-logging:jar:3.3.2.Final:compile
[INFO] | \- org.springframework:spring-webmvc:jar:5.1.6.RELEASE:compile
[INFO] | \- org.springframework:spring-expression:jar:5.1.6.RELEASE:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- org.springframework.cloud:spring-cloud-starter-netflix-hystrix:jar:2.1.1.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter:jar:2.1.1.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-context:jar:2.1.1.RELEASE:compile
[INFO] | | | \- org.springframework.security:spring-security-crypto:jar:5.1.5.RELEASE:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-commons:jar:2.1.1.RELEASE:compile
[INFO] | | \- org.springframework.security:spring-security-rsa:jar:1.0.7.RELEASE:compile
[INFO] | | \- org.bouncycastle:bcpkix-jdk15on:jar:1.60:compile
[INFO] | | \- org.bouncycastle:bcprov-jdk15on:jar:1.60:compile
[INFO] | +- org.springframework.cloud:spring-cloud-netflix-hystrix:jar:2.1.1.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-netflix-ribbon:jar:2.1.1.RELEASE:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-netflix-archaius:jar:2.1.1.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-netflix-archaius:jar:2.1.1.RELEASE:compile
[INFO] | | +- com.netflix.archaius:archaius-core:jar:0.7.6:compile
[INFO] | | \- commons-configuration:commons-configuration:jar:1.8:compile
[INFO] | +- com.netflix.hystrix:hystrix-core:jar:1.5.18:compile
[INFO] | | \- io.reactivex:rxjava:jar:1.3.8:compile
[INFO] | +- com.netflix.hystrix:hystrix-serialization:jar:1.5.18:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.8:runtime
[INFO] | +- com.netflix.hystrix:hystrix-metrics-event-stream:jar:1.5.18:compile
[INFO] | +- com.netflix.hystrix:hystrix-javanica:jar:1.5.18:compile
[INFO] | | +- org.ow2.asm:asm:jar:5.0.4:runtime
[INFO] | | \- org.aspectj:aspectjweaver:jar:1.9.2:compile
[INFO] | \- io.reactivex:rxjava-reactive-streams:jar:1.2.1:compile
[INFO] | \- org.reactivestreams:reactive-streams:jar:1.0.2:runtime
[INFO] +- org.springframework.cloud:spring-cloud-starter-zipkin:jar:2.1.1.RELEASE:compile
[INFO] | +- org.springframework.cloud:spring-cloud-starter-sleuth:jar:2.1.1.RELEASE:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-sleuth-core:jar:2.1.1.RELEASE:compile
[INFO] | | +- org.aspectj:aspectjrt:jar:1.9.2:compile
[INFO] | | +- io.zipkin.brave:brave:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-context-log4j2:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-web:jar:5.6.1:compile
[INFO] | | | \- io.zipkin.brave:brave-instrumentation-http:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-rabbit:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-kafka-clients:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpclient:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-httpasyncclient:jar:5.6.1:compile
[INFO] | | +- io.zipkin.brave:brave-instrumentation-spring-webmvc:jar:5.6.1:compile
[INFO] | | | \- io.zipkin.brave:brave-instrumentation-servlet:jar:5.6.1:compile
[INFO] | | \- io.zipkin.brave:brave-instrumentation-jms:jar:5.6.1:compile
[INFO] | \- org.springframework.cloud:spring-cloud-sleuth-zipkin:jar:2.1.1.RELEASE:compile
[INFO] | +- io.zipkin.zipkin2:zipkin:jar:2.12.0:compile
[INFO] | +- io.zipkin.reporter2:zipkin-reporter:jar:2.7.14:compile
[INFO] | +- io.zipkin.reporter2:zipkin-sender-kafka11:jar:2.7.14:compile
[INFO] | \- io.zipkin.reporter2:zipkin-sender-amqp-client:jar:2.7.14:compile
[INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-aop:jar:2.1.4.RELEASE:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.1.4.RELEASE:compile
[INFO] | | +- com.zaxxer:HikariCP:jar:3.2.0:compile
[INFO] | | \- org.springframework:spring-jdbc:jar:5.1.6.RELEASE:compile
[INFO] | +- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] | +- org.hibernate:hibernate-core:jar:5.3.9.Final:compile
[INFO] | | +- javax.persistence:javax.persistence-api:jar:2.2:compile
[INFO] | | +- org.javassist:javassist:jar:3.23.1-GA:compile
[INFO] | | +- antlr:antlr:jar:2.7.7:compile
[INFO] | | +- org.jboss:jandex:jar:2.0.5.Final:compile
[INFO] | | +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] | | \- org.hibernate.common:hibernate-commons-annotations:jar:5.0.4.Final:compile
[INFO] | +- org.springframework.data:spring-data-jpa:jar:2.1.6.RELEASE:compile
[INFO] | | +- org.springframework.data:spring-data-commons:jar:2.1.6.RELEASE:compile
[INFO] | | +- org.springframework:spring-orm:jar:5.1.6.RELEASE:compile
[INFO] | | \- org.springframework:spring-tx:jar:5.1.6.RELEASE:compile
[INFO] | \- org.springframework:spring-aspects:jar:5.1.6.RELEASE:compile
[INFO] +- com.github.noraui:ojdbc7:jar:12.1.0.2:compile
[INFO] +- com.querydsl:querydsl-apt:jar:4.2.1:compile
[INFO] | \- com.querydsl:querydsl-codegen:jar:4.2.1:compile
[INFO] | +- com.mysema.codegen:codegen:jar:0.6.8:compile
[INFO] | | \- org.eclipse.jdt.core.compiler:ecj:jar:4.3.1:compile
[INFO] | \- org.reflections:reflections:jar:0.9.9:compile
[INFO] | \- com.google.code.findbugs:annotations:jar:2.0.1:compile
[INFO] +- com.querydsl:querydsl-jpa:jar:4.2.1:compile
[INFO] | +- com.querydsl:querydsl-core:jar:4.2.1:compile
[INFO] | | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | | +- com.mysema.commons:mysema-commons-lang:jar:0.2.4:compile
[INFO] | | \- com.infradna.tool:bridge-method-annotation:jar:1.13:compile
[INFO] | +- javax.inject:javax.inject:jar:1:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.26:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web-services:jar:2.1.4.RELEASE:compile
[INFO] | +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.5.0:compile
[INFO] | | +- javax.xml.soap:javax.xml.soap-api:jar:1.4.0:compile
[INFO] | | +- org.jvnet.mimepull:mimepull:jar:1.9.11:compile
[INFO] | | \- org.jvnet.staxex:stax-ex:jar:1.8:compile
[INFO] | +- javax.xml.ws:jaxws-api:jar:2.3.1:compile
[INFO] | +- org.springframework:spring-oxm:jar:5.1.6.RELEASE:compile
[INFO] | \- org.springframework.ws:spring-ws-core:jar:3.0.7.RELEASE:compile
[INFO] | +- org.springframework.ws:spring-xml:jar:3.0.7.RELEASE:compile
[INFO] | \- commons-io:commons-io:jar:2.5:compile
[INFO] +- org.modelmapper.extensions:modelmapper-spring:jar:1.1.0:compile
[INFO] | \- org.modelmapper:modelmapper:jar:1.1.0: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] | +- 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.4.0: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.maven:maven-model:jar:3.3.9:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:3.0.22:compile
[INFO] | \- org.apache.commons:commons-lang3:jar:3.8.1:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.1.4.RELEASE:compile
[INFO] +- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:jar:2.9.8:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.8:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.8:compile
[INFO] | +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.8:compile
[INFO] | +- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | \- com.fasterxml.woodstox:woodstox-core:jar:5.0.3:compile
[INFO] \- junit:junit:jar:4.12:test
Hum. It's really weird.
Are you sure you don't have 2 different implementations of StringaData in your classpath? Because it really looks like you have 2 different classes having the same name and that it creates confusion.
It could also be a classloader issue but, usually, you don't have these in a typical Spring setup.
In a spring boot application running google cloud dataflow code. The dataflow takes data from google PubSub, transform incoming data and output result to bigquery for storage. The code does not have any syntax errors. The problem is when the application is run, the following exception is thrown.
Exception in thread "main" java.lang.RuntimeException: Failed to construct instance from factory method DataflowRunner#fromOptions(interface org.apache.beam.sdk.options.PipelineOptions)
at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:233)
at org.apache.beam.sdk.util.InstanceBuilder.build(InstanceBuilder.java:162)
at org.apache.beam.sdk.PipelineRunner.fromOptions(PipelineRunner.java:52)
at org.apache.beam.sdk.Pipeline.create(Pipeline.java:142)
at com.trackers.exlon.ExlonApplication.main(ExlonApplication.java:69)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.beam.sdk.util.InstanceBuilder.buildFromMethod(InstanceBuilder.java:222)
... 4 more
Caused by: java.lang.NoClassDefFoundError: com/google/api/services/cloudresourcemanager/CloudResourceManager$Builder
at org.apache.beam.sdk.extensions.gcp.options.GcpOptions$GcpTempLocationFactory.newCloudResourceManagerClient(GcpOptions.java:369)
at org.apache.beam.sdk.extensions.gcp.options.GcpOptions$GcpTempLocationFactory.create(GcpOptions.java:240)
at org.apache.beam.sdk.extensions.gcp.options.GcpOptions$GcpTempLocationFactory.create(GcpOptions.java:228)
at org.apache.beam.sdk.options.ProxyInvocationHandler.returnDefaultHelper(ProxyInvocationHandler.java:592)
at org.apache.beam.sdk.options.ProxyInvocationHandler.getDefault(ProxyInvocationHandler.java:533)
at org.apache.beam.sdk.options.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:156)
at com.sun.proxy.$Proxy85.getGcpTempLocation(Unknown Source)
at org.apache.beam.runners.dataflow.DataflowRunner.fromOptions(DataflowRunner.java:223)
... 9 more
Caused by: java.lang.ClassNotFoundException: com.google.api.services.cloudresourcemanager.CloudResourceManager$Builder
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 17 more
As this is a spring boot maven project, instead of copy pasting POM file dependencies, i think below dependency tree will show more on dependencies and transitive dependencies as well, though if POM is needed i will switch this with POM file
[INFO] +- org.springframework.boot:spring-boot-starter-webflux:jar:2.0.0.RC1:compile
[INFO] | +- org.springframework.boot:spring-boot-starter:jar:2.0.0.RC1:compile
[INFO] | | +- org.springframework.boot:spring-boot:jar:2.0.0.RC1:compile
[INFO] | | | \- org.springframework:spring-context:jar:5.0.3.RELEASE:compile
[INFO] | | | +- org.springframework:spring-aop:jar:5.0.3.RELEASE:compile
[INFO] | | | \- org.springframework:spring-expression:jar:5.0.3.RELEASE:compile
[INFO] | | +- org.springframework.boot:spring-boot-autoconfigure:jar:2.0.0.RC1:compile
[INFO] | | +- org.springframework.boot:spring-boot-starter-logging:jar:2.0.0.RC1: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.10.0:compile
[INFO] | | | | \- org.apache.logging.log4j:log4j-api:jar:2.10.0:compile
[INFO] | | | \- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
[INFO] | | +- javax.annotation:javax.annotation-api:jar:1.3.1:compile
[INFO] | | \- org.yaml:snakeyaml:jar:1.19:runtime
[INFO] | +- org.springframework.boot:spring-boot-starter-json:jar:2.0.0.RC1:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.2:compile
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.2:compile
[INFO] | | \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.2:compile
[INFO] | +- org.springframework.boot:spring-boot-starter-reactor-netty:jar:2.0.0.RC1:compile
[INFO] | | \- io.projectreactor.ipc:reactor-netty:jar:0.7.3.RELEASE:compile
[INFO] | | \- io.netty:netty-transport-native-epoll:jar:4.1.20.Final:compile
[INFO] | | +- io.netty:netty-common:jar:4.1.20.Final:compile
[INFO] | | \- io.netty:netty-transport-native-unix-common:jar:4.1.20.Final:compile
[INFO] | +- org.hibernate.validator:hibernate-validator:jar:6.0.7.Final:compile
[INFO] | | +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] | | +- org.jboss.logging:jboss-logging:jar:3.3.1.Final:compile
[INFO] | | \- com.fasterxml:classmate:jar:1.3.4:compile
[INFO] | +- org.springframework:spring-web:jar:5.0.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-beans:jar:5.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-webflux:jar:5.0.3.RELEASE:compile
[INFO] | \- org.synchronoss.cloud:nio-multipart-parser:jar:1.1.0:compile
[INFO] | \- org.synchronoss.cloud:nio-stream-storage:jar:1.1.3:compile
[INFO] +- org.springframework.cloud:spring-cloud-gcp-starter-pubsub:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-gcp-starter:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | | +- org.springframework.cloud:spring-cloud-gcp-core:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | | \- org.springframework.cloud:spring-cloud-gcp-autoconfigure:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | +- org.springframework.cloud:spring-cloud-gcp-pubsub:jar:1.0.0.BUILD-SNAPSHOT:compile
[INFO] | | +- com.google.cloud:google-cloud-pubsub:jar:0.33.0-beta:compile
[INFO] | | \- org.springframework:spring-messaging:jar:5.0.3.RELEASE:compile
[INFO] | \- org.slf4j:slf4j-api:jar:1.7.25:compile
[INFO] +- org.apache.beam:beam-sdks-java-core:jar:2.2.0:compile
[INFO] | +- com.google.code.findbugs:jsr305:jar:3.0.1:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-core:jar:2.9.2:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
[INFO] | +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.2:compile
[INFO] | +- org.apache.avro:avro:jar:1.8.2: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.apache.commons:commons-compress:jar:1.8.1:compile
[INFO] | | \- org.tukaani:xz:jar:1.5:compile
[INFO] | +- org.xerial.snappy:snappy-java:jar:1.1.4:compile
[INFO] | \- joda-time:joda-time:jar:2.9.9:compile
[INFO] +- com.google.cloud:google-cloud-bigquery:jar:0.33.0-beta:compile
[INFO] | +- com.google.cloud:google-cloud-core:jar:1.15.0:compile
[INFO] | | +- com.google.api:api-common:jar:1.2.0:compile
[INFO] | | +- com.google.api:gax:jar:1.16.0:compile
[INFO] | | | +- com.google.auto.value:auto-value:jar:1.2:compile
[INFO] | | | \- org.threeten:threetenbp:jar:1.3.3:compile
[INFO] | | +- com.google.protobuf:protobuf-java-util:jar:3.5.1:compile
[INFO] | | | \- com.google.code.gson:gson:jar:2.8.2:compile
[INFO] | | +- com.google.api.grpc:proto-google-common-protos:jar:1.0.4:compile
[INFO] | | \- com.google.api.grpc:proto-google-iam-v1:jar:0.1.28:compile
[INFO] | +- com.google.cloud:google-cloud-core-http:jar:1.15.0:compile
[INFO] | | +- com.google.oauth-client:google-oauth-client:jar:1.23.0:compile
[INFO] | | +- com.google.http-client:google-http-client-appengine:jar:1.23.0:compile
[INFO] | | +- com.google.http-client:google-http-client-jackson:jar:1.23.0:compile
[INFO] | | \- com.google.api:gax-httpjson:jar:0.33.0:compile
[INFO] | \- com.google.apis:google-api-services-bigquery:jar:v2-rev347-1.22.0:compile
[INFO] +- io.grpc:grpc-core:jar:1.9.0:compile
[INFO] | +- io.grpc:grpc-context:jar:1.9.0:compile
[INFO] | +- com.google.guava:guava:jar:20.0:compile
[INFO] | +- com.google.errorprone:error_prone_annotations:jar:2.1.2:compile
[INFO] | +- com.google.instrumentation:instrumentation-api:jar:0.4.3:compile
[INFO] | +- io.opencensus:opencensus-api:jar:0.10.0:compile
[INFO] | \- io.opencensus:opencensus-contrib-grpc-metrics:jar:0.10.0:compile
[INFO] +- io.grpc:grpc-netty:jar:1.9.0:compile
[INFO] | +- io.netty:netty-codec-http2:jar:4.1.20.Final:compile
[INFO] | | +- io.netty:netty-codec-http:jar:4.1.20.Final:compile
[INFO] | | | \- io.netty:netty-codec:jar:4.1.20.Final:compile
[INFO] | | \- io.netty:netty-handler:jar:4.1.20.Final:compile
[INFO] | | \- io.netty:netty-buffer:jar:4.1.20.Final:compile
[INFO] | \- io.netty:netty-handler-proxy:jar:4.1.20.Final:compile
[INFO] | +- io.netty:netty-transport:jar:4.1.20.Final:compile
[INFO] | | \- io.netty:netty-resolver:jar:4.1.20.Final:compile
[INFO] | \- io.netty:netty-codec-socks:jar:4.1.20.Final:compile
[INFO] +- org.apache.beam:beam-runners-google-cloud-dataflow-java:jar:2.2.0:compile
[INFO] | +- org.apache.beam:beam-sdks-java-extensions-google-cloud-platform-core:jar:2.2.0:compile
[INFO] | | +- com.google.cloud.bigdataoss:gcsio:jar:1.4.5:compile
[INFO] | | \- com.google.apis:google-api-services-cloudresourcemanager:jar:v1beta1-rev10-1.21.0:compile
[INFO] | +- org.apache.beam:beam-sdks-common-runner-api:jar:2.2.0:compile
[INFO] | | +- com.google.protobuf:protobuf-java:jar:3.5.1:compile
[INFO] | | +- io.grpc:grpc-protobuf:jar:1.9.0:compile
[INFO] | | | \- io.grpc:grpc-protobuf-lite:jar:1.9.0:compile
[INFO] | | \- io.grpc:grpc-stub:jar:1.9.0:compile
[INFO] | +- org.apache.beam:beam-sdks-java-io-google-cloud-platform:jar:2.2.0:compile
[INFO] | | +- org.apache.beam:beam-sdks-java-extensions-protobuf:jar:2.2.0:compile
[INFO] | | +- com.google.api:gax-grpc:jar:1.16.0:compile
[INFO] | | +- com.google.cloud:google-cloud-core-grpc:jar:1.15.0:compile
[INFO] | | +- com.google.apis:google-api-services-pubsub:jar:v1-rev10-1.22.0:compile
[INFO] | | +- com.google.api.grpc:grpc-google-cloud-pubsub-v1:jar:0.1.28:compile
[INFO] | | +- com.google.api.grpc:proto-google-cloud-pubsub-v1:jar:0.1.28:compile
[INFO] | | +- com.google.cloud.datastore:datastore-v1-proto-client:jar:1.6.0:compile
[INFO] | | | +- com.google.api.grpc:proto-google-cloud-datastore-v1:jar:0.1.28:compile
[INFO] | | | \- com.google.http-client:google-http-client-protobuf:jar:1.20.0:compile
[INFO] | | +- com.google.cloud.datastore:datastore-v1-protos:jar:1.3.0:compile
[INFO] | | | \- com.google.api.grpc:grpc-google-common-protos:jar:1.0.4:compile
[INFO] | | +- io.grpc:grpc-auth:jar:1.9.0:compile
[INFO] | | +- io.grpc:grpc-all:jar:1.2.0:runtime
[INFO] | | | +- io.grpc:grpc-okhttp:jar:1.2.0:runtime
[INFO] | | | | +- com.squareup.okhttp:okhttp:jar:2.5.0:runtime
[INFO] | | | | \- com.squareup.okio:okio:jar:1.6.0:runtime
[INFO] | | | \- io.grpc:grpc-protobuf-nano:jar:1.2.0:runtime
[INFO] | | | \- com.google.protobuf.nano:protobuf-javanano:jar:3.0.0-alpha-5:runtime
[INFO] | | +- com.google.cloud:google-cloud-spanner:jar:0.33.0-beta:compile
[INFO] | | | +- com.google.api.grpc:proto-google-cloud-spanner-v1:jar:0.1.28:compile
[INFO] | | | +- com.google.api.grpc:proto-google-cloud-spanner-admin-instance-v1:jar:0.1.28:compile
[INFO] | | | +- com.google.api.grpc:grpc-google-cloud-spanner-v1:jar:0.1.28:compile
[INFO] | | | +- com.google.api.grpc:grpc-google-cloud-spanner-admin-database-v1:jar:0.1.28:compile
[INFO] | | | +- com.google.api.grpc:grpc-google-cloud-spanner-admin-instance-v1:jar:0.1.28:compile
[INFO] | | | \- io.opencensus:opencensus-contrib-grpc-util:jar:0.10.0:compile
[INFO] | | +- com.google.cloud.bigtable:bigtable-protos:jar:1.0.0-pre3:compile
[INFO] | | +- com.google.cloud.bigtable:bigtable-client-core:jar:1.0.0-pre3:compile
[INFO] | | | +- commons-logging:commons-logging:jar:1.2:compile
[INFO] | | | +- com.google.auth:google-auth-library-appengine:jar:0.7.0:compile
[INFO] | | | \- io.dropwizard.metrics:metrics-core:jar:3.2.6:compile
[INFO] | | +- io.netty:netty-tcnative-boringssl-static:jar:2.0.7.Final:compile
[INFO] | | \- com.google.api.grpc:proto-google-cloud-spanner-admin-database-v1:jar:0.1.28:compile
[INFO] | +- com.google.api-client:google-api-client:jar:1.23.0:compile
[INFO] | +- com.google.http-client:google-http-client:jar:1.23.0:compile
[INFO] | | \- org.apache.httpcomponents:httpclient:jar:4.5.5:compile
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.9:compile
[INFO] | | \- commons-codec:commons-codec:jar:1.11:compile
[INFO] | +- com.google.http-client:google-http-client-jackson2:jar:1.23.0:compile
[INFO] | +- com.google.apis:google-api-services-dataflow:jar:v1b3-rev213-1.22.0:compile
[INFO] | +- com.google.apis:google-api-services-clouddebugger:jar:v2-rev8-1.22.0:compile
[INFO] | +- com.google.apis:google-api-services-storage:jar:v1-rev114-1.23.0:compile
[INFO] | +- com.google.auth:google-auth-library-credentials:jar:0.9.0:compile
[INFO] | +- com.google.auth:google-auth-library-oauth2-http:jar:0.7.1:compile
[INFO] | \- com.google.cloud.bigdataoss:util: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] +- net.sf.marineapi:marineapi:jar:0.10.0:compile
[INFO] +- org.projectlombok:lombok:jar:1.16.20:compile (optional)
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.0.0.RC1:test
[INFO] | +- org.springframework.boot:spring-boot-test:jar:2.0.0.RC1:test
[INFO] | +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.0.0.RC1: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] | +- junit:junit:jar:4.12:compile
[INFO] | +- org.assertj:assertj-core:jar:3.9.0:test
[INFO] | +- org.mockito:mockito-core:jar:2.13.0:test
[INFO] | | +- net.bytebuddy:byte-buddy:jar:1.7.9:test
[INFO] | | +- net.bytebuddy:byte-buddy-agent:jar:1.7.9:test
[INFO] | | \- org.objenesis:objenesis:jar:2.6:test
[INFO] | +- org.hamcrest:hamcrest-core:jar:1.3:compile
[INFO] | +- org.hamcrest:hamcrest-library:jar:1.3:test
[INFO] | +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] | | \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] | +- org.springframework:spring-core:jar:5.0.3.RELEASE:compile
[INFO] | | \- org.springframework:spring-jcl:jar:5.0.3.RELEASE:compile
[INFO] | +- org.springframework:spring-test:jar:5.0.3.RELEASE:test
[INFO] | \- org.xmlunit:xmlunit-core:jar:2.5.1:test
[INFO] \- io.projectreactor:reactor-test:jar:3.1.3.RELEASE:test
[INFO] \- io.projectreactor:reactor-core:jar:3.1.3.RELEASE:compile
[INFO] \- org.reactivestreams:reactive-streams:jar:1.0.2:compile
What google cloud dataflow dependencies should i use for a pipeline to run successfuly.
Add the newer version of the cloudresourcemanager to your POM.
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-cloudresourcemanager</artifactId>
<version>v1-rev6-1.22.0</version>
</dependency>
Full explanation here.
Please use this dependency in your pom.xml
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-cloudresourcemanager</artifactId>
<version>v1beta1-rev3-1.20.0</version>
I'm attempting to use Hibernate Validator in an API gateway framework. The code eventually runs in Karaf, but I'm trying to get a unit test (not a PAX test) working first. I'll be using Mockito for mocking, but I don't think that's an issue yet.
I'm using "hibernate-validator" and "hibernate-validator-annotation-processor", version 5.4.1.Final.
When I run the test, I get the following:
HV000183: Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead
From other occurrences of this, I concluded that I have to add "org.glassfish:javax.el:3.0.0". Unfortunately, this had no effect. Exact same exception.
Update:
Some advice I've seen said to REMOVE the "javax.el-api" artifact. I found this referenced in one POM, so I commented it out. I also noticed that the "cdi-api" artifact appears to pull it in transitively, so I also commented that out.
Unfortunately, "mvn dependency:tree" still shows the 2.2.5 version of "javax.el-api" showing up, along with the 3.0.0 version of the glassfish "javax.el" artifact.
How do I get past this?
Update:
I've now updated my dependencies so that I have only "javax.el", version 3.0.1-b08, no "api" variant, but I'm still getting the error.
Here's my current dependency tree:
[INFO] mygroupid:usl-fraudcheck-impl:bundle:2.5.0-SNAPSHOT
[INFO] +- mygroupid:usl-csi-jaxb-base:jar:2.5.0-SNAPSHOT:compile
[INFO] | +- mygroupid:usl-shared:jar:2.5.0-SNAPSHOT:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlbeans:jar:2.5.0_1:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xstream:jar:1.4.9_1:compile
[INFO] | | | +- xmlpull:xmlpull:jar:1.1.3.1:compile
[INFO] | | | \- xpp3:xpp3_min:jar:1.1.4c:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.xmlpull:jar:1.1.3.1_2:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax.mail:jar:1.4.1_5:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-httpclient:jar:3.1_7:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-codec:jar:1.3_5:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.commons-io:jar:1.4_3:compile
[INFO] | | +- javax.ejb:javax.ejb-api:jar:3.2:compile
[INFO] | | +- javax.jms:javax.jms-api:jar:2.0:compile
[INFO] | | +- mygroupid.csi:csi88:jar:88.0:compile
[INFO] | | +- mygroupid.csi:csi213:jar:213.0:compile
[INFO] | | +- javax.xml.rpc:com.springsource.javax.xml.rpc:jar:1.1.0.v20110517:compile
[INFO] | | +- javax.transaction:javax.transaction-api:jar:1.2:compile
[INFO] | | +- javax.interceptor:javax.interceptor-api:jar:1.2:compile
[INFO] | | \- org.apache.servicemix.bundles:org.apache.servicemix.bundles.javax-inject:jar:1_2:compile
[INFO] | +- mygroupid:usl-base:jar:2.5.0-SNAPSHOT:compile
[INFO] | | +- org.apache.xmlbeans:xmlbeans:jar:2.4.0:compile
[INFO] | | | \- stax:stax-api:jar:1.0.1:compile
[INFO] | | +- org.apache.axis:axis:jar:1.4:compile
[INFO] | | +- org.apache.neethi:neethi:jar:3.0.0:compile
[INFO] | | | \- wsdl4j:wsdl4j:jar:1.6.2:compile
[INFO] | | +- org.apache.woden:woden-api:jar:1.0M9:compile
[INFO] | | +- org.apache.commons:com.springsource.org.apache.commons.net:jar:1.4.1:compile
[INFO] | | +- org.apache.woden:woden-impl-dom:jar:1.0M9:compile
[INFO] | | +- org.apache.woden:woden-impl-commons:jar:1.0M9:compile
[INFO] | | +- org.apache.ws.commons.schema:XmlSchema:jar:1.4.7:compile
[INFO] | | +- org.apache.httpcomponents:httpcore-osgi:jar:4.4:compile
[INFO] | | | +- org.apache.httpcomponents:httpcore:jar:4.4:compile
[INFO] | | | \- org.apache.httpcomponents:httpcore-nio:jar:4.4:compile
[INFO] | | +- org.apache.httpcomponents:httpclient-osgi:jar:4.5.2:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
[INFO] | | | +- commons-codec:commons-codec:jar:1.10:compile
[INFO] | | | +- org.apache.httpcomponents:httpmime:jar:4.5.2:compile
[INFO] | | | +- org.apache.httpcomponents:httpclient-cache:jar:4.5.2:compile
[INFO] | | | \- org.apache.httpcomponents:fluent-hc:jar:4.5.2:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.wsdl4j:jar:1.6.2_5:compile
[INFO] | | +- org.apache.ws.commons.axiom:axiom-api:jar:1.2.5:compile
[INFO] | | | +- javax.mail:mail:jar:1.4:compile
[INFO] | | | | \- javax.activation:activation:jar:1.1:compile
[INFO] | | | \- xml-apis:xml-apis:jar:1.4.01:test
[INFO] | | +- org.apache.axiom:com.springsource.org.apache.axiom:jar:1.2.5:compile
[INFO] | | +- org.apache.servicemix.bundles:org.apache.servicemix.bundles.axiom-impl:jar:1.2.13_1:compile
[INFO] | | | +- org.apache.james:apache-mime4j-core:jar:0.7.2:compile
[INFO] | | | +- org.apache.geronimo.specs:geronimo-activation_1.1_spec:jar:1.1:compile
[INFO] | | | +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] | | | +- org.codehaus.woodstox:wstx-asl:jar:3.2.9:compile
[INFO] | | | \- org.apache.geronimo.specs:geronimo-stax-api_1.0_spec:jar:1.0.1:compile
[INFO] | | +- org.apache.axis:com.springsource.org.apache.axis:jar:1.4.0:compile
[INFO] | | | \- org.apache.commons:com.springsource.org.apache.commons.httpclient:jar:3.1.0:compile
[INFO] | | | \- org.apache.commons:com.springsource.org.apache.commons.codec:jar:1.3.0:compile
[INFO] | | +- org.apache.commons:com.springsource.org.apache.commons.discovery:jar:0.4.0:compile
[INFO] | | +- org.apache.commons:com.springsource.org.apache.commons.logging:jar:1.1.1:compile
[INFO] | | +- javax.jms:com.springsource.javax.jms:jar:1.1.0:compile
[INFO] | | +- javax.servlet:servlet-api:jar:2.5:compile
[INFO] | | \- javax.ws.rs:javax.ws.rs-api:jar:2.0:compile
[INFO] | +- mygroupid.csi:csi-app:jar:1.0:compile
[INFO] | +- mygroupid.csi:csi97:jar:97.0:compile
[INFO] | +- mygroupid.csi:csi104:jar:104.0:compile
[INFO] | +- mygroupid.csi:csi106:jar:106.0:compile
[INFO] | +- mygroupid.csi:csi112:jar:112.1:compile
[INFO] | +- mygroupid.csi:csi109:jar:109.0:compile
[INFO] | +- mygroupid.csi:csi217:jar:217.0:compile
[INFO] | +- mygroupid.csi:csi116:jar:116:compile
[INFO] | +- mygroupid.csi.icas:csi116:jar:200.0:compile
[INFO] | +- mygroupid.csi.unifiedservices:csi116:jar:212.0:compile
[INFO] | +- mygroupid.csi.paom:csi112:jar:205.0:compile
[INFO] | +- mygroupid.csi.oneviewaddresslocationsystem:csi116:jar:203.0:compile
[INFO] | +- mygroupid.csi.orderandsubscriptionmanagementmobility:csi116:jar:206.0:compile
[INFO] | +- mygroupid.csi:csi121:jar:121:compile
[INFO] | \- mygroupid.csi.unifiedservices:csi121:jar:216.0:compile
[INFO] +- mygroupid:usl-fraudcheck-api:jar:2.5.0-SNAPSHOT:compile
[INFO] | \- mygroupid:usl-metrics:jar:2.5.0-SNAPSHOT:compile
[INFO] | +- mygroupid.oracle:ojdbc6:jar:11.2.0.3.0:compile
[INFO] | +- mygroupid.oracle:oracle.jdbc.OracleDriver:jar:12.1.0.1:compile
[INFO] | +- com.zaxxer:HikariCP:jar:2.6.1:compile
[INFO] | \- org.javassist:javassist:jar:3.18.2-GA:compile
[INFO] +- mygroupid.xmlsoap:xmlsoap:jar:11.0:compile
[INFO] +- mygroupid:usl-csi-jaxb-base:test-jar:tests:2.5.0-SNAPSHOT:test
[INFO] +- commons-beanutils:commons-beanutils:jar:1.9.3:compile
[INFO] +- org.hibernate:hibernate-validator:jar:5.4.1.Final:compile
[INFO] | +- javax.validation:validation-api:jar:1.1.0.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.hibernate:hibernate-validator-annotation-processor:jar:5.4.1.Final:compile
[INFO] +- org.glassfish:javax.el:jar:3.0.1-b08:compile
[INFO] +- log4j:log4j:jar:1.2.16:provided
[INFO] +- org.codehaus.mojo:cobertura-maven-plugin:jar:2.6:compile
[INFO] | +- net.sourceforge.cobertura:cobertura:jar:2.0.3:compile
[INFO] | | +- org.ow2.asm:asm:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-tree:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-commons:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-util:jar:4.1:compile
[INFO] | | +- org.ow2.asm:asm-analysis:jar:4.1:compile
[INFO] | | +- oro:oro:jar:2.0.8:compile
[INFO] | | +- jaxen:jaxen:jar:1.1-beta-8:compile
[INFO] | | | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | | | +- jdom:jdom:jar:1.0:compile
[INFO] | | | +- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] | | | +- xerces:xercesImpl:jar:2.11.0:test
[INFO] | | | \- xom:xom:jar:1.0b3:compile
[INFO] | | | +- com.ibm.icu:icu4j:jar:2.6.1:compile
[INFO] | | | +- xalan:xalan:jar:2.7.2:compile
[INFO] | | | | \- xalan:serializer:jar:2.7.2:compile
[INFO] | | | \- org.ccil.cowan.tagsoup:tagsoup:jar:0.9.7:compile
[INFO] | | +- org.apache.ant:ant:jar:1.8.3:compile
[INFO] | | | \- org.apache.ant:ant-launcher:jar:1.8.3:compile
[INFO] | | +- org.mortbay.jetty:servlet-api-2.5:jar:6.1.14:compile
[INFO] | | +- org.mortbay.jetty:jetty:jar:6.1.14:compile
[INFO] | | +- org.mortbay.jetty:jetty-util:jar:6.1.14:compile
[INFO] | | \- com.sun:tools:jar:0:system
[INFO] | +- net.sourceforge.cobertura:cobertura-runtime:pom:2.0.3:compile
[INFO] | +- urbanophile:java-getopt:jar:1.0.9:compile
[INFO] | +- org.apache.maven:maven-core:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-settings:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-file:jar:1.0-beta-2:runtime
[INFO] | | +- org.apache.maven:maven-plugin-parameter-documenter:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-2:runtime
[INFO] | | | \- org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-2:runtime
[INFO] | | | \- jtidy:jtidy:jar:4aug2000r7-dev:runtime
[INFO] | | +- org.apache.maven:maven-profile:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-model:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-2:compile
[INFO] | | +- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
[INFO] | | +- org.apache.maven:maven-repository-metadata:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-error-diagnostics:jar:2.0.8:compile
[INFO] | | +- commons-cli:commons-cli:jar:1.0:compile
[INFO] | | +- org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-2:runtime
[INFO] | | | \- org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2:runtime
[INFO] | | +- org.apache.maven:maven-plugin-descriptor:jar:2.0.8:compile
[INFO] | | +- org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4:compile
[INFO] | | +- org.apache.maven:maven-artifact-manager:jar:2.0.8:compile
[INFO] | | +- org.apache.maven:maven-monitor:jar:2.0.8:compile
[INFO] | | +- org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-2:runtime
[INFO] | | | \- com.jcraft:jsch:jar:0.1.27:runtime
[INFO] | | \- classworlds:classworlds:jar:1.1:compile
[INFO] | +- org.apache.maven:maven-artifact:jar:2.0.8:compile
[INFO] | +- org.apache.maven:maven-plugin-api:jar:2.0.8:compile
[INFO] | +- org.apache.maven.reporting:maven-reporting-api:jar:2.0.8:compile
[INFO] | | \- org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-9:compile
[INFO] | +- org.apache.maven:maven-project:jar:2.0.8:compile
[INFO] | | \- org.apache.maven:maven-plugin-registry:jar:2.0.8:compile
[INFO] | +- org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4.2:compile
[INFO] | | +- commons-validator:commons-validator:jar:1.2.0:compile
[INFO] | | | \- commons-digester:commons-digester:jar:1.6:compile
[INFO] | | +- org.apache.maven.doxia:doxia-core:jar:1.0:compile
[INFO] | | \- org.apache.maven.doxia:doxia-site-renderer:jar:1.0:compile
[INFO] | | +- org.codehaus.plexus:plexus-i18n:jar:1.0-beta-7:compile
[INFO] | | +- org.codehaus.plexus:plexus-velocity:jar:1.1.7:compile
[INFO] | | +- org.apache.velocity:velocity:jar:1.5:compile
[INFO] | | +- org.apache.maven.doxia:doxia-decoration-model:jar:1.0:compile
[INFO] | | +- org.apache.maven.doxia:doxia-module-apt:jar:1.0:compile
[INFO] | | +- org.apache.maven.doxia:doxia-module-fml:jar:1.0:compile
[INFO] | | +- org.apache.maven.doxia:doxia-module-xdoc:jar:1.0:compile
[INFO] | | \- org.apache.maven.doxia:doxia-module-xhtml:jar:1.0:compile
[INFO] | +- org.codehaus.plexus:plexus-utils:jar:2.0.2:compile
[INFO] | \- org.apache.maven.shared:maven-invoker:jar:2.0.11:compile
[INFO] +- org.osgi:org.osgi.core:jar:5.0.0:provided
[INFO] +- org.osgi:org.osgi.compendium:jar:5.0.0:provided
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.mockito:mockito-core:jar:1.10.19:test
[INFO] | \- org.objenesis:objenesis:jar:2.1:test
[INFO] +- org.powermock:powermock-module-junit4:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-module-junit4-common:jar:1.6.6:test
[INFO] | +- org.powermock:powermock-core:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-reflect:jar:1.6.6:test
[INFO] +- org.powermock:powermock-api-mockito:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-api-mockito-common:jar:1.6.6:test
[INFO] | \- org.powermock:powermock-api-support:jar:1.6.6:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.21:provided
[INFO] +- org.apache.aries.blueprint:org.apache.aries.blueprint.annotation.api:jar:1.0.0:provided
[INFO] +- org.ops4j.pax.exam:pax-exam-junit4:jar:4.9.1:test
[INFO] | +- org.ops4j.pax.exam:pax-exam-spi:jar:4.9.1:test
[INFO] | | \- org.ops4j.pax.tinybundles:tinybundles:jar:2.1.1:test
[INFO] | | \- biz.aQute.bnd:bndlib:jar:2.4.0:test
[INFO] | \- org.ops4j.base:ops4j-base-lang:jar:1.5.0:test
[INFO] +- org.ops4j.pax.exam:pax-exam-container-karaf:jar:4.9.1:test
[INFO] | +- org.ops4j.pax.exam:pax-exam-container-remote:jar:4.9.1:test
[INFO] | | +- org.ops4j.pax.exam:pax-exam-container-rbc-client:jar:4.9.1:test
[INFO] | | | \- org.ops4j.pax.exam:pax-exam-container-rbc:jar:4.9.1:test
[INFO] | | +- org.ops4j.pax.swissbox:pax-swissbox-core:jar:1.8.2:test
[INFO] | | | \- org.ops4j.pax.swissbox:pax-swissbox-lifecycle:jar:1.8.2:test
[INFO] | | \- org.ops4j.base:ops4j-base-net:jar:1.5.0:test
[INFO] | +- org.apache.commons:commons-compress:jar:1.4.1:test
[INFO] | | \- org.tukaani:xz:jar:1.0:test
[INFO] | +- org.ops4j.pax.swissbox:pax-swissbox-framework:jar:1.8.2:test
[INFO] | | +- org.ops4j.pax.swissbox:pax-swissbox-tracker:jar:1.8.2:test
[INFO] | | +- org.ops4j.base:ops4j-base-exec:jar:1.5.0:test
[INFO] | | +- org.ops4j.base:ops4j-base-io:jar:1.5.0:test
[INFO] | | \- org.ops4j.base:ops4j-base-monitors:jar:1.5.0:test
[INFO] | \- org.ops4j.base:ops4j-base-spi:jar:1.5.0:test
[INFO] +- org.apache.karaf:apache-karaf:zip:4.0.7:compile
[INFO] | +- org.apache.karaf.features:framework:kar:4.0.7:compile
[INFO] | | +- org.apache.karaf.features:base:jar:4.0.7:runtime
[INFO] | | +- org.apache.karaf:org.apache.karaf.main:jar:4.0.7:runtime
[INFO] | | | +- org.apache.karaf:org.apache.karaf.util:jar:4.0.7:runtime
[INFO] | | | | \- org.apache.felix:org.apache.felix.utils:jar:1.8.2:runtime
[INFO] | | | +- net.java.dev.jna:jna:jar:4.2.2:runtime
[INFO] | | | \- net.java.dev.jna:jna-platform:jar:4.2.2:runtime
[INFO] | | +- org.apache.karaf:org.apache.karaf.exception:jar:4.0.7:runtime
[INFO] | | +- org.apache.karaf:org.apache.karaf.client:jar:4.0.7:runtime
[INFO] | | | \- org.apache.sshd:sshd-core:jar:0.14.0:runtime
[INFO] | | +- org.apache.karaf.jaas:org.apache.karaf.jaas.boot:jar:4.0.7:runtime
[INFO] | | +- org.apache.karaf.diagnostic:org.apache.karaf.diagnostic.boot:jar:4.0.7:runtime
[INFO] | | +- org.eclipse.tycho:org.eclipse.osgi:jar:3.10.101.v20150820-1432:runtime
[INFO] | | +- org.apache.felix:org.apache.felix.framework:jar:5.4.0:runtime
[INFO] | | +- jline:jline:jar:2.14.2:compile
[INFO] | | +- org.jledit:core:jar:0.2.1:compile
[INFO] | | +- org.ops4j.pax.logging:pax-logging-api:jar:1.8.5:compile
[INFO] | | +- org.ops4j.pax.logging:pax-logging-service:jar:1.8.5:compile
[INFO] | | +- org.ops4j.pax.url:pax-url-aether:jar:2.4.7:compile
[INFO] | | \- org.apache.karaf.features:org.apache.karaf.features.core:jar:4.0.7:compile
[INFO] | +- org.apache.karaf.features:framework:xml:features:4.0.7:runtime
[INFO] | +- org.apache.karaf.features:standard:xml:features:4.0.7:compile
[INFO] | +- org.apache.karaf.features:spring:xml:features:4.0.7:runtime
[INFO] | \- org.apache.karaf.features:enterprise:xml:features:4.0.7:runtime
[INFO] +- org.ops4j.pax.exam:pax-exam:jar:4.9.1:test
[INFO] | +- org.ops4j.base:ops4j-base-store:jar:1.5.0:test
[INFO] | \- org.ops4j.base:ops4j-base-util-property:jar:1.5.0:test
[INFO] +- org.apache.camel:camel-core:jar:2.17.0:provided
[INFO] | +- com.sun.xml.bind:jaxb-core:jar:2.2.11:provided
[INFO] | \- com.sun.xml.bind:jaxb-impl:jar:2.2.11:provided
[INFO] +- org.apache.camel:camel-blueprint:jar:2.17.0:provided
[INFO] | +- org.apache.camel:camel-core-xml:jar:2.17.0:provided
[INFO] | \- org.apache.camel:camel-core-osgi:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-jms:jar:2.17.0:provided
[INFO] | +- org.apache.camel:camel-spring:jar:2.17.0:provided
[INFO] | | +- org.springframework:spring-core:jar:4.2.5.RELEASE:provided
[INFO] | | +- org.springframework:spring-aop:jar:4.2.5.RELEASE:provided
[INFO] | | | \- aopalliance:aopalliance:jar:1.0:provided
[INFO] | | \- org.springframework:spring-expression:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-jms:jar:4.2.5.RELEASE:provided
[INFO] | | \- org.springframework:spring-messaging:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-context:jar:4.2.5.RELEASE:provided
[INFO] | +- org.springframework:spring-tx:jar:4.2.5.RELEASE:provided
[INFO] | \- org.springframework:spring-beans:jar:4.2.5.RELEASE:provided
[INFO] +- org.apache.camel:camel-jaxb:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-test:jar:2.17.0:test
[INFO] +- commons-logging:commons-logging:jar:1.2:provided
[INFO] +- commons-lang:commons-lang:jar:2.6:provided
[INFO] +- commons-io:commons-io:jar:2.4:provided
[INFO] +- org.apache.camel:camel-test-blueprint:jar:2.13.0:test
[INFO] | +- org.apache.aries.blueprint:org.apache.aries.blueprint:jar:1.1.0:test
[INFO] | +- org.apache.aries:org.apache.aries.util:jar:1.1.0:test
[INFO] | +- org.apache.aries.proxy:org.apache.aries.proxy.impl:jar:1.0.1:test
[INFO] | +- org.apache.aries.proxy:org.apache.aries.proxy.api:jar:1.0.0:test
[INFO] | +- com.googlecode.pojosr:de.kalpatec.pojosr.framework:jar:0.2.1:test
[INFO] | +- org.ops4j.pax.swissbox:pax-swissbox-tinybundles:jar:1.3.1:test
[INFO] | | \- org.ops4j.pax.swissbox:pax-swissbox-bnd:jar:1.3.1:test
[INFO] | | \- biz.aQute:bndlib:jar:0.0.357:test
[INFO] | +- org.apache.felix:org.apache.felix.configadmin:jar:1.4.0:compile
[INFO] | \- org.apache.felix:org.apache.felix.fileinstall:jar:3.2.6:compile
[INFO] +- org.apache.camel:camel-jackson:jar:2.17.0:provided
[INFO] | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.7.2:provided
[INFO] +- org.apache.camel:camel-jsonpath:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-jolt:jar:2.17.0:provided
[INFO] +- org.apache.camel:camel-quartz2:jar:2.17.0:provided
[INFO] | +- org.quartz-scheduler:quartz:jar:2.2.2:provided
[INFO] | | \- c3p0:c3p0:jar:0.9.1.1:provided
[INFO] | \- com.mchange:c3p0:jar:0.9.5.2:provided
[INFO] | \- com.mchange:mchange-commons-java:jar:0.2.11:provided
[INFO] +- org.apache.camel:camel-hazelcast:jar:2.17.0:provided
[INFO] | +- com.hazelcast:hazelcast:jar:3.6.2:provided
[INFO] | \- com.hazelcast:hazelcast-client:jar:3.6.2:provided
[INFO] +- com.jayway.jsonpath:json-path:jar:2.0.0:provided
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.8.3:provided
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.8.3:provided
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.8.3:provided
[INFO] +- com.bazaarvoice.jolt:jolt-core:jar:0.0.16:provided
[INFO] | \- javax.inject:javax.inject:jar:1:provided
[INFO] +- com.bazaarvoice.jolt:json-utils:jar:0.0.16:provided
[INFO] +- net.minidev:json-smart:jar:2.1.1:provided
[INFO] +- net.minidev:asm:jar:1.0.2:provided
[INFO] | \- asm:asm:jar:3.3.1:provided
[INFO] +- com.google.code.gson:gson:jar:2.8.0:provided
[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- org.apache.maven.surefire:surefire-junit4:jar:2.19.1:test
[INFO] | \- org.apache.maven.surefire:surefire-api:jar:2.19.1:test
[INFO] +- org.apache.cxf:cxf-core:jar:3.1.8:provided
[INFO] | +- org.codehaus.woodstox:woodstox-core-asl:jar:4.4.1:compile
[INFO] | | \- org.codehaus.woodstox:stax2-api:jar:3.1.4:compile
[INFO] | \- org.apache.ws.xmlschema:xmlschema-core:jar:2.2.1:compile
[INFO] +- org.apache.cxf:cxf-rt-rs-client:jar:3.1.8:provided
[INFO] | +- org.apache.cxf:cxf-rt-transports-http:jar:3.1.8:provided
[INFO] | \- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:3.1.8:provided
[INFO] | \- javax.annotation:javax.annotation-api:jar:1.2:provided
[INFO] +- org.jacoco:org.jacoco.agent:jar:runtime:0.7.8:test
[INFO] \- org.eclipse.jdt:org.eclipse.jdt.annotation:jar:2.1.0:compile
The following is an excerpt from the output of "mvn install" in the module, when it's running the unit test:
Running package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest
[org.jboss.logging] : Logging Provider: org.jboss.logging.Log4j2LoggerProvider Ignored FQCN: org.jboss.logging.Logger
[org.hibernate.validator.internal.util.Version] : HV000001: Hibernate Validator 5.4.1.Final Ignored FQCN: org.hibernate.validator.internal.util.logging.Log_$logger
[org.hibernate.validator.internal.engine.resolver.DefaultTraversableResolver] : Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ValidationXmlParser] : Trying to load META-INF/validation.xml for XML based Validator configuration. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ResourceLoaderHelper] : Trying to load META-INF/validation.xml via TCCL Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ResourceLoaderHelper] : Trying to load META-INF/validation.xml via Hibernate Validator's class loader Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
[org.hibernate.validator.internal.xml.ValidationXmlParser] : No META-INF/validation.xml found. Using annotation based configuration only. Ignored FQCN: org.jboss.logging.DelegatingBasicLogger
Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.67 sec <<< FAILURE! - in package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest
testValidate(package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest) Time elapsed: 0.219 sec <<< ERROR!
javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead
at package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest.testValidate(InquireCPNIContactInformationProcessorTest.java:23)
Caused by: java.lang.NoClassDefFoundError: javax/el/ExpressionFactory
at package.usl.fraudcheck.impl.InquireCPNIContactInformationProcessorTest.testValidate(InquireCPNIContactInformationProcessorTest.java:23)
I have had the same error even after adding a dependency to org.glassfish:javax.el:3.0.1-b08. The issue turned out to be transitive dependencies being pulled in that include javax.el.ExpressionFactory but have no implementation.
The following command will output all the dependencies that include javax.el.ExpressionFactory
for i in $(mvn dependency:build-classpath | grep '.m2' | tr ':' ' '); do
jar -tvf $i | grep 'javax/el/ExpressionFactory' && echo -e "\t$i"
done 2> /dev/null
I then used <exclusions> in my pom.xml to remove the jars that do not match org.glassfish:javax.el:3.0.1-b08.
The exclusions may end up removing code in the excluded Jars that is needed as well. In my case I had to find a replacement jar that provided an embedded Jetty Server.
So, you really need only one version of the el jar. And it should be:
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.el</artifactId>
<version>3.0.1-b08</version>
</dependency>
As for the other el jars, you need to exclude them from your dependencies. The dependency tree should help you as you are able to see where they come from.
Just use an exclusion on the dependencies transitively bringing the old el jars and be sure you don't reference it explicitly in your poms and it should work.
The other solution, as mentioned by the error message, is to use a message interpolator not using EL but I wouldn't recommend it as some built-in constraints use EL in their messages and you will probably need it for your own constraints.
I have a project which is having multiple modules within it. One of the module, say "main", is having my service class, "MyService.class". Dropwizard has a jar - dropwizard-core. I want this jar in more than one module, so I was thinking of keeping its dependency in parent POM. By doing that, while running my dropwizard service file, I am encountering an exception as follows:
SLF4J: Class path contains multiple SLF4J bindings.<br>
SLF4J: Found binding in [jar:file:/home/username/.m2/repository/org/slf4j/slf4j-simple/1.7.12/slf4j-simple-1.7.12.jar!/org/slf4j/impl/StaticLoggerBinder.class]<br>
SLF4J: Found binding in [jar:file:/home/username/.m2/repository/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]<br>
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.<br>
SLF4J: Actual binding is of type [org.slf4j.impl.SimpleLoggerFactory]<br><br>
Exception in thread "main" java.lang.IllegalStateException: Unable to acquire the logger context
at io.dropwizard.logging.LoggingUtil.getLoggerContext(LoggingUtil.java:46)
at io.dropwizard.logging.BootstrapLogging.bootstrap(BootstrapLogging.java:45)
at io.dropwizard.logging.BootstrapLogging.bootstrap(BootstrapLogging.java:34)
at io.dropwizard.Application.<init>(Application.java:24)
at my.project.package.MyService.<init>(MyService.java:31)
at my.project.package.MyService.main(MyService.java:38)
This project runs perfectly fine if I put the dependency in the POM of "main" module.
Dropwizard is binding with wrong logger and that is the reason behind this exception. But this binding happens in the background and I have no control over it.
I am also sharing the dependency tree for both the scenarios.
Case 1 : When dropwizard-core is in child POM (main module) :
my.groupId.myProject:myProject-main:jar:1.0-SNAPSHOT<br>
[INFO] +- io.dropwizard:dropwizard-core:jar:0.9.2:compile<br>
[INFO] | +- io.dropwizard:dropwizard-util:jar:0.9.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.0:compile<br>
[INFO] | | +- com.google.guava:guava:jar:18.0:compile<br>
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.1:compile<br>
[INFO] | | \- joda-time:joda-time:jar:2.9:compile<br>
[INFO] | +- io.dropwizard:dropwizard-jackson:jar:0.9.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk7:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.6.3:compile<br>
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.12:compile<br>
[INFO] | | \- ch.qos.logback:logback-classic:jar:1.1.3:compile<br>
[INFO] | +- io.dropwizard:dropwizard-validation:jar:0.9.2:compile<br>
[INFO] | | +- org.hibernate:hibernate-validator:jar:5.2.2.Final:compile<br>
[INFO] | | | +- javax.validation:validation-api:jar:1.1.0.Final:compile<br>
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile<br>
[INFO] | | | \- com.fasterxml:classmate:jar:1.1.0:compile<br>
[INFO] | | \- org.glassfish:javax.el:jar:3.0.0:compile<br>
[INFO] | +- io.dropwizard:dropwizard-configuration:jar:0.9.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.6.3:compile<br>
[INFO] | | | \- org.yaml:snakeyaml:jar:1.15:compile<br>
[INFO] | | \- org.apache.commons:commons-lang3:jar:3.4:compile<br>
[INFO] | +- io.dropwizard:dropwizard-logging:jar:0.9.2:compile<br>
[INFO] | | +- io.dropwizard.metrics:metrics-logback:jar:3.1.2:compile<br>
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.12:compile<br><br>
[INFO] | | +- ch.qos.logback:logback-core:jar:1.1.3:compile<br>
[INFO] | | +- org.slf4j:log4j-over-slf4j:jar:1.7.12:compile<br>
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile<br>
[INFO] | | \- org.eclipse.jetty:jetty-util:jar:9.2.13.v20150730:compile<br>
[INFO] | +- io.dropwizard:dropwizard-metrics:jar:0.9.2:compile<br>
[INFO] | +- io.dropwizard:dropwizard-jersey:jar:0.9.2:compile<br>
[INFO] | | +- org.glassfish.jersey.core:jersey-server:jar:2.22.1:compile<br>
[INFO] | | | +- org.glassfish.jersey.core:jersey-common:jar:2.22.1:compile<br>
[INFO] | | | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.1:compile<br>
[INFO] | | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile<br>
[INFO] | | | +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile<br>
[INFO] | | | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.1:compile<br>
[INFO] | | | +- javax.annotation:javax.annotation-api:jar:1.2:compile<br>
[INFO] | | | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b31:compile<br>
[INFO] | | | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b31:compile<br>
[INFO] | | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b31:compile<br>
[INFO] | | | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b31:compile<br>
[INFO] | | | \- org.glassfish.hk2:hk2-locator:jar:2.4.0-b31:compile<br>
[INFO] | | | \- org.javassist:javassist:jar:3.18.1-GA:compile<br>
[INFO] | | +- org.glassfish.jersey.ext:jersey-metainf-services:jar:2.22.1:compile<br>
[INFO] | | +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.22.1:compile<br>
[INFO] | | +- io.dropwizard.metrics:metrics-jersey2:jar:3.1.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.6.3:compile<br>
[INFO] | | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.6.3:compile<br>
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.3:compile<br>
[INFO] | | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.22.1:compile<br>
[INFO] | | | \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.1:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-server:jar:9.2.13.v20150730:compile<br>
[INFO] | | | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile<br>
[INFO] | | | \- org.eclipse.jetty:jetty-io:jar:9.2.13.v20150730:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-webapp:jar:9.2.13.v20150730:compile<br>
[INFO] | | | \- org.eclipse.jetty:jetty-xml:jar:9.2.13.v20150730:compile<br>
[INFO] | | \- org.eclipse.jetty:jetty-continuation:jar:9.2.13.v20150730:compile<br>
[INFO] | +- io.dropwizard:dropwizard-servlets:jar:0.9.2:compile<br>
[INFO] | | \- io.dropwizard.metrics:metrics-annotation:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard:dropwizard-jetty:jar:0.9.2:compile<br>
[INFO] | | +- io.dropwizard.metrics:metrics-jetty9:jar:3.1.2:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-servlet:jar:9.2.13.v20150730:compile<br>
[INFO] | | | \- org.eclipse.jetty:jetty-security:jar:9.2.13.v20150730:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-servlets:jar:9.2.13.v20150730:compile<br>
[INFO] | | \- org.eclipse.jetty:jetty-http:jar:9.2.13.v20150730:compile<br>
[INFO] | +- io.dropwizard:dropwizard-lifecycle:jar:0.9.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-core:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-jvm:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-servlets:jar:3.1.2:compile<br>
[INFO] | | \- io.dropwizard.metrics:metrics-json:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-healthchecks:jar:3.1.2:compile<br>
[INFO] | +- net.sourceforge.argparse4j:argparse4j:jar:0.6.0:compile<br>
[INFO] | \- org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:jar:1.0.3:compile<br>
[INFO] +- de.thomaskrille:dropwizard-template-config:jar:1.1.0:compile<br>
[INFO] +- my.groupId.myProject:myProject-module1:jar:1.0-SNAPSHOT:compile<br>
[INFO] +- my.groupId.myProject:myProject-module2:jar:1.0-SNAPSHOT:compile<br>
[INFO] +- my.groupId.myProject:myProject-module3:jar:0.0.1-SNAPSHOT:compile<br>
[INFO] | +- io.dropwizard:dropwizard-auth:jar:0.9.1:compile<br>
[INFO] | \- io.dropwizard:dropwizard-client:jar:0.9.1:compile<br>
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.22.1:compile<br>
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.1:compile<br>
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.3:compile<br>
[INFO] | | \- commons-codec:commons-codec:jar:1.9:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-httpclient:jar:3.1.2:compile<br>
[INFO] | \- org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.22.1:compile<br>
[INFO] +- junit:junit:jar:4.12:test<br>
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test<br>
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test<br>
[INFO] \- org.mockito:mockito-core:jar:1.10.19:test<br>
[INFO] \- org.objenesis:objenesis:jar:2.1:test<br>
**Case 2 : When dropwizard-core is in parent POM :**
my.groupId.myProject:myProject-main:jar:jar:1.0-SNAPSHOT<br>
[INFO] +- de.thomaskrille:dropwizard-template-config:jar:1.1.0:compile<br>
[INFO] +- my.groupId.myProject:myProject-module1:jar:1.0-SNAPSHOT:compile<br>
[INFO] +- my.groupId.myProject:myProject-module2:jar:1.0-SNAPSHOT:compile<br>
[INFO] +- my.groupId.myProject:myProject-common:jar:0.0.1-SNAPSHOT:compile<br>
[INFO] | +- io.dropwizard:dropwizard-auth:jar:0.9.1:compile<br>
[INFO] | \- io.dropwizard:dropwizard-client:jar:0.9.1:compile<br>
[INFO] | +- org.glassfish.jersey.core:jersey-client:jar:2.22.1:compile<br>
[INFO] | | +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile<br>
[INFO] | | +- org.glassfish.jersey.core:jersey-common:jar:2.22.1:compile<br>
[INFO] | | | +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.22.1:compile<br>
[INFO] | | | \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile<br>
[INFO] | | +- org.glassfish.hk2:hk2-api:jar:2.4.0-b31:compile<br>
[INFO] | | | +- org.glassfish.hk2:hk2-utils:jar:2.4.0-b31:compile<br>
[INFO] | | | \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.4.0-b31:compile<br>
[INFO] | | +- org.glassfish.hk2.external:javax.inject:jar:2.4.0-b31:compile<br>
[INFO] | | \- org.glassfish.hk2:hk2-locator:jar:2.4.0-b31:compile<br>
[INFO] | | \- org.javassist:javassist:jar:3.18.1-GA:compile<br>
[INFO] | +- org.apache.httpcomponents:httpclient:jar:4.5.1:compile<br>
[INFO] | | +- org.apache.httpcomponents:httpcore:jar:4.4.3:compile<br>
[INFO] | | \- commons-codec:commons-codec:jar:1.9:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-httpclient:jar:3.1.2:compile<br>
[INFO] | \- org.glassfish.jersey.connectors:jersey-apache-connector:jar:2.22.1:compile<br>
[INFO] +- io.dropwizard:dropwizard-core:jar:0.9.2:compile<br>
[INFO] | +- io.dropwizard:dropwizard-util:jar:0.9.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.core:jackson-annotations:jar:2.6.0:compile<br>
[INFO] | | +- com.google.guava:guava:jar:18.0:compile<br>
[INFO] | | +- com.google.code.findbugs:jsr305:jar:3.0.1:compile<br>
[INFO] | | \- joda-time:joda-time:jar:2.9:compile<br>
[INFO] | +- io.dropwizard:dropwizard-jackson:jar:0.9.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.core:jackson-core:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.core:jackson-databind:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-jdk7:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.6.3:compile<br>
[INFO] | | +- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.6.3:compile<br>
[INFO] | | +- org.slf4j:slf4j-api:jar:1.7.12:compile<br>
[INFO] | | \- ch.qos.logback:logback-classic:jar:1.1.3:compile<br>
[INFO] | +- io.dropwizard:dropwizard-validation:jar:0.9.2:compile<br>
[INFO] | | +- org.hibernate:hibernate-validator:jar:5.2.2.Final:compile<br>
[INFO] | | | +- javax.validation:validation-api:jar:1.1.0.Final:compile<br>
[INFO] | | | +- org.jboss.logging:jboss-logging:jar:3.2.1.Final:compile<br>
[INFO] | | | \- com.fasterxml:classmate:jar:1.1.0:compile<br>
[INFO] | | \- org.glassfish:javax.el:jar:3.0.0:compile<br>
[INFO] | +- io.dropwizard:dropwizard-configuration:jar:0.9.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.6.3:compile<br>
[INFO] | | | \- org.yaml:snakeyaml:jar:1.15:compile<br>
[INFO] | | \- org.apache.commons:commons-lang3:jar:3.4:compile<br>
[INFO] | +- io.dropwizard:dropwizard-logging:jar:0.9.2:compile<br>
[INFO] | | +- io.dropwizard.metrics:metrics-logback:jar:3.1.2:compile<br>
[INFO] | | +- org.slf4j:jul-to-slf4j:jar:1.7.12:compile<br>
[INFO] | | +- ch.qos.logback:logback-core:jar:1.1.3:compile<br>
[INFO] | | +- org.slf4j:log4j-over-slf4j:jar:1.7.12:compile<br>
[INFO] | | +- org.slf4j:jcl-over-slf4j:jar:1.7.12:compile<br>
[INFO] | | \- org.eclipse.jetty:jetty-util:jar:9.2.13.v20150730:compile<br>
[INFO] | +- io.dropwizard:dropwizard-metrics:jar:0.9.2:compile<br>
[INFO] | +- io.dropwizard:dropwizard-jersey:jar:0.9.2:compile<br>
[INFO] | | +- org.glassfish.jersey.core:jersey-server:jar:2.22.1:compile<br>
[INFO] | | | +- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.22.1:compile<br>
[INFO] | | | \- javax.annotation:javax.annotation-api:jar:1.2:compile<br>
[INFO] | | +- org.glassfish.jersey.ext:jersey-metainf-services:jar:2.22.1:compile<br>
[INFO] | | +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.22.1:compile<br>
[INFO] | | +- io.dropwizard.metrics:metrics-jersey2:jar:3.1.2:compile<br>
[INFO] | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.6.3:compile<br>
[INFO] | | | +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.6.3:compile<br>
[INFO] | | | \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.6.3:compile<br>
[INFO] | | +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.22.1:compile<br>
[INFO] | | | \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.22.1:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-server:jar:9.2.13.v20150730:compile<br>
[INFO] | | | +- javax.servlet:javax.servlet-api:jar:3.1.0:compile<br>
[INFO] | | | \- org.eclipse.jetty:jetty-io:jar:9.2.13.v20150730:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-webapp:jar:9.2.13.v20150730:compile<br>
[INFO] | | | \- org.eclipse.jetty:jetty-xml:jar:9.2.13.v20150730:compile<br>
[INFO] | | \- org.eclipse.jetty:jetty-continuation:jar:9.2.13.v20150730:compile<br>
[INFO] | +- io.dropwizard:dropwizard-servlets:jar:0.9.2:compile<br>
[INFO] | | \- io.dropwizard.metrics:metrics-annotation:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard:dropwizard-jetty:jar:0.9.2:compile<br>
[INFO] | | +- io.dropwizard.metrics:metrics-jetty9:jar:3.1.2:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-servlet:jar:9.2.13.v20150730:compile<br>
[INFO] | | | \- org.eclipse.jetty:jetty-security:jar:9.2.13.v20150730:compile<br>
[INFO] | | +- org.eclipse.jetty:jetty-servlets:jar:9.2.13.v20150730:compile<br>
[INFO] | | \- org.eclipse.jetty:jetty-http:jar:9.2.13.v20150730:compile<br>
[INFO] | +- io.dropwizard:dropwizard-lifecycle:jar:0.9.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-core:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-jvm:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-servlets:jar:3.1.2:compile<br>
[INFO] | | \- io.dropwizard.metrics:metrics-json:jar:3.1.2:compile<br>
[INFO] | +- io.dropwizard.metrics:metrics-healthchecks:jar:3.1.2:compile<br>
[INFO] | +- net.sourceforge.argparse4j:argparse4j:jar:0.6.0:compile<br>
[INFO] | \- org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:jar:1.0.3:compile<br>
[INFO] +- junit:junit:jar:4.12:test<br>
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test<br>
[INFO] +- org.hamcrest:hamcrest-library:jar:1.3:test<br>
[INFO] \- org.mockito:mockito-core:jar:1.10.19:test<br>
[INFO] \- org.objenesis:objenesis:jar:2.1:test<br>
If anyone could come up with a possible reasoning, it would be of great help.
Thanks.
Your problem is that you have two different slf4j implementations (aka bindings) in your classpath and this shouldn't be the case.
When this happens, the first one (in order of appearance in the classpath) is used by slf4j. Then dropwizard LoggingUtil tries to retrieve the actual ILoggerFactory but expects it to be an instance of logback's LoggerContext.
In your case, it is an instance of SimpleLoggerFactory because slf4j-simple appears first in the classpath when you declare the dependency to dropwizard-core in the the parent POM: indeed, the logback-classic dependency is brought by dropwizard-core.
The solution is very simple: you must remove the dependency to slf4j-simple.
This is explained at the very beginning of the slf4j manual.
The issue is resolved for me after I globally excluded the jar slf4j-log4j12 by adding the below in my build.gradle
configurations.all {
exclude group:"org.slf4j", module: "slf4j-log4j12"
}
Sometimes you cannot exclude library because it is used by another libraries. So, you need to have two implementations. I had such problem so I in my model of Configuration which extends io.dropwizard.Configuration model I override method
#Override
public synchronized LoggingFactory getLoggingFactory() {
return new ExternalLoggingFactory();
}