(old topic but same issue, sorry)
Hi,
I have the same error with a new plugin, for which I wanted to use guava
15.0. I understand you cannot embedded guava in core but maybe for the next
jenkins' plugins parent pom we should use a dependencyManagement/ for
both com.google.guava:guava and com.google.code.findbugs:jsr305.
If we do so, any IDE, developers could see that they are overriding the
version for those dependencies.
Details: using maven 3.1.1 with org.jenkins-ci.plugins:plugin:1.509.4. My
problem was that I couldn't test my plugin due to Guava API modification:
Results :
Tests in error:
org.jvnet.hudson.test.JellyTestSuiteBuilder$JellyTestSuite(org.jvnet.hudson.test.junit.FailedTest):
tried to access method
com.google.common.collect.MapMaker.makeComputingMap(Lcom/google/common/base/Function;)Ljava/util/concurrent/ConcurrentMap;
from class com.google.inject.internal.Annotations$AnnotationChecker
testCliSanity(org.jvnet.hudson.test.PluginAutomaticTestBuilder$CliSanityTest):
Could not initialize class org.eclipse.sisu.wire.ParameterKeys
And using version 11.0.1 of guava and 1.3.9 of jsr305 fixed it.
Thanks.
Le mercredi 24 juillet 2013 11:46:59 UTC+2, David Mata Gorriz a écrit :
You are right, as usual. Artifactory 2.1.6 depends on guava r08 and
jenkins depends on 1.0.1.
David Mata Górriz
Arquitectura Core Bancario
Carretera de Sierra Alhamilla S/N
Edificio Celulosa 2ª Planta Almería
950180360. Extensión: 12628
david...@tecnologia.cajamar.es javascript:
-Mensaje original-
De: jenkin...@googlegroups.com javascript: [mailto:
jenkin...@googlegroups.com javascript:] En nombre de Kohsuke Kawaguchi
Enviado el: martes, 23 de julio de 2013 3:13
Para: jenkin...@googlegroups.com javascript:
CC: David Mata Gorriz
Asunto: Re: NoClassDefFoundError: com/google/common/cache/CacheBuilder
My guess is that your plugin depends on Guava directly or indirectly,
overwriting the version that Jenkins core uses.
Check mvn dependency:tree output and the path that leads to the guava.
On 07/18/2013 03:24 AM, David Mata Gorriz wrote:
Hi, everyone.
We have a plugin in our company to do some specific tasks. In the last
weeks, we had to add guava as a dependency to avoid
java.lang.NoClassDefFoundError: com/google/common/cache/CacheBuilder
at hudson.model.Queue.init(Queue.java:188)
at jenkins.model.Jenkins.init(Jenkins.java:764)
at hudson.model.Hudson.init(Hudson.java:81)
at
org.jvnet.hudson.test.HudsonTestCase.newHudson(HudsonTestCase.java:469)
at
org.jvnet.hudson.test.HudsonTestCase.setUp(HudsonTestCase.java:312)
at junit.framework.TestCase.runBare(TestCase.java:139)
at
org.jvnet.hudson.test.HudsonTestCase.runBare(HudsonTestCase.java:290)
at junit.framework.TestResult$1.protect(TestResult.java:122)
Do you know why is that? I think we shouldn't be required to do it.
Maybe I made a mistake, or some of the plugins I use (artifactory,
sonar, svn).
Thanks
AVISO DE CONFIDENCIALIDAD
Este correo electrónico y cualquier fichero con el transmitido son
confidenciales, contienen información privilegiada y son de conocimiento
y uso exclusivo de la persona o entidad a quienes han sido dirigidos. Su
contenido no puede ser modificado. En caso de recibir este mensaje por
error, le rogamos que informe de inmediato al remitente y proceda a
destruir dicho mensaje y cualquier copia que hubiese realizado. Como el
correo electrónico puede verse afectado por fallos técnicos u
operacionales, no se garantiza su recepción de forma adecuada y puede
estar sujeta a retrasos. Cualquier
comunicación que esté supeditada a una fecha u hora pactadas
previamente, también deberá ser enviada por correo convencional o fax.
El correo electrónico no garantiza la confidencialidad del contenido de
los mensajes. Si el destinatario de este mensaje tiene cualquier
objeción a la utilización de este medio, deberá ponerse en contacto de
inmediato con el remitente. Está estrictamente prohibido el uso, copia o
distribución por cualquier medio no autorizado de este mensaje y de
cualquier fichero en el contenido.
CONFIDENTIALITY WARNING
This e-mail and any files transmitted with it are confidential and
privileged, and are intented solely for the use of the individual or
entity to whom they are addressed. Their contents may not be altered. If
you are not the intended recipient of this communication please notify
the sender and delete and destroy all copies immediately. As e-mail can
be subject to operational or technical difficulties, the quality of
reception may be affected and it is subject to time delays.