Hey Ian,
I'm taking a look at this now. I'll have more information for you soon.
~Lincoln
On Fri, Mar 27, 2015 at 8:35 AM, Ian Tewksbury <itewk(a)redhat.com> wrote:
Lincoln and Jess,
I have spent another evening trying to defeat this class loading error
with no luck.
What I have tried:
1. Debugging CompositeFurnaceClassLoader
1. changed #loadClass to #findClass as per ClassLoader suggestion,
didn't help
2. put break point in #findClass to see how many times it is called
for org.jboss.forge.furnace.util.Predicate, it is only being called once,
and on that one call it is failing with the LinkageError, this makes 0
sense to me since the error says that it has already been loaded
3. Tried various combinations of checking to see if the class has
already been loaded, no luck
4. Tried creating a cache of already loaded classes, didn't help,
which makes sense because the #findClass method (or #loadClass if you dont
use my change) only gets called once for this class.
2. I have updated the windup-eclipse plugin to use the latest furnace
version, 2.15.2.Final, didn't make a difference
3. I have updated the windup-eclipse plugin to use the latest Windup
2.2.0 Release, plus my changes to add default constructor to WindupService
and FileService
4. I have stopped using my custom loadType function I was talking
about earlier, that was a red hearing I believe
5. I have spent hours googling this error message with no solution
path to be fund
At this point I am totally blocked. I don't know what to try next.
My latest code is here:
plugin -
https://github.com/windup/windup-eclipse-plugin/tree/windup2
windup -
https://github.com/itewk/windup/tree/windup-eclipse
* as a reminder you can't use SNAPSHOT versions for WINDUP when
compiling the windup eclipse plugin with local changes to Windup because it
will always pull the snapshot from the remote repository and ignore your
local changes, unless using releases in which case maven looks at the local
repo first
Has anyone been able to try and reproduce this themselves yet?
Has anyone been able to look over my WindupServices class to make sure I
am properly using Forge/Furnace to access Windup?
I am either doing something really dumb on my end when trying to access
Windup or there is a bug/logic error with the CompositeFurnaceClassLoader.
Blue Skies,
~Ian
!ENTRY org.eclipse.core.jobs 4 2 2015-03-27 08:04:51.234
!MESSAGE An internal error occurred during: "Validating".
!STACK 0
java.lang.LinkageError: loader constraint violation: loader (instance of
org/jboss/tools/forge/core/internal/furnace/CompositeFurnaceClassLoader)
previously initiated loading for a different type with name
"org/jboss/forge/furnace/util/Predicate"
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2615)
at java.lang.Class.getDeclaredMethods(Class.java:1860)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.SecurityActions.getDeclaredMethods(SecurityActions.java:30)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.RuntimeSupport.findMethod2(RuntimeSupport.java:134)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.RuntimeSupport.findMethod(RuntimeSupport.java:65)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.RuntimeSupport.find2Methods(RuntimeSupport.java:53)
at
org.jboss.windup.exec.configuration.WindupConfiguration_$$_javassist_bdf99157-4ab9-4bb9-a9ec-03565e9d16d6.<clinit>(WindupConfiguration_$$_javassist_bdf99157-4ab9-4bb9-a9ec-03565e9d16d6.java)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at
sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at
sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:140)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1057)
at java.lang.reflect.Field.getFieldAccessor(Field.java:1038)
at java.lang.reflect.Field.set(Field.java:741)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.setField(ProxyFactory.java:525)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.createClass3(ProxyFactory.java:508)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.createClass2(ProxyFactory.java:492)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.createClass1(ProxyFactory.java:428)
at
org.jboss.forge.furnace.proxy.javassist.util.proxy.ProxyFactory.createClass(ProxyFactory.java:400)
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:253)
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.forge.furnace.services.Imported_$$_javassist_48ac554d-8d60-4d09-8f17-c0a42f2c85b7.get(Imported_$$_javassist_48ac554d-8d60-4d09-8f17-c0a42f2c85b7.java)
at
org.jboss.tools.forge.core.furnace.FurnaceService.lookup(FurnaceService.java:96)
at
org.jboss.tools.windup.core.WindupService.getServiceFromFurnace(WindupService.java:485)
at
org.jboss.tools.windup.core.WindupService.generateGraph(WindupService.java:226)
at
org.jboss.tools.windup.core.WindupService.getGraph(WindupService.java:301)
at
org.jboss.tools.windup.core.WindupService.getInlineHints(WindupService.java:103)
at
org.jboss.tools.windup.core.internal.validators.WindupValidator.validate(WindupValidator.java:81)
at org.eclipse.wst.validation.Validator$V2.validate(Validator.java:1159)
at
org.eclipse.wst.validation.internal.ValManager.validate(ValManager.java:704)
at
org.eclipse.wst.validation.internal.ValManager$1.visit(ValManager.java:665)
at
org.eclipse.wst.validation.internal.ValManager.accept(ValManager.java:810)
at
org.eclipse.wst.validation.internal.ValManager.validate(ValManager.java:669)
at
org.eclipse.wst.validation.internal.ValidationRunner.execute(ValidationRunner.java:134)
at
org.eclipse.wst.validation.internal.ValidationRunner.validate(ValidationRunner.java:68)
at
org.eclipse.wst.validation.ui.internal.ManualValidationRunner.runInWorkspace(ManualValidationRunner.java:83)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev