New issue

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

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

Already on GitHub? Sign in to your account

During testing ResourceTestRule throwing NoClassDefFoundError: ch/qos/logback/core/filter/Filter #2333

Closed
debraj-manna opened this Issue Apr 27, 2018 · 8 comments

Comments

Projects
None yet
3 participants
@debraj-manna

debraj-manna commented Apr 27, 2018

Crossposting from stackoverflow and forum

I am using dropwizard 1.2.4 with log4j 1.2.17. I have followed the instructions as mentioned below

https://github.com/arteam/dropwizard-nologback/

It is throwing the exception like below during unit testing.

java.lang.NoClassDefFoundError: ch/qos/logback/core/filter/Filter

	at io.dropwizard.testing.junit.ResourceTestRule.<clinit>(ResourceTestRule.java:34)
	at com.vnera.restapilayer.api.resources.ApiInfoControllerTest.<clinit>(ApiInfoControllerTest.java:25)
	at sun.misc.Unsafe.ensureClassInitialized(Native Method)
	at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
	at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:156)
	at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1088)
	at java.lang.reflect.Field.getFieldAccessor(Field.java:1069)
	at java.lang.reflect.Field.get(Field.java:393)
	at org.junit.runners.model.FrameworkField.get(FrameworkField.java:73)
	at org.junit.runners.model.TestClass.getAnnotatedFieldValues(TestClass.java:230)
	at org.junit.runners.ParentRunner.classRules(ParentRunner.java:255)
	at org.junit.runners.ParentRunner.withClassRules(ParentRunner.java:244)
	at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:194)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:362)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
Caused by: java.lang.ClassNotFoundException: ch.qos.logback.core.filter.Filter
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 19 more

My test code looks like below

import io.dropwizard.testing.junit.ResourceTestRule;
import org.junit.Assert;
import org.junit.ClassRule;
import org.junit.Test;
import org.junit.experimental.categories.Category;

import javax.ws.rs.core.Response;

import static org.mockito.Mockito.mock;

@Category(value = UnitTest.class)
public class ApiInfoControllerTest {
    private static ApiNonFunctionalHandler nonFunctionalHandler = mock(ApiNonFunctionalHandler.class);
    private static ApiFilter apiFilter = new ApiFilter(nonFunctionalHandler);
    private static final String authToken = "NetworkInsight xTyAGJmZ8nU8yJDP7LnA8Q==";

    @ClassRule
    public static final ResourceTestRule resources = ResourceTestRule.builder()
            .addResource(new ApiInfoController())
            .addProvider(apiFilter).build();

    @Test
    public void testApiVersion() throws Exception {
        Response response = resources.client()
                .target(ApiConstants.INFO_BASE_URL + "/version")
                .request()
                .header("Authorization", authToken)
                .buildGet().invoke();
        
        Assert.assertNotNull(response);
        Assert.assertEquals(response.toString(), Response.Status.OK.getStatusCode(), response.getStatus());
        final VersionResponse actualError = response.readEntity(VersionResponse.class);
        Assert.assertEquals(actualError.getApiVersion(), ApiConstants.API_VERSION);
    }
}

My main application is working fine. The configuration.yaml for main application looks like below

# Change default server ports
server:
  applicationConnectors:
  - type: http
    port: 8123
  adminConnectors:
  - type: http
    port: 8124
  requestLog:
    type: external
logging:
  type: external

Output of mvn dependency:tree

------------------------------------------------------------------------
Building restapilayer 0.001-SNAPSHOT
------------------------------------------------------------------------

--- maven-dependency-plugin:2.10:tree (default-cli) @ restapilayer ---
com.ven:restapilayer:jar:0.001-SNAPSHOT
+- io.dropwizard:dropwizard-jackson:jar:1.2.4:compile
|  +- io.dropwizard:dropwizard-util:jar:1.2.4:compile
|  +- com.fasterxml.jackson.core:jackson-core:jar:2.9.4:compile
|  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.9.0:compile
|  +- com.fasterxml.jackson.core:jackson-databind:jar:2.9.4:compile
|  +- com.fasterxml.jackson.datatype:jackson-datatype-guava:jar:2.9.4:compile
|  +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.9.4:compile
|  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.9.4:compile
|  +- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.9.4:compile
|  +- com.fasterxml.jackson.module:jackson-module-afterburner:jar:2.9.4:compile
|  \- com.fasterxml.jackson.datatype:jackson-datatype-joda:jar:2.9.4:compile
+- io.dropwizard.modules:dropwizard-elasticsearch:jar:1.2.0-1:compile
|  \- org.elasticsearch:elasticsearch:jar:2.4.6:compile
|     +- org.apache.lucene:lucene-core:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-backward-codecs:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-analyzers-common:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-queries:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-memory:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-highlighter:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-queryparser:jar:5.5.4:compile
|     |  \- org.apache.lucene:lucene-sandbox:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-suggest:jar:5.5.4:compile
|     |  \- org.apache.lucene:lucene-misc:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-join:jar:5.5.4:compile
|     |  \- org.apache.lucene:lucene-grouping:jar:5.5.4:compile
|     +- org.apache.lucene:lucene-spatial:jar:5.5.4:compile
|     |  +- org.apache.lucene:lucene-spatial3d:jar:5.5.4:compile
|     |  \- com.spatial4j:spatial4j:jar:0.5:compile
|     +- org.elasticsearch:securesm:jar:1.0:compile
|     +- com.carrotsearch:hppc:jar:0.7.1:compile
|     +- com.fasterxml.jackson.dataformat:jackson-dataformat-smile:jar:2.8.1:compile
|     +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.8.1:compile
|     +- io.netty:netty:jar:3.10.6.Final:compile
|     +- com.ning:compress-lzf:jar:1.0.2:compile
|     +- com.tdunning:t-digest:jar:3.0:compile
|     +- org.hdrhistogram:HdrHistogram:jar:2.1.6:compile
|     \- com.twitter:jsr166e:jar:1.1.0:compile
+- io.dropwizard:dropwizard-validation:jar:1.2.4:compile
|  +- org.hibernate:hibernate-validator:jar:5.4.2.Final:compile
|  |  +- org.jboss.logging:jboss-logging:jar:3.3.0.Final:compile
|  |  \- com.fasterxml:classmate:jar:1.3.1:compile
|  \- org.glassfish:javax.el:jar:3.0.0:compile
+- io.dropwizard:dropwizard-core:jar:1.2.4:compile
|  +- io.dropwizard:dropwizard-configuration:jar:1.2.4:compile
|  +- io.dropwizard:dropwizard-logging:jar:1.2.4:compile
|  |  +- io.dropwizard.metrics:metrics-logback:jar:3.2.5:compile
|  |  +- org.slf4j:jul-to-slf4j:jar:1.7.25:compile
|  |  +- org.slf4j:jcl-over-slf4j:jar:1.7.25:compile
|  |  \- org.eclipse.jetty:jetty-util:jar:9.4.8.v20171121:compile
|  +- io.dropwizard:dropwizard-metrics:jar:1.2.4:compile
|  +- io.dropwizard:dropwizard-jersey:jar:1.2.4:compile
|  |  +- org.glassfish.jersey.core:jersey-server:jar:2.25.1:compile
|  |  |  \- org.glassfish.jersey.media:jersey-media-jaxb:jar:2.25.1:compile
|  |  +- org.glassfish.jersey.ext:jersey-metainf-services:jar:2.25.1:compile
|  |  +- org.glassfish.jersey.ext:jersey-bean-validation:jar:2.25.1:compile
|  |  +- io.dropwizard.metrics:metrics-jersey2:jar:3.2.5:compile
|  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.9.4:compile
|  |  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:jar:2.9.4:compile
|  |  |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.9.4:compile
|  |  +- org.glassfish.jersey.containers:jersey-container-servlet:jar:2.25.1:compile
|  |  |  \- org.glassfish.jersey.containers:jersey-container-servlet-core:jar:2.25.1:compile
|  |  +- org.eclipse.jetty:jetty-server:jar:9.4.8.v20171121:compile
|  |  |  +- javax.servlet:javax.servlet-api:jar:3.1.0:compile
|  |  |  \- org.eclipse.jetty:jetty-io:jar:9.4.8.v20171121:compile
|  |  +- org.eclipse.jetty:jetty-webapp:jar:9.4.8.v20171121:compile
|  |  |  \- org.eclipse.jetty:jetty-xml:jar:9.4.8.v20171121:compile
|  |  \- org.eclipse.jetty:jetty-continuation:jar:9.4.8.v20171121:compile
|  +- io.dropwizard:dropwizard-servlets:jar:1.2.4:compile
|  |  \- io.dropwizard.metrics:metrics-annotation:jar:3.2.5:compile
|  +- io.dropwizard:dropwizard-jetty:jar:1.2.4:compile
|  |  +- io.dropwizard.metrics:metrics-jetty9:jar:3.2.5:compile
|  |  +- org.eclipse.jetty:jetty-servlet:jar:9.4.8.v20171121:compile
|  |  |  \- org.eclipse.jetty:jetty-security:jar:9.4.8.v20171121:compile
|  |  +- org.eclipse.jetty:jetty-servlets:jar:9.4.8.v20171121:compile
|  |  \- org.eclipse.jetty:jetty-http:jar:9.4.8.v20171121:compile
|  +- io.dropwizard:dropwizard-lifecycle:jar:1.2.4:compile
|  +- io.dropwizard.metrics:metrics-core:jar:3.2.5:compile
|  +- io.dropwizard.metrics:metrics-jvm:jar:3.2.5:compile
|  +- io.dropwizard.metrics:metrics-servlets:jar:3.2.5:compile
|  |  +- io.dropwizard.metrics:metrics-json:jar:3.2.5:compile
|  |  \- com.papertrail:profiler:jar:1.0.2:compile
|  +- io.dropwizard.metrics:metrics-healthchecks:jar:3.2.5:compile
|  +- io.dropwizard:dropwizard-request-logging:jar:1.2.4:compile
|  +- net.sourceforge.argparse4j:argparse4j:jar:0.7.0:compile
|  \- org.eclipse.jetty.toolchain.setuid:jetty-setuid-java:jar:1.0.3:compile
+- commons-fileupload:commons-fileupload:jar:1.3.3:compile
|  \- commons-io:commons-io:jar:2.2:compile
+- io.dropwizard:dropwizard-testing:jar:1.2.4:test
|  +- org.objenesis:objenesis:jar:2.6:compile
|  \- org.glassfish.jersey.test-framework.providers:jersey-test-framework-provider-inmemory:jar:2.25.1:test
|     \- org.glassfish.jersey.test-framework:jersey-test-framework-core:jar:2.25.1:test
+- org.apache.shiro:shiro-core:jar:1.3.0:compile
|  \- commons-beanutils:commons-beanutils:jar:1.8.3:compile
+- io.swagger:swagger-core:jar:1.5.0:compile
|  +- com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:jar:2.4.2:compile
|  +- io.swagger:swagger-models:jar:1.5.0:compile
|  \- javax.validation:validation-api:jar:1.1.0.Final:compile
+- io.swagger:swagger-annotations:jar:1.5.0:compile
+- org.apache.shiro:shiro-web:jar:1.2.3:compile
+- org.apache.commons:commons-lang3:jar:3.4:compile
+- com.ven:contracts:jar:0.001-SNAPSHOT:compile
|  +- com.ven:common:jar:0.001-SNAPSHOT:compile
|  |  +- com.koloboke:koloboke-api-jdk8:jar:1.0.0:compile
|  |  +- com.koloboke:koloboke-impl-jdk8:jar:1.0.0:runtime
|  |  |  \- com.koloboke:koloboke-impl-common-jdk8:jar:1.0.0:runtime
|  |  +- it.unimi.dsi:fastutil:jar:8.1.0:compile
|  |  +- com.amazonaws:aws-java-sdk:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-pinpoint:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-xray:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-opsworkscm:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-support:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-simpledb:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-servicecatalog:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-servermigration:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-simpleworkflow:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-storagegateway:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-route53:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-s3:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-importexport:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-sts:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-sqs:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-rds:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-redshift:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-elasticbeanstalk:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-glacier:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-iam:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-datapipeline:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-elasticloadbalancing:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-elasticloadbalancingv2:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-emr:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-elasticache:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-elastictranscoder:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-ec2:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-dynamodb:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-sns:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-budgets:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudtrail:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudwatch:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-logs:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-events:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cognitoidentity:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cognitosync:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-directconnect:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudformation:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudfront:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-kinesis:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-opsworks:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-autoscaling:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudsearch:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudwatchmetrics:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-codedeploy:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-codepipeline:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-kms:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-config:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-lambda:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-ecs:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-ecr:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cloudhsm:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-ssm:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-workspaces:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-machinelearning:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-directory:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-efs:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-codecommit:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-devicefarm:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-elasticsearch:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-waf:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-marketplacecommerceanalytics:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-inspector:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-iot:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-api-gateway:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-acm:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-gamelift:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-dms:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-marketplacemeteringservice:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-cognitoidp:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-discovery:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-applicationautoscaling:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-snowball:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-rekognition:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-polly:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-lightsail:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-stepfunctions:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-health:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-codebuild:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-appstream:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-shield:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-batch:jar:1.11.77:compile
|  |  |  +- com.amazonaws:aws-java-sdk-models:jar:1.11.77:compile
|  |  |  \- com.amazonaws:aws-java-sdk-swf-libraries:jar:1.11.22:compile
|  |  +- com.ven:utility:jar:0.001-SNAPSHOT:compile
|  |  +- com.esotericsoftware:kryo-shaded:jar:3.0.0:compile
|  |  |  \- com.esotericsoftware:minlog:jar:1.3.0:compile
|  |  +- com.codahale.metrics:metrics-graphite:jar:3.0.1:compile
|  |  +- com.librato.metrics:metrics-librato:jar:4.1.2.4:compile
|  |  |  \- com.librato.metrics:librato-java:jar:1.0.13:compile
|  |  +- org.mockito:mockito-all:jar:1.10.19:compile
|  |  +- org.powermock:powermock-module-junit4:jar:1.6.4:compile
|  |  |  \- org.powermock:powermock-module-junit4-common:jar:1.6.4:compile
|  |  |     +- org.powermock:powermock-core:jar:1.6.4:compile
|  |  |     \- org.powermock:powermock-reflect:jar:1.6.4:compile
|  |  +- org.powermock:powermock-api-mockito:jar:1.6.4:compile
|  |  |  +- org.mockito:mockito-core:jar:1.10.19:compile
|  |  |  \- org.powermock:powermock-api-support:jar:1.6.4:compile
|  |  +- com.vmw.vli:licensecheck:jar:1.4-RELEASE:compile
|  |  +- org.bouncycastle:bcprov-jdk15on:jar:1.57:compile
|  |  +- org.bouncycastle:bcpkix-jdk15on:jar:1.57:compile
|  |  +- io.netty:netty-all:jar:4.1.17.Final:compile
|  |  +- org.apache.hadoop:hadoop-common:jar:2.6.0-cdh5.7.1:compile
|  |  |  +- xmlenc:xmlenc:jar:0.52:compile
|  |  |  +- commons-httpclient:commons-httpclient:jar:3.1:compile
|  |  |  +- javax.servlet:servlet-api:jar:2.5:compile
|  |  |  +- tomcat:jasper-compiler:jar:5.5.23:compile
|  |  |  +- tomcat:jasper-runtime:jar:5.5.23:compile
|  |  |  +- javax.servlet.jsp:jsp-api:jar:2.1:compile
|  |  |  +- commons-el:commons-el:jar:1.0:compile
|  |  |  +- net.java.dev.jets3t:jets3t:jar:0.9.0:compile
|  |  |  |  \- com.jamesmurty.utils:java-xmlbuilder:jar:0.4:compile
|  |  |  +- org.apache.avro:avro:jar:1.7.6-cdh5.7.1:compile
|  |  |  +- org.apache.curator:curator-client:jar:2.7.1:compile
|  |  |  +- org.apache.curator:curator-recipes:jar:2.7.1:compile
|  |  |  +- org.apache.htrace:htrace-core4:jar:4.0.1-incubating:compile
|  |  |  \- org.apache.commons:commons-compress:jar:1.4.1:compile
|  |  |     \- org.tukaani:xz:jar:1.0:compile
|  |  +- org.apache.hadoop:hadoop-client:jar:2.6.0-cdh5.7.1:compile
|  |  |  +- org.apache.hadoop:hadoop-hdfs:jar:2.6.0-cdh5.7.1:compile
|  |  |  |  +- xerces:xercesImpl:jar:2.9.1:compile
|  |  |  |  \- org.fusesource.leveldbjni:leveldbjni-all:jar:1.8:compile
|  |  |  +- org.apache.hadoop:hadoop-mapreduce-client-app:jar:2.6.0-cdh5.7.1:compile
|  |  |  |  +- org.apache.hadoop:hadoop-mapreduce-client-common:jar:2.6.0-cdh5.7.1:compile
|  |  |  |  |  +- org.apache.hadoop:hadoop-yarn-client:jar:2.6.0-cdh5.7.1:compile
|  |  |  |  |  \- org.apache.hadoop:hadoop-yarn-server-common:jar:2.6.0-cdh5.7.1:compile
|  |  |  |  \- org.apache.hadoop:hadoop-mapreduce-client-shuffle:jar:2.6.0-cdh5.7.1:compile
|  |  |  +- org.apache.hadoop:hadoop-yarn-api:jar:2.6.0-cdh5.7.1:compile
|  |  |  +- org.apache.hadoop:hadoop-mapreduce-client-core:jar:2.6.0-cdh5.7.1:compile
|  |  |  |  \- org.apache.hadoop:hadoop-yarn-common:jar:2.6.0-cdh5.7.1:compile
|  |  |  |     +- javax.xml.bind:jaxb-api:jar:2.2.2:compile
|  |  |  |     |  \- javax.xml.stream:stax-api:jar:1.0-2:compile
|  |  |  |     +- org.codehaus.jackson:jackson-jaxrs:jar:1.8.8:compile
|  |  |  |     \- org.codehaus.jackson:jackson-xc:jar:1.8.8:compile
|  |  |  +- org.apache.hadoop:hadoop-mapreduce-client-jobclient:jar:2.6.0-cdh5.7.1:compile
|  |  |  \- org.apache.hadoop:hadoop-aws:jar:2.6.0-cdh5.7.1:compile
|  |  +- org.coursera:metrics-datadog:jar:1.1.13:compile
|  |  |  +- org.apache.httpcomponents:fluent-hc:jar:4.3.6:compile
|  |  |  \- com.datadoghq:java-dogstatsd-client:jar:2.3:compile
|  |  \- com.ven:reg-common:jar:0.001-SNAPSHOT:compile
|  +- com.ven:base-model:jar:0.001-SNAPSHOT:compile
|  +- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
|  +- log4j:log4j:jar:1.2.17:compile
|  +- com.ven:core-model:jar:0.001-SNAPSHOT:compile
|  |  +- com.ven:analytics-model:jar:0.001-SNAPSHOT:compile
|  |  +- org.reflections:reflections:jar:0.9.9-RC1:compile
|  |  |  \- dom4j:dom4j:jar:1.6.1:compile
|  |  |     \- xml-apis:xml-apis:jar:1.0.b2:compile
|  |  \- commons-validator:commons-validator:jar:1.6:compile
|  +- com.ven:vshield-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:nsx-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:cisco-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:vcenter-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:force10-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:flow-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:openstack-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:juniper-model:jar:0.001-SNAPSHOT:compile
|  \- com.ven:pan-model:jar:0.001-SNAPSHOT:compile
+- com.ven:rpc-saasinterface:jar:0.001-SNAPSHOT:compile
+- com.ven:storage-common:jar:0.001-SNAPSHOT:compile
|  +- com.ven:data-model:jar:0.001-SNAPSHOT:compile
|  +- net.spy:spymemcached:jar:2.11.4:compile
|  +- org.xerial.snappy:snappy-java:jar:1.1.2.6:compile
|  +- com.opencsv:opencsv:jar:3.7:compile
|  \- org.codehaus.groovy:groovy-all:jar:2.4.4:compile
+- com.ven:arkin-storage-metrics:jar:0.001-SNAPSHOT:compile
|  +- org.apache.hbase:hbase-client:jar:1.2.0-cdh5.7.0:compile
|  |  +- org.apache.hbase:hbase-annotations:jar:1.2.0-cdh5.7.0:compile
|  |  +- org.apache.hbase:hbase-common:jar:1.2.0-cdh5.7.0:compile
|  |  |  \- org.apache.hadoop:hadoop-core:jar:2.6.0-mr1-cdh5.7.0:compile
|  |  |     +- hsqldb:hsqldb:jar:1.8.0.10:compile
|  |  |     \- org.eclipse.jdt:core:jar:3.1.1:compile
|  |  +- org.apache.hbase:hbase-protocol:jar:1.2.0-cdh5.7.0:compile
|  |  +- org.apache.zookeeper:zookeeper:jar:3.4.5-cdh5.7.0:compile
|  |  +- org.apache.htrace:htrace-core:jar:3.2.0-incubating:compile
|  |  +- org.jruby.jcodings:jcodings:jar:1.0.8:compile
|  |  +- org.jruby.joni:joni:jar:2.1.2:compile
|  |  +- com.yammer.metrics:metrics-core:jar:2.2.0:compile
|  |  +- org.apache.hadoop:hadoop-annotations:jar:2.6.0-cdh5.7.0:compile
|  |  +- org.apache.hadoop:hadoop-auth:jar:2.6.0-cdh5.7.0:compile
|  |  |  +- org.apache.directory.server:apacheds-kerberos-codec:jar:2.0.0-M15:compile
|  |  |  |  +- org.apache.directory.server:apacheds-i18n:jar:2.0.0-M15:compile
|  |  |  |  +- org.apache.directory.api:api-asn1-api:jar:1.0.0-M20:compile
|  |  |  |  \- org.apache.directory.api:api-util:jar:1.0.0-M20:compile
|  |  |  \- org.apache.curator:curator-framework:jar:2.7.1:compile
|  |  \- com.github.stephenc.findbugs:findbugs-annotations:jar:1.3.9-1:compile
|  +- com.jcraft:jsch:jar:0.1.54:compile
|  \- com.ven:tsdb-client:jar:0.001-SNAPSHOT:compile
|     +- com.ven:tsdb-common:jar:0.001-SNAPSHOT:compile
|     |  +- io.grpc:grpc-protobuf:jar:1.11.0:compile
|     |  |  +- com.google.protobuf:protobuf-java-util:jar:3.5.1:compile
|     |  |  +- com.google.api.grpc:proto-google-common-protos:jar:1.0.0:compile
|     |  |  \- io.grpc:grpc-protobuf-lite:jar:1.11.0:compile
|     |  \- io.grpc:grpc-stub:jar:1.11.0:compile
|     \- io.grpc:grpc-netty:jar:1.11.0:compile
|        +- io.grpc:grpc-core:jar:1.11.0:compile (version selected from constraint [1.11.0,1.11.0])
|        |  +- io.grpc:grpc-context:jar:1.11.0:compile
|        |  +- io.opencensus:opencensus-api:jar:0.11.0:compile
|        |  \- io.opencensus:opencensus-contrib-grpc-metrics:jar:0.11.0:compile
|        +- io.netty:netty-codec-http2:jar:4.1.22.Final:compile (version selected from constraint [4.1.22.Final,4.1.22.Final])
|        |  +- io.netty:netty-codec-http:jar:4.1.22.Final:compile
|        |  |  \- io.netty:netty-codec:jar:4.1.22.Final:compile
|        |  \- io.netty:netty-handler:jar:4.1.22.Final:compile
|        |     \- io.netty:netty-buffer:jar:4.1.22.Final:compile
|        |        \- io.netty:netty-common:jar:4.1.22.Final:compile
|        \- io.netty:netty-handler-proxy:jar:4.1.22.Final:compile
|           +- io.netty:netty-transport:jar:4.1.22.Final:compile
|           |  \- io.netty:netty-resolver:jar:4.1.22.Final:compile
|           \- io.netty:netty-codec-socks:jar:4.1.22.Final:compile
+- org.apache.httpcomponents:httpcore:jar:4.4.5:compile
+- com.ven:storage-config:jar:0.001-SNAPSHOT:compile
|  +- org.postgresql:postgresql:jar:9.4.1208.jre7:compile
|  +- commons-dbcp:commons-dbcp:jar:1.4:compile
|  |  \- commons-pool:commons-pool:jar:1.5.4:compile
|  +- com.ven:dedup:jar:0.001-SNAPSHOT:compile
|  +- org.elasticsearch.module:lang-groovy:jar:2.3.1:compile
|  |  \- org.codehaus.groovy:groovy:jar:indy:2.4.6:compile
|  \- net.jodah:expiringmap:jar:0.5.8:compile
+- com.ven:programs:jar:0.001-SNAPSHOT:compile
|  +- com.googlecode.javaewah:JavaEWAH:jar:1.1.3:compile
|  +- com.ven:model-utils:jar:0.001-SNAPSHOT:compile
|  +- com.ven:event-manager:jar:0.001-SNAPSHOT:compile
|  +- com.ven:storage-flowstore:jar:0.001-SNAPSHOT:compile
|  +- com.ven:aws-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:nsxt-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:firewall-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:genericdevice-model:jar:0.001-SNAPSHOT:compile
|  +- org.apache.commons:commons-math3:jar:3.6.1:compile
|  +- com.ven:mapper:jar:0.001-SNAPSHOT:compile
|  +- ma.glasnost.orika:orika-core:jar:1.4.2:compile
|  |  +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
|  |  \- com.googlecode.concurrentlinkedhashmap:concurrentlinkedhashmap-lru:jar:1.2_jdk5:compile
|  +- org.javassist:javassist:jar:3.20.0-GA:compile
|  +- com.ven:denorm-model:jar:0.001-SNAPSHOT:compile
|  +- com.ven:hp-model:jar:0.001-SNAPSHOT:compile
|  +- com.vmw.vapi:vapi-runtime:jar:2.7.0:compile
|  +- com.vmw.nsx.sdk:nsx-language-bindings:jar:2.0.0:compile
|  \- org.springframework:spring-web:jar:4.2.9.RELEASE:compile
|     \- org.springframework:spring-aop:jar:4.2.9.RELEASE:compile
|        \- aopalliance:aopalliance:jar:1.0:compile
+- com.ven:denorm-programs:jar:0.001-SNAPSHOT:test
|  \- com.ven:impact:jar:0.001-SNAPSHOT:test
+- com.ven:app:jar:0.001-SNAPSHOT:compile
|  \- com.ven:meta-model:jar:0.001-SNAPSHOT:compile
+- com.ven:resourcemanager:jar:0.001-SNAPSHOT:compile
+- com.ven:ui-model:jar:0.001-SNAPSHOT:compile
|  +- commons-collections:commons-collections:jar:3.2.2:compile
|  \- org.unitils:unitils-core:jar:3.3:compile
|     \- ognl:ognl:jar:2.6.9:compile
+- com.ven:analytics-contract:jar:0.001-SNAPSHOT:compile
+- com.ven:analytics-transformers:jar:0.001-SNAPSHOT:compile
+- com.ven:query:jar:0.001-SNAPSHOT:compile
|  +- org.antlr:antlr4-maven-plugin:jar:4.5.3:compile
|  |  +- org.apache.maven:maven-plugin-api:jar:3.0.5:compile
|  |  |  +- org.apache.maven:maven-model:jar:3.0.5:compile
|  |  |  +- org.apache.maven:maven-artifact:jar:3.0.5:compile
|  |  |  \- org.sonatype.sisu:sisu-inject-plexus:jar:2.3.0:compile
|  |  |     +- org.codehaus.plexus:plexus-component-annotations:jar:1.5.5:compile
|  |  |     +- org.codehaus.plexus:plexus-classworlds:jar:2.4:compile
|  |  |     \- org.sonatype.sisu:sisu-inject-bean:jar:2.3.0:compile
|  |  |        \- org.sonatype.sisu:sisu-guice:jar:no_aop:3.1.0:compile
|  |  +- org.apache.maven:maven-project:jar:2.2.1:compile
|  |  |  +- org.apache.maven:maven-settings:jar:2.2.1:compile
|  |  |  +- org.apache.maven:maven-profile:jar:2.2.1:compile
|  |  |  +- org.apache.maven:maven-artifact-manager:jar:2.2.1:compile
|  |  |  |  +- org.apache.maven:maven-repository-metadata:jar:2.2.1:compile
|  |  |  |  +- org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6:compile
|  |  |  |  \- backport-util-concurrent:backport-util-concurrent:jar:3.1:compile
|  |  |  +- org.apache.maven:maven-plugin-registry:jar:2.2.1:compile
|  |  |  +- org.codehaus.plexus:plexus-interpolation:jar:1.11:compile
|  |  |  +- org.codehaus.plexus:plexus-utils:jar:1.5.15:compile
|  |  |  \- org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:compile
|  |  |     \- classworlds:classworlds:jar:1.1-alpha-2:compile
|  |  +- org.codehaus.plexus:plexus-compiler-api:jar:2.2:compile
|  |  \- org.sonatype.plexus:plexus-build-api:jar:0.0.7:compile
|  +- org.antlr:antlr4:jar:4.5.3:compile
|  \- org.ardverk:patricia-trie:jar:0.7-SNAPSHOT:compile
+- com.ven.grid:sdmgraph:jar:0.001-SNAPSHOT:compile
|  +- commons-configuration:commons-configuration:jar:1.6:compile
|  |  +- commons-digester:commons-digester:jar:1.8:compile
|  |  \- commons-beanutils:commons-beanutils-core:jar:1.8.0:compile
|  +- commons-cli:commons-cli:jar:1.3.1:compile
|  +- org.yaml:snakeyaml:jar:1.13:compile
|  +- commons-logging:commons-logging:jar:1.2:compile
|  \- commons-logging:commons-logging-api:jar:1.1:compile
+- com.ven:programs:jar:tests:0.001-SNAPSHOT:test
+- com.ven:snmp:jar:0.001-SNAPSHOT:compile
|  +- org.snmp4j:snmp4j:jar:2.4.3:compile
|  \- org.snmp4j:snmp4j-agent:jar:2.4.2:compile
+- com.ven:components:jar:0.001-SNAPSHOT:compile
|  +- javax.mail:javax.mail-api:jar:1.5.6:compile
|  \- com.sun.mail:javax.mail:jar:1.5.6:compile
|     \- javax.activation:activation:jar:1.1:compile
+- com.amazonaws:aws-java-sdk-ses:jar:1.11.77:compile
|  +- com.amazonaws:aws-java-sdk-core:jar:1.11.77:compile
|  |  \- software.amazon.ion:ion-java:jar:1.0.1:compile
|  \- com.amazonaws:jmespath-java:jar:1.11.77:compile
+- com.ven:metrics-eval:jar:0.001-SNAPSHOT:compile
|  \- com.ven:tsdb-server:jar:0.001-SNAPSHOT:compile
+- org.freemarker:freemarker:jar:2.3.20:compile
+- com.ven:remote-control:jar:0.001-SNAPSHOT:compile
|  \- com.ven:version-control:jar:0.001-SNAPSHOT:compile
+- com.codahale.metrics:metrics-core:jar:3.0.1:compile
+- com.codahale.metrics:metrics-healthchecks:jar:3.0.1:compile
+- com.icegreen:greenmail:jar:1.5.5:test
+- com.ven:support-request:jar:0.001-SNAPSHOT:compile
|  \- com.ven:storage-utils:jar:0.001-SNAPSHOT:compile
|     \- com.github.fge:json-patch:jar:1.9:compile
|        \- com.github.fge:jackson-coreutils:jar:1.6:compile
|           \- com.github.fge:msg-simple:jar:1.1:compile
|              \- com.github.fge:btf:jar:1.2:compile
+- com.ven:dns-request:jar:0.001-SNAPSHOT:compile
+- com.ven:service-health:jar:0.001-SNAPSHOT:compile
+- org.apache.httpcomponents:httpclient:jar:4.5.2:compile
+- joda-time:joda-time:jar:2.9.4:compile
+- commons-codec:commons-codec:jar:1.10:compile
+- org.slf4j:slf4j-api:jar:1.7.5:compile
+- org.jsoup:jsoup:jar:1.10.1:compile
+- com.ven:syslog:jar:0.001-SNAPSHOT:compile
+- com.ven.external-clients:csp:jar:0.001-SNAPSHOT:compile
|  +- org.springframework:spring-beans:jar:4.3.9.RELEASE:compile
|  +- org.springframework:spring-context:jar:4.3.9.RELEASE:compile
|  |  \- org.springframework:spring-expression:jar:4.3.9.RELEASE:compile
|  \- com.auth0:java-jwt:jar:3.2.0:compile
+- com.ven.external-clients:discovery:jar:0.001-SNAPSHOT:compile
+- dnsjava:dnsjava:jar:2.1.7:compile
+- com.univocity:univocity-parsers:jar:2.5.9:compile
+- org.springframework:spring-test:jar:4.3.9.RELEASE:test
|  \- org.springframework:spring-core:jar:4.3.9.RELEASE:compile
+- io.dropwizard:dropwizard-forms:jar:1.2.4:compile
|  \- org.glassfish.jersey.media:jersey-media-multipart:jar:2.25.1:compile
|     \- org.jvnet.mimepull:mimepull:jar:1.9.6:compile
+- org.codehaus.jettison:jettison:jar:1.3.8:compile
|  \- stax:stax-api:jar:1.0.1:compile
+- com.jayway.jsonpath:json-path:jar:0.9.1:compile
|  \- net.minidev:json-smart:jar:1.2:compile
+- com.google.guava:guava:jar:23.5-jre:compile
|  +- org.checkerframework:checker-qual:jar:2.0.0:compile
|  +- com.google.errorprone:error_prone_annotations:jar:2.0.18:compile
|  +- com.google.j2objc:j2objc-annotations:jar:1.1:compile
|  \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:compile
+- com.google.code.findbugs:jsr305:jar:2.0.3:provided
+- org.glassfish.jersey.core:jersey-client:jar:2.23.2:compile
|  +- javax.ws.rs:javax.ws.rs-api:jar:2.0.1:compile
|  +- org.glassfish.jersey.core:jersey-common:jar:2.23.2:compile
|  |  +- javax.annotation:javax.annotation-api:jar:1.2:compile
|  |  +- org.glassfish.jersey.bundles.repackaged:jersey-guava:jar:2.23.2:compile
|  |  \- org.glassfish.hk2:osgi-resource-locator:jar:1.0.1:compile
|  +- org.glassfish.hk2:hk2-api:jar:2.5.0-b05:compile
|  |  +- org.glassfish.hk2:hk2-utils:jar:2.5.0-b05:compile
|  |  \- org.glassfish.hk2.external:aopalliance-repackaged:jar:2.5.0-b05:compile
|  +- org.glassfish.hk2.external:javax.inject:jar:2.5.0-b05:compile
|  \- org.glassfish.hk2:hk2-locator:jar:2.5.0-b05:compile
+- commons-net:commons-net:jar:3.1:compile
+- commons-lang:commons-lang:jar:2.6:compile
+- com.google.code.gson:gson:jar:2.2.4:compile
+- org.apache.commons:commons-jexl:jar:2.1.1:compile
+- com.google.inject:guice:jar:3.0:compile
+- com.google.protobuf:protobuf-java:jar:2.5.0:compile
+- com.googlecode.protobuf-java-format:protobuf-java-format:jar:1.2:compile
+- org.apache.thrift:libthrift:jar:0.9.1:compile
+- com.typesafe.akka:akka-actor_2.11:jar:2.5.8:compile
|  +- com.typesafe:config:jar:1.3.2:compile
|  \- org.scala-lang.modules:scala-java8-compat_2.11:jar:0.7.0:compile
+- org.quartz-scheduler:quartz:jar:2.2.1:compile
|  \- c3p0:c3p0:jar:0.9.1.1:compile
+- com.github.rholder:guava-retrying:jar:1.0.5:compile
+- org.scala-lang:scala-library:jar:2.11.8:compile
+- junit:junit:jar:4.12:test
|  \- org.hamcrest:hamcrest-core:jar:1.3:compile
\- org.assertj:assertj-core:jar:3.5.2:test

@debraj-manna debraj-manna changed the title from During testing dropwizard throwing NoClassDefFoundError: ch/qos/logback/core/filter/Filter to During testing ResourceTestRule throwing NoClassDefFoundError: ch/qos/logback/core/filter/Filter Apr 27, 2018

@debraj-manna

This comment has been minimized.

debraj-manna commented May 1, 2018

Anyone any thoughts on this one?

@arteam

This comment has been minimized.

Member

arteam commented May 1, 2018

The problem is that ResourceTestRule statically bootstraps logging. We should probably move it from the static block to a method and provide an ability not to bootstrap it.

@arteam arteam added the bug label May 1, 2018

arteam added a commit that referenced this issue May 1, 2018

Add possibility to disable logging bootstrap for ResourceTestRule
Currently, users who don't have Logback in the classpath can't use
`ResourceTestRule`, because it automatically tries to configure
logging with Logback. We should provide a configuration parameter
which allows users to disable it.

Fixes #2333

nickbabcock added a commit that referenced this issue May 2, 2018

Add possibility to disable logging bootstrap for ResourceTestRule (#2338
)

Currently, users who don't have Logback in the classpath can't use
`ResourceTestRule`, because it automatically tries to configure
logging with Logback. We should provide a configuration parameter
which allows users to disable it.

Fixes #2333
@debraj-manna

This comment has been minimized.

debraj-manna commented May 2, 2018

@arteam - This will be available in which release?

Is there any workaround for this now?

@arteam

This comment has been minimized.

Member

arteam commented May 2, 2018

I will port the fix to the 1.3 branch and it will be available as 1.3.2.

@debraj-manna

This comment has been minimized.

debraj-manna commented May 3, 2018

Thanks @arteam . Any idea when can we expect to have 1.3.2 released?

@arteam

This comment has been minimized.

Member

arteam commented May 3, 2018

If nothing outstanding pops up, I will do it by the end of this week.

@debraj-manna

This comment has been minimized.

debraj-manna commented May 6, 2018

@arteam - Will it be possible to port the same fix to 1.2.6 ?

arteam added a commit that referenced this issue May 6, 2018

Add possibility to disable logging bootstrap for ResourceTestRule
Currently, users who don't have Logback in the classpath can't use
`ResourceTestRule`, because it automatically tries to configure
logging with Logback. We should provide a configuration parameter
which allows users to disable it.

Fixes #2333

(cherry picked from commit 6b4fcd7)
@boogie4eva

This comment has been minimized.

boogie4eva commented Jul 12, 2018

This issue still persists for 1.3.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment