NoSuchMethodError: com.google.inject.Binder.bindListener in tests

990 views
Skip to first unread message

Marat Mavlyutov

unread,
Feb 5, 2015, 3:53:29 PM2/5/15
to jenkin...@googlegroups.com
Hi!

just got rid from my own ssh machinery in JClouds-Plugin and replaced it with shiny SSH-Slaves-Plugin plugin 
but right after that, I've faced with follogwing problem in tests:


what does 
java.lang.NoSuchMethodError: com.google.inject.Binder.bindListener(Lcom/google/inject/matcher/Matcher;[Lcom/google/inject/spi/ProvisionListener;)V
mean?

could anyone point me to the root cause of the problem?

Marat Mavlyutov

unread,
Feb 5, 2015, 4:32:35 PM2/5/15
to jenkin...@googlegroups.com
also, this is diff between dependency tree of project with ssh-slaves and without it: http://pastebin.com/dCQKqMuk

Vincent Latombe

unread,
Feb 6, 2015, 1:42:19 AM2/6/15
to Jenkins Dev
com.google.inject.Binder is part of Google Guice, so I'd say that you're pulling the wrong version of it from somewhere.. 

Vincent

--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/811004a7-e6bd-4a56-b37a-ab5582750a01%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

oliver gondža

unread,
Mar 6, 2015, 11:23:28 AM3/6/15
to Vincent Latombe, Jenkins Dev
On Fri, 06 Feb 2015 07:41:53 +0100, Vincent Latombe
<vincent...@gmail.com> wrote:

> com.google.inject.Binder is part of Google Guice, so I'd say that you're
> pulling the wrong version of it from somewhere..

From Jenkins core directly:
com.google.inject:guice:jar:no_aop:4.0-beta:provided. Bumping the guice on
plugin side does not help either as org.99soft.guice:rocoto depends on
guice and there is no support for version 4.

Marat, you suggest[1] it will be fixed in jclouds 1.9. Do you have some
reference?


```
java.lang.NoClassDefFoundError:
com/google/inject/internal/util/$Preconditions
at
org.nnsoft.guice.rocoto.configuration.ConfigurationModule.configure(ConfigurationModule.java:64)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:230)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at com.google.inject.spi.Elements.getElements(Elements.java:94)
at org.nnsoft.guice.rocoto.Rocoto.expandVariables(Rocoto.java:52)
at org.nnsoft.guice.rocoto.Rocoto.expandVariables(Rocoto.java:47)
at
org.jclouds.config.BindPropertiesToExpandedValues.configure(BindPropertiesToExpandedValues.java:45)
at com.google.inject.AbstractModule.configure(AbstractModule.java:62)
at
com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:230)
at com.google.inject.spi.Elements.getElements(Elements.java:103)
at
com.google.inject.internal.InjectorShell$Builder.build(InjectorShell.java:136)
at
com.google.inject.internal.InternalInjectorCreator.build(InternalInjectorCreator.java:104)
at com.google.inject.Guice.createInjector(Guice.java:96)
at com.google.inject.Guice.createInjector(Guice.java:84)
at org.jclouds.ContextBuilder.expandProperties(ContextBuilder.java:382)
at org.jclouds.ContextBuilder.buildInjector(ContextBuilder.java:317)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:608)
at org.jclouds.ContextBuilder.buildView(ContextBuilder.java:588)
at jenkins.plugins.jclouds.compute.JCloudsCloud.ctx(JCloudsCloud.java:158)
at jenkins.plugins.jclouds.compute.JCloudsCloud.ctx(JCloudsCloud.java:149)
at
jenkins.plugins.jclouds.compute.JCloudsSlaveTemplate$DescriptorImpl.doFillHardwareIdItems(JCloudsSlaveTemplate.java:564)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:298)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:161)
at
org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:96)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:121)
at
org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:745)
... 41 more
Caused by: java.lang.ClassNotFoundException:
com.google.inject.internal.util.$Preconditions
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
```

[1]
https://github.com/jenkinsci/jclouds-plugin/commit/c6ca88f46a877750e08333934c82ad2a50796007
--
oliver
Reply all
Reply to author
Forward
0 new messages