[forge-users] Furnace Class Loading Issue

forge-users at lists.jboss.org forge-users at lists.jboss.org
Sun Dec 14 10:38:12 EST 2014


I am attempting to use Forge/Furnace integration with eclipse to load my addon but I am running into class loading issues. It would seem that for some reason when a class from my Addon, WindupEngine, tries to load ApplicaitonContext the org.jboss.tools.forge.core.internal.furnace.CompositeFurnaceClassLoader is not being consulted. I have debugged it and CompositeFurnaceClassLoader#loadClass is never asked to load ApplicaitonContext. I don't know why this is, but I suspect this is the issue. Since ApplicaitonContext is in spring-context-3.1.0.RELEASE.jar which is included as a dependency in my addon. From the logs I know that my addon is being loaded, it is just for some reason it is not being consulted when trying to load this class and I do not know why.

In case source is useful:

The addon I am trying to load: https://github.com/windup/windup-legacy/tree/master/application/addon
Eclipse plugin that loads the addon: windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime at forge · windup/windup-eclipse-plugin · GitHub (https://github.com/windup/windup-eclipse-plugin/tree/forge/plugins/org.jboss.tools.windup.runtime)
IFurnaceRepositoryProvider implementation to load the Furnace repository with the addon: windup-eclipse-plugin/FurnaceRepositoryProvider.java at forge · windup/windup-eclipse-plugin · GitHub (https://github.com/windup/windup-eclipse-plugin/blob/forge/plugins/org.jboss.tools.windup.runtime/src/org/jboss/tools/windup/runtime/internal/FurnaceRepositoryProvider.java)
The service having class loading issues: windup-eclipse-plugin/WindupService.java at forge · windup/windup-eclipse-plugin · GitHub (https://github.com/windup/windup-eclipse-plugin/blob/forge/plugins/org.jboss.tools.windup.core/src/org/jboss/tools/windup/core/WindupService.java)
* #getWindupFactory - successfully uses Furnace to load the factory class
* #getWindupEngine - fails at creating WindupEngine due to the class loading issue

I am really not sure if I just have something not configured correctly or if this is some issue with Furnace/Forge. I have a fair bit of experience debugging Eclipse/OSGI class loading issues with plugins and their dependencies but I have no working knowledge of how Furnace/Forge works and thus while trying to debug I am at a lost as to what to be looking for.

Any one with any ideas would be greatly appreciated.

{quote:modifiedtitle=true|class=jive_text_macro jive_macro_quote}
ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier].loadClass(org.springframework.context.ApplicationContext)

BundleLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier].findClassInternal(org.springframework.context.ApplicationContext)

BundleLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier].findLocalClass(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-app-addon.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-engine.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-metadata.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-reporting.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-app-addon.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-engine.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-metadata.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier - /usr/share/eclipse/luna-sr1/eclipse/../../../../../home/ian/Projects/Windup/workspace/windup-eclipse-plugin/plugins/org.jboss.tools.windup.runtime/lib/windup-legacy-reporting.jar].findClassImpl(org.springframework.context.ApplicationContext)

ModuleClassLoader[org.jboss.tools.windup.runtime_3.1.0.qualifier].loadClass(org.springframework.context.ApplicationContext) failed.

java.lang.ClassNotFoundException: org.springframework.context.ApplicationContext cannot be found by org.jboss.tools.windup.runtime_3.1.0.qualifier

  at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:432)

  at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:345)

  at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:337)

  at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)

  at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

  at java.lang.Class.getDeclaredMethods0(Native Method)

  at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)

  at java.lang.Class.getDeclaredMethods(Class.java:1855)

  at org.jboss.forge.furnace.proxy.javassist.util.proxy.SecurityActions.getDeclaredMethods(SecurityActions.java:30)

  at org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.getMethods(ProxyFactory.java:1121)

  at org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.getMethods(ProxyFactory.java:1098)

  at org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.makeSortedMethodList(ProxyFactory.java:803)

  at org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.computeSignature(ProxyFactory.java:810)

  at org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:398)

  at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$3.call(ClassLoaderAdapterCallback.java:987)

  at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)

  at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.enhance(ClassLoaderAdapterCallback.java:900)

  at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.enhanceResult(ClassLoaderAdapterCallback.java:277)

  at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.access$200(ClassLoaderAdapterCallback.java:37)

  at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:124)

  at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42)

  at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:96)

  at org.jboss.windup.WindupFactory_$$_javassist_7a5483bd-dd1d-470f-8ad4-58ae4916017f.createWindupEngine(WindupFactory_$$_javassist_7a5483bd-dd1d-470f-8ad4-58ae4916017f.java)

  at org.jboss.tools.windup.core.WindupService.getWindupEngine(WindupService.java:391)

  at org.jboss.tools.windup.core.WindupService.getWindupReportEngine(WindupService.java:412)

  at org.jboss.tools.windup.core.WindupService.generateReport(WindupService.java:250)

  at org.jboss.tools.windup.core.WindupService.generateReport(WindupService.java:186)

  at org.jboss.tools.windup.ui.internal.commands.GenerateWindupReportHandler$1.run(GenerateWindupReportHandler.java:78)

  at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
{quote}

Posted by forums
Original post: https://developer.jboss.org/message/913521#913521



More information about the forge-users mailing list