java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]

Atlassian JIRA | Daniel Leng | 2 years ago
  1. 0

    When enabling the Fisheye plugin, the following stack trace is thrown and it cannot be enabled: {noformat} 2014-08-21 14:27:47,248 ThreadPoolAsyncTaskExecutor::Thread 20 ERROR admin 1347x537x2 1omdoza 127.0.0.1 /rest/plugins/1.0/ [plugin.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin com.atlassian.jirafisheyeplugin org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'showPanelHelper' defined in URL [bundle://151.0:0/META-INF/spring/jira-fisheye-plugin-components.xml]: Cannot resolve reference to bean 'stashCommitService' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'stashCommitService' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.applinks.api.ApplicationLinkService]: : Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495) ... Caused by: java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(Unknown Source) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) ... 45 more Caused by: java.lang.NoClassDefFoundError: com/atlassian/jira/cluster/ClusterMessageConsumer at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1829) at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:634) at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1594) at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) ... 50 more Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.cluster.ClusterMessageConsumer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.apache.felix.framework.ExtensionManager$ExtensionManagerModule.getClassByDelegation(ExtensionManager.java:672) ... {noformat} {noformat} 2014-08-21 22:28:07,871 http-bio-8075-exec-7 ERROR admin 1348x720x1 1omdoza 127.0.0.1 /rest/plugins/1.0/com.atlassian.jirafisheyeplugin-key [atlassian.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'FishEye Config Web Fragment' of plugin 'com.atlassian.jirafisheyeplugin'. Disabling. java.lang.RuntimeException: Unable to enable web fragment at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:133) at com.atlassian.plugin.web.descriptors.DefaultWebItemModuleDescriptor.enabled(DefaultWebItemModuleDescriptor.java:72) at com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor.enabled(DefaultAbstractWebFragmentModuleDescriptor.java:34) ... Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: Could not load 'com.atlassian.jirafisheyeplugin.config.IsPriorToJiraVersion' in plugin com.atlassian.jirafisheyeplugin at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:95) at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:29) at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeCondition(AbstractConditionElementParser.java:116) ... Caused by: java.lang.IllegalStateException: Cannot create object because the plugin container is unavailable. at com.atlassian.plugin.osgi.factory.OsgiPlugin.autowire(OsgiPlugin.java:369) at com.atlassian.plugin.osgi.factory.OsgiPlugin.autowire(OsgiPlugin.java:359) at com.atlassian.jira.plugin.PluginInjector.newInstance(PluginInjector.java:30) at com.atlassian.jira.plugin.webfragment.JiraWebFragmentHelper.loadCondition(JiraWebFragmentHelper.java:46) ... 264 more {noformat} Seems to affect only the 6.3.6 version of the plugin.

    Atlassian JIRA | 2 years ago | Daniel Leng [Atlassian]
    java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]
  2. 0

    When enabling the Fisheye plugin, the following stack trace is thrown and it cannot be enabled: {noformat} 2014-08-21 14:27:47,248 ThreadPoolAsyncTaskExecutor::Thread 20 ERROR admin 1347x537x2 1omdoza 127.0.0.1 /rest/plugins/1.0/ [plugin.osgi.factory.OsgiPlugin] Unable to start the plugin container for plugin com.atlassian.jirafisheyeplugin org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'showPanelHelper' defined in URL [bundle://151.0:0/META-INF/spring/jira-fisheye-plugin-components.xml]: Cannot resolve reference to bean 'stashCommitService' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'stashCommitService' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.applinks.api.ApplicationLinkService]: : Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)] at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104) at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495) ... Caused by: java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)] at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:112) at org.springframework.osgi.util.BundleDelegatingClassLoader.loadClass(BundleDelegatingClassLoader.java:156) at java.lang.ClassLoader.loadClass(Unknown Source) at org.springframework.util.ClassUtils.forName(ClassUtils.java:211) at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385) ... 45 more Caused by: java.lang.NoClassDefFoundError: com/atlassian/jira/cluster/ClusterMessageConsumer at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at org.apache.felix.framework.ModuleImpl$ModuleClassLoader.findClass(ModuleImpl.java:1829) at org.apache.felix.framework.ModuleImpl.findClassOrResourceByDelegation(ModuleImpl.java:716) at org.apache.felix.framework.ModuleImpl.access$200(ModuleImpl.java:73) at java.lang.ClassLoader.loadClass(Unknown Source) at org.apache.felix.framework.ModuleImpl.getClassByDelegation(ModuleImpl.java:634) at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1594) at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:887) at org.springframework.osgi.util.BundleDelegatingClassLoader.findClass(BundleDelegatingClassLoader.java:99) ... 50 more Caused by: java.lang.ClassNotFoundException: com.atlassian.jira.cluster.ClusterMessageConsumer at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547) at org.apache.felix.framework.ExtensionManager$ExtensionManagerModule.getClassByDelegation(ExtensionManager.java:672) ... {noformat} {noformat} 2014-08-21 22:28:07,871 http-bio-8075-exec-7 ERROR admin 1348x720x1 1omdoza 127.0.0.1 /rest/plugins/1.0/com.atlassian.jirafisheyeplugin-key [atlassian.plugin.manager.DefaultPluginManager] There was an error loading the descriptor 'FishEye Config Web Fragment' of plugin 'com.atlassian.jirafisheyeplugin'. Disabling. java.lang.RuntimeException: Unable to enable web fragment at com.atlassian.plugin.web.descriptors.AbstractWebFragmentModuleDescriptor.enabled(AbstractWebFragmentModuleDescriptor.java:133) at com.atlassian.plugin.web.descriptors.DefaultWebItemModuleDescriptor.enabled(DefaultWebItemModuleDescriptor.java:72) at com.atlassian.plugin.web.descriptors.DefaultAbstractWebFragmentModuleDescriptor.enabled(DefaultAbstractWebFragmentModuleDescriptor.java:34) ... Caused by: com.atlassian.plugin.PluginParseException: Unable to load the module's display conditions: Could not load 'com.atlassian.jirafisheyeplugin.config.IsPriorToJiraVersion' in plugin com.atlassian.jirafisheyeplugin at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:95) at com.atlassian.plugin.web.descriptors.ConditionElementParser.makeConditionImplementation(ConditionElementParser.java:29) at com.atlassian.plugin.web.baseconditions.AbstractConditionElementParser.makeCondition(AbstractConditionElementParser.java:116) ... Caused by: java.lang.IllegalStateException: Cannot create object because the plugin container is unavailable. at com.atlassian.plugin.osgi.factory.OsgiPlugin.autowire(OsgiPlugin.java:369) at com.atlassian.plugin.osgi.factory.OsgiPlugin.autowire(OsgiPlugin.java:359) at com.atlassian.jira.plugin.PluginInjector.newInstance(PluginInjector.java:30) at com.atlassian.jira.plugin.webfragment.JiraWebFragmentHelper.loadCondition(JiraWebFragmentHelper.java:46) ... 264 more {noformat} Seems to affect only the 6.3.6 version of the plugin.

    Atlassian JIRA | 2 years ago | Daniel Leng
    java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]
  3. 0

    Problems with Guice in Eclipse: Class Loading Exceptions

    Google Groups | 8 years ago | Anne Martens
    java.lang.NoClassDefFoundError: com/google/ > >> inject/internal/collect/Lists > >>  at com.google.inject.multibindings.Multibinder > >> $RealMultibinder.initialize(Multibinder.java:254) > >>  at org.opt4j.start.Opt4JModule.multi(Opt4JModule.java:128) > > >> This was after I fixed a bug in my own code, which might be a reason > >> why you did not see it. I uploaded a fixed version of my code to the > >> url named above (http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper- > >> plugin.zip<http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-%0Aplugin.zip> > >> ). > > >> Is it possible that the guice-multibindings-....jar also needs a > >> patch? Or is it a problem that multibindings resides in its own jar? > >> For the latter, it might be an option to join the two into one jar. > > > Note this is actually a different issue unrelated to the previous problem, > > the issue here is that the multibindings extension uses classes from the > > internal Guice package which (rightly) isn't exported > > > Seehttp://code.google.com/p/google-guice/issues/detail?id=311 > > > If you've got them inside the same Bundle-ClassPath (as you had before) > > then it shouldn't matter because the internal package is only hidden from > > other bundles / plug-in ... jars on the same Bundle-ClassPath will merge > > together just like in a classic Java application > > > however, if you're using them as separate bundles then you'd need to > > patch the multibindings jar to attach as a fragment to the Guice bundle > > as suggested in Issue 311 > > > I'll take a look at your updated code to see what's changed... > > Aha, found the problem - it's because the packaging of Google-Collection > classes inside Guice changed post-20090205... so when you use the old > multibindings jar with the new Guice jar there's a package mismatch. > > In the 20090205 snapshot it was "com.google.inject.internal.common.Lists", > now it is "com.google.inject.internal.Lists" - if you build Guice > multibindings > from trunk (or use the jar I'm going to send you) then everything should > work > > > Kind regards, > >> Anne > > >> On 3 Mrz., 18:51, Anne Martens <annema...@googlemail.com> wrote: > >> > Dear Stuart, > > >> > thanks a lot for your fast reply! Yes, I'm absolutely ok with using a > >> > patched version, I'm glad that there is a readily available solution. > > >> > I will try it and then let you know. > > >> > Kind regards > >> > from a very happy Anne > > >> > On 3 Mrz., 17:34, Stuart McCulloch <mcc...@gmail.com> wrote: > > >> > > 2009/3/3 Anne Martens <annema...@googlemail.com> > > >> > > > Dear Stuart, > > >> > > > I have uploaded to code to > >> > > >http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-plugin.zip. > >> > > > You also find a .project file for Eclipse there. Currently, the > >> plugin > >> > > > needs org.eclipse.core.runtime for the plugin activator > >> > > > Opt4JPluginActivator, but you can delete the class and the > >> dependency > >> > > > if you do not use Eclipse. To get the error, please call > >> > > > de.uka.ipd.sdq.dsexplore.opt4j.start.Opt4JStarter.startOpt4J() > > >> > > Hi Anne, > > >> > > I tracked the exception down to a binding for a system type > >> > > (java.util.Random) > >> > > in the OPT4J codebase that requires a constructor proxy - Guice checks > >> with > >> > > the BytecodeGen utility class to decide whether it needs a bridge > >> > > classloader > >> > > and it decides it doesn't for a system type, as mentioned in the Guice > >> wiki: > > >> > >    http://code.google.com/p/google-guice/wiki/ClassLoading > > >> > > Unfortunately, the classloader then returned by BytecodeGen is not the > >> Guice > >> > > classloader but the system classloader. Of course this does not have > >> access > >> > > to the internal Guice AOP classes, and the injector blows up :( > > >> > > I tried changing the OPT4J code to avoid the constructor proxy, but I > >> > > couldn't > >> > > get round it without making major changes to the code, so you'll need > >> to use > >> > > a patched version of Guice (at least until this is fixed in trunk) > > >> > > A quick fix would be to remove the following check from > >> BytecodeGen.java: > > >> > >     if (delegate == getSystemClassLoaderOrNull()) { > >> > >       return delegate; > >> > >     } > > >> > > Which would then enable bridging for system types - another option > >> would be > >> > > to return the Guice class loader at this point instead of the system > >> > > classloader: > > >> > >     if (delegate == getSystemClassLoaderOrNull()) { > >> > >       return GUICE_CLASS_LOADER; > >> > >     } > > >> > > Either of these would solve your problem, but they are not complete > >> because > >> > > the Guice classloader won't have access to types in the system > >> classloader > >> > > that don't reside in the "java" namespace (such as javax.* / > >> org.omg.*) > >> > > unless > >> > > of course you enabled OSGi bootdelegation for these packages... > > >> > > I've coded up a solution that doesn't suffer from this and raised a > >> Guice > >> > > issue: > > >> > >    http://code.google.com/p/google-guice/issues/detail?id=343 > > >> > > You can download a patched version of Guice here: > > >> > >http://code.google.com/p/peaberry/source/browse/trunk/lib/build/guice. > >> .. > > >> > > which avoids the AOP exception. > > >> > > Not sure if this patch will make it into Guice 2 because it is in a > >> critical > >> > > piece > >> > > of code, and I don't want to put any undue pressure on Jesse who's > >> already > >> > > done a lot of testing with the current code. > > >> > > Are you ok using the patched build until this is fixed in an official > >> > > release? > > >> > > For configuration details, I also uploaded > > >> > > >http://sdqweb.ipd.uka.de/temp/eclipse-config.txt, > >> > > > which is a copy of the configuration details Eclipse provides > >> > > > in Help -> About Eclipse Platform. I currently use version: > >> 3.4.1build > >> > > > id: M20080911-1700. > > >> > > > Thanks a lot! If you need more information, please let me know. > > >> > > > Kind regards, > >> > > > Anne > > >> > > > On 2 Mrz., 15:22, Stuart McCulloch <mcc...@gmail.com> wrote: > >> > > > > 2009/3/2 Anne Martens <annema...@googlemail.com> > > >> > > > > > Dear Stuart, > > >> > > > > > thanks a lot for your help. > > >> > > > > > Indeed, I only need Guice within a single plugin/bundle. That's > >> why I > >> > > > > > now put the three guice jars (guice-snapshot, > >> guice-multibindings- > >> > > > > > snapshot and aopalliance) back into the "referenced libraries" > >> of my > >> > > > > > opt4j wrapper plugin. I also tried to move the code starting > >> Opt4J to > >> > > > > > a new plugin activator class, that is activated when OSGi loads > >> the > >> > > > > > bundle. > > >> > > > > > Still, I get the same error (with a different stacktrace, of > >> course): > > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.ComputationException: > >> > > > > > com.google.inject.internal.cglib.core.CodeGenerationException: > >> > > > > > java.lang.reflect.InvocationTargetException-->null at > >> com.google.inject.internal.MapMaker$StrategyImpl.compute > >> > > > > > (MapMaker.java:538) at > >> com.google.inject.internal.MapMaker$StrategyImpl.compute > >> > > > > > (MapMaker.java:404) at com.google.inject.internal.CustomConcurrentHashMap > >> > > > > > $ComputingImpl.get(CustomConcurrentHashMap.java:2031) at > >> > > > com.google.inject.internal.FailableCache.get(FailableCache.java: > >> > > > > > 46) at > >> com.google.inject.InjectorImpl$LateBoundConstructor.bind > >> > > > > > (InjectorImpl.java:457) at com.google.inject.ClassBindingImpl.initialize > >> > > > > > (ClassBindingImpl.java:52) at > > >> com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java: > >> > > > > > 347) at com.google.inject.InjectorImpl.createJustInTimeBinding > >> > > > > > (InjectorImpl.java:639) at > >> > > > com.google.inject.InjectorImpl.createJustInTimeBindingRecursive > >> > > > > > (InjectorImpl.java:584) at com.google.inject.InjectorImpl.getJustInTimeBinding > >> > > > > > (InjectorImpl.java:179) at > > >> com.google.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java: > >> > > > > > 139) at com.google.inject.InjectorImpl.getInternalFactory > >> > > > > > (InjectorImpl.java:645) at > >> com.google.inject.FactoryProxy.notify(FactoryProxy.java:48) at > >> com.google.inject.BindingProcessor.runCreationListeners > >> > > > > > (BindingProcessor.java:215) at com.google.inject.InjectorBuilder.initializeStatically > >> > > > > > (InjectorBuilder.java:131) at > >> > > > com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problems with Guice in Eclipse: Class Loading Exceptions

    Google Groups | 8 years ago | Anne Martens
    java.lang.NoClassDefFoundError: com/google/ >> inject/internal/collect/Lists >> at com.google.inject.multibindings.Multibinder >> $RealMultibinder.initialize(Multibinder.java:254) >> at org.opt4j.start.Opt4JModule.multi(Opt4JModule.java:128) >> >> This was after I fixed a bug in my own code, which might be a reason >> why you did not see it. I uploaded a fixed version of my code to the >> url named above (http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper- >> plugin.zip<http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-%0Aplugin.zip> >> ). >> >> Is it possible that the guice-multibindings-....jar also needs a >> patch? Or is it a problem that multibindings resides in its own jar? >> For the latter, it might be an option to join the two into one jar. >> > > Note this is actually a different issue unrelated to the previous problem, > the issue here is that the multibindings extension uses classes from the > internal Guice package which (rightly) isn't exported > > See http://code.google.com/p/google-guice/issues/detail?id=311 > > If you've got them inside the same Bundle-ClassPath (as you had before) > then it shouldn't matter because the internal package is only hidden from > other bundles / plug-in ... jars on the same Bundle-ClassPath will merge > together just like in a classic Java application > > however, if you're using them as separate bundles then you'd need to > patch the multibindings jar to attach as a fragment to the Guice bundle > as suggested in Issue 311 > > I'll take a look at your updated code to see what's changed... > Aha, found the problem - it's because the packaging of Google-Collection classes inside Guice changed post-20090205... so when you use the old multibindings jar with the new Guice jar there's a package mismatch. In the 20090205 snapshot it was "com.google.inject.internal.common.Lists", now it is "com.google.inject.internal.Lists" - if you build Guice multibindings from trunk (or use the jar I'm going to send you) then everything should work > Kind regards, >> Anne >> >> >> On 3 Mrz., 18:51, Anne Martens <annema...@googlemail.com> wrote: >> > Dear Stuart, >> > >> > thanks a lot for your fast reply! Yes, I'm absolutely ok with using a >> > patched version, I'm glad that there is a readily available solution. >> > >> > I will try it and then let you know. >> > >> > Kind regards >> > from a very happy Anne >> > >> > On 3 Mrz., 17:34, Stuart McCulloch <mcc...@gmail.com> wrote: >> > >> > > 2009/3/3 Anne Martens <annema...@googlemail.com> >> > >> > > > Dear Stuart, >> > >> > > > I have uploaded to code to >> > > >http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-plugin.zip. >> > > > You also find a .project file for Eclipse there. Currently, the >> plugin >> > > > needs org.eclipse.core.runtime for the plugin activator >> > > > Opt4JPluginActivator, but you can delete the class and the >> dependency >> > > > if you do not use Eclipse. To get the error, please call >> > > > de.uka.ipd.sdq.dsexplore.opt4j.start.Opt4JStarter.startOpt4J() >> > >> > > Hi Anne, >> > >> > > I tracked the exception down to a binding for a system type >> > > (java.util.Random) >> > > in the OPT4J codebase that requires a constructor proxy - Guice checks >> with >> > > the BytecodeGen utility class to decide whether it needs a bridge >> > > classloader >> > > and it decides it doesn't for a system type, as mentioned in the Guice >> wiki: >> > >> > > http://code.google.com/p/google-guice/wiki/ClassLoading >> > >> > > Unfortunately, the classloader then returned by BytecodeGen is not the >> Guice >> > > classloader but the system classloader. Of course this does not have >> access >> > > to the internal Guice AOP classes, and the injector blows up :( >> > >> > > I tried changing the OPT4J code to avoid the constructor proxy, but I >> > > couldn't >> > > get round it without making major changes to the code, so you'll need >> to use >> > > a patched version of Guice (at least until this is fixed in trunk) >> > >> > > A quick fix would be to remove the following check from >> BytecodeGen.java: >> > >> > > if (delegate == getSystemClassLoaderOrNull()) { >> > > return delegate; >> > > } >> > >> > > Which would then enable bridging for system types - another option >> would be >> > > to return the Guice class loader at this point instead of the system >> > > classloader: >> > >> > > if (delegate == getSystemClassLoaderOrNull()) { >> > > return GUICE_CLASS_LOADER; >> > > } >> > >> > > Either of these would solve your problem, but they are not complete >> because >> > > the Guice classloader won't have access to types in the system >> classloader >> > > that don't reside in the "java" namespace (such as javax.* / >> org.omg.*) >> > > unless >> > > of course you enabled OSGi bootdelegation for these packages... >> > >> > > I've coded up a solution that doesn't suffer from this and raised a >> Guice >> > > issue: >> > >> > > http://code.google.com/p/google-guice/issues/detail?id=343 >> > >> > > You can download a patched version of Guice here: >> > >> > >http://code.google.com/p/peaberry/source/browse/trunk/lib/build/guice. >> .. >> > >> > > which avoids the AOP exception. >> > >> > > Not sure if this patch will make it into Guice 2 because it is in a >> critical >> > > piece >> > > of code, and I don't want to put any undue pressure on Jesse who's >> already >> > > done a lot of testing with the current code. >> > >> > > Are you ok using the patched build until this is fixed in an official >> > > release? >> > >> > > For configuration details, I also uploaded >> > >> > > >http://sdqweb.ipd.uka.de/temp/eclipse-config.txt, >> > > > which is a copy of the configuration details Eclipse provides >> > > > in Help -> About Eclipse Platform. I currently use version: >> 3.4.1build >> > > > id: M20080911-1700. >> > >> > > > Thanks a lot! If you need more information, please let me know. >> > >> > > > Kind regards, >> > > > Anne >> > >> > > > On 2 Mrz., 15:22, Stuart McCulloch <mcc...@gmail.com> wrote: >> > > > > 2009/3/2 Anne Martens <annema...@googlemail.com> >> > Dear Stuart, >> > thanks a lot for your help. >> > Indeed, I only need Guice within a single plugin/bundle. That's >> why I now put the three guice jars (guice-snapshot, >> guice-multibindings- snapshot and aopalliance) back into the "referenced libraries" >> of my opt4j wrapper plugin. I also tried to move the code starting >> Opt4J to a new plugin activator class, that is activated when OSGi loads >> the bundle. >> > Still, I get the same error (with a different stacktrace, of >> course): >> > com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null at >> com.google.inject.internal.MapMaker$StrategyImpl.compute (MapMaker.java:538) at >> com.google.inject.internal.MapMaker$StrategyImpl.compute (MapMaker.java:404) at com.google.inject.internal.CustomConcurrentHashMap $ComputingImpl.get(CustomConcurrentHashMap.java:2031) at >> > > > com.google.inject.internal.FailableCache.get(FailableCache.java: 46) at >> com.google.inject.InjectorImpl$LateBoundConstructor.bind (InjectorImpl.java:457) at com.google.inject.ClassBindingImpl.initialize (ClassBindingImpl.java:52) at >> com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java: 347) at com.google.inject.InjectorImpl.createJustInTimeBinding (InjectorImpl.java:639) at >> > > > com.google.inject.InjectorImpl.createJustInTimeBindingRecursive (InjectorImpl.java:584) at com.google.inject.InjectorImpl.getJustInTimeBinding (InjectorImpl.java:179) at >> com.google.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java: 139) at com.google.inject.InjectorImpl.getInternalFactory (InjectorImpl.java:645) at >> com.google.inject.FactoryProxy.notify(FactoryProxy.java:48) at >> com.google.inject.BindingProcessor.runCreationListeners (BindingProcessor.java:215) at com.google.inject.InjectorBuilder.initializeStatically (InjectorBuilder.java:131) at >> > > > com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)
  6. 0

    Problems with Guice in Eclipse: Class Loading Exceptions

    Google Groups | 8 years ago | Anne Martens
    java.lang.NoClassDefFoundError: com/google/ > inject/internal/collect/Lists > at com.google.inject.multibindings.Multibinder > $RealMultibinder.initialize(Multibinder.java:254) > at org.opt4j.start.Opt4JModule.multi(Opt4JModule.java:128) > > This was after I fixed a bug in my own code, which might be a reason > why you did not see it. I uploaded a fixed version of my code to the > url named above (http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper- > plugin.zip <http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-%0Aplugin.zip> > ). > > Is it possible that the guice-multibindings-....jar also needs a > patch? Or is it a problem that multibindings resides in its own jar? > For the latter, it might be an option to join the two into one jar. > Note this is actually a different issue unrelated to the previous problem, the issue here is that the multibindings extension uses classes from the internal Guice package which (rightly) isn't exported See http://code.google.com/p/google-guice/issues/detail?id=311 If you've got them inside the same Bundle-ClassPath (as you had before) then it shouldn't matter because the internal package is only hidden from other bundles / plug-in ... jars on the same Bundle-ClassPath will merge together just like in a classic Java application however, if you're using them as separate bundles then you'd need to patch the multibindings jar to attach as a fragment to the Guice bundle as suggested in Issue 311 I'll take a look at your updated code to see what's changed... Kind regards, > Anne > > > On 3 Mrz., 18:51, Anne Martens <annema...@googlemail.com> wrote: > > Dear Stuart, > > > > thanks a lot for your fast reply! Yes, I'm absolutely ok with using a > > patched version, I'm glad that there is a readily available solution. > > > > I will try it and then let you know. > > > > Kind regards > > from a very happy Anne > > > > On 3 Mrz., 17:34, Stuart McCulloch <mcc...@gmail.com> wrote: > > > > > 2009/3/3 Anne Martens <annema...@googlemail.com> > > > > > > Dear Stuart, > > > > > > I have uploaded to code to > > > >http://sdqweb.ipd.uka.de/temp/org.opt4j-wrapper-plugin.zip. > > > > You also find a .project file for Eclipse there. Currently, the > plugin > > > > needs org.eclipse.core.runtime for the plugin activator > > > > Opt4JPluginActivator, but you can delete the class and the dependency > > > > if you do not use Eclipse. To get the error, please call > > > > de.uka.ipd.sdq.dsexplore.opt4j.start.Opt4JStarter.startOpt4J() > > > > > Hi Anne, > > > > > I tracked the exception down to a binding for a system type > > > (java.util.Random) > > > in the OPT4J codebase that requires a constructor proxy - Guice checks > with > > > the BytecodeGen utility class to decide whether it needs a bridge > > > classloader > > > and it decides it doesn't for a system type, as mentioned in the Guice > wiki: > > > > > http://code.google.com/p/google-guice/wiki/ClassLoading > > > > > Unfortunately, the classloader then returned by BytecodeGen is not the > Guice > > > classloader but the system classloader. Of course this does not have > access > > > to the internal Guice AOP classes, and the injector blows up :( > > > > > I tried changing the OPT4J code to avoid the constructor proxy, but I > > > couldn't > > > get round it without making major changes to the code, so you'll need > to use > > > a patched version of Guice (at least until this is fixed in trunk) > > > > > A quick fix would be to remove the following check from > BytecodeGen.java: > > > > > if (delegate == getSystemClassLoaderOrNull()) { > > > return delegate; > > > } > > > > > Which would then enable bridging for system types - another option > would be > > > to return the Guice class loader at this point instead of the system > > > classloader: > > > > > if (delegate == getSystemClassLoaderOrNull()) { > > > return GUICE_CLASS_LOADER; > > > } > > > > > Either of these would solve your problem, but they are not complete > because > > > the Guice classloader won't have access to types in the system > classloader > > > that don't reside in the "java" namespace (such as javax.* / org.omg.*) > > > unless > > > of course you enabled OSGi bootdelegation for these packages... > > > > > I've coded up a solution that doesn't suffer from this and raised a > Guice > > > issue: > > > > > http://code.google.com/p/google-guice/issues/detail?id=343 > > > > > You can download a patched version of Guice here: > > > > >http://code.google.com/p/peaberry/source/browse/trunk/lib/build/guice. > .. > > > > > which avoids the AOP exception. > > > > > Not sure if this patch will make it into Guice 2 because it is in a > critical > > > piece > > > of code, and I don't want to put any undue pressure on Jesse who's > already > > > done a lot of testing with the current code. > > > > > Are you ok using the patched build until this is fixed in an official > > > release? > > > > > For configuration details, I also uploaded > > > > > >http://sdqweb.ipd.uka.de/temp/eclipse-config.txt, > > > > which is a copy of the configuration details Eclipse provides > > > > in Help -> About Eclipse Platform. I currently use version: > 3.4.1build > > > > id: M20080911-1700. > > > > > > Thanks a lot! If you need more information, please let me know. > > > > > > Kind regards, > > > > Anne > > > > > > On 2 Mrz., 15:22, Stuart McCulloch <mcc...@gmail.com> wrote: > > > > > 2009/3/2 Anne Martens <annema...@googlemail.com> > > Dear Stuart, > > thanks a lot for your help. > > Indeed, I only need Guice within a single plugin/bundle. That's > why I now put the three guice jars (guice-snapshot, > guice-multibindings- snapshot and aopalliance) back into the "referenced libraries" of > my opt4j wrapper plugin. I also tried to move the code starting > Opt4J to a new plugin activator class, that is activated when OSGi loads > the bundle. > > Still, I get the same error (with a different stacktrace, of > course): > > com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.ComputationException: com.google.inject.internal.cglib.core.CodeGenerationException: java.lang.reflect.InvocationTargetException-->null at > com.google.inject.internal.MapMaker$StrategyImpl.compute (MapMaker.java:538) at > com.google.inject.internal.MapMaker$StrategyImpl.compute (MapMaker.java:404) at com.google.inject.internal.CustomConcurrentHashMap $ComputingImpl.get(CustomConcurrentHashMap.java:2031) at > > > > com.google.inject.internal.FailableCache.get(FailableCache.java: 46) at > com.google.inject.InjectorImpl$LateBoundConstructor.bind (InjectorImpl.java:457) at com.google.inject.ClassBindingImpl.initialize (ClassBindingImpl.java:52) at > com.google.inject.InjectorImpl.initializeBinding(InjectorImpl.java: 347) at com.google.inject.InjectorImpl.createJustInTimeBinding (InjectorImpl.java:639) at > > > > com.google.inject.InjectorImpl.createJustInTimeBindingRecursive (InjectorImpl.java:584) at com.google.inject.InjectorImpl.getJustInTimeBinding (InjectorImpl.java:179) at > com.google.inject.InjectorImpl.getBindingOrThrow(InjectorImpl.java: 139) at com.google.inject.InjectorImpl.getInternalFactory (InjectorImpl.java:645) at > com.google.inject.FactoryProxy.notify(FactoryProxy.java:48) at com.google.inject.BindingProcessor.runCreationListeners (BindingProcessor.java:215) at com.google.inject.InjectorBuilder.initializeStatically (InjectorBuilder.java:131) at > > > > com.google.inject.InjectorBuilder.build(InjectorBuilder.java:105)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NoClassDefFoundError

      com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl] for bean with name 'refreshManager' defined in URL [bundle://151.0:0/META-INF/spring/atlassian-plugins-components.xml]: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: com.atlassian.jirafisheyeplugin.config.RefreshManagerImpl not found from bundle [JIRA FishEye Plugin (com.atlassian.jira.plugins.jira-fisheye-plugin)]

      at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference()
    2. Spring Beans
      ConstructorResolver.resolveConstructorArguments
      1. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
      2. org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
      3. org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:495)
      3 frames