LinkageError after upgrading dropwizard to 0.8.1

285 views Asked by At

I've upgraded dropwizard from 0.7.1 to 0.8.1 and keep getting this exception:

Error:Groovyc: A groovyc error occurred while trying to load one of the classes in project dependencies, please ensure it's present. See the message and the stack trace below for reference
java.lang.LinkageError: ClassCastException: attempting to castjar:file:/home/.gradle/caches/modules-2/files-2.1/javax.ws.rs/jsr311-api/1.1.1/59033da2a1afd56af1ac576750a8d0b1830d59e6/jsr311-api-1.1.1.jar!/javax/ws/rs/ext/RuntimeDelegate.classtojar:file:/home/.gradle/caches/modules-2/files-2.1/javax.ws.rs/jsr311-api/1.1.1/59033da2a1afd56af1ac576750a8d0b1830d59e6/jsr311-api-1.1.1.jar!/javax/ws/rs/ext/RuntimeDelegate.class
    at javax.ws.rs.ext.RuntimeDelegate.findDelegate(RuntimeDelegate.java:116)
    at javax.ws.rs.ext.RuntimeDelegate.getInstance(RuntimeDelegate.java:91)
    at javax.ws.rs.core.MediaType.<clinit>(MediaType.java:44)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:142)
    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.codehaus.groovy.classgen.AnnotationVisitor.transformInlineConstants(AnnotationVisitor.java:131)
    at org.codehaus.groovy.classgen.AnnotationVisitor.visit(AnnotationVisitor.java:76)
    at org.codehaus.groovy.classgen.ExtendedVerifier.visitAnnotation(ExtendedVerifier.java:246)
    at org.codehaus.groovy.classgen.ExtendedVerifier.visitAnnotations(ExtendedVerifier.java:137)
    at org.codehaus.groovy.classgen.ExtendedVerifier.visitClass(ExtendedVerifier.java:66)
    at org.codehaus.groovy.control.CompilationUnit$16.call(CompilationUnit.java:789)
    at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1052)
    at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:588)
    at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:566)
    at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:543)
    at org.jetbrains.groovy.compiler.rt.GroovyCompilerWrapper.compile(GroovyCompilerWrapper.java:54)
    at org.jetbrains.groovy.compiler.rt.DependentGroovycRunner.runGroovyc(DependentGroovycRunner.java:87)
    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:497)
    at org.jetbrains.groovy.compiler.rt.GroovycRunner.main(GroovycRunner.java:100)
    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:497)
    at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:130) 

I have two RuntimeDelegate instances in: jersey-core-1.18.3.jar & jsr311-api-1.1.1.jar.

Did anyone encouter this?

0

There are 0 answers