Eclipse 4.4 has also had a major upgrade to the plugin API. Might want to look at it and
see if a rewrite is warranted given the big changes in both Eclipse and Windup.
Robb Greathouse
Chief Evangelist
Middleware Business Unit
JBoss, a Division of Red Hat
cellphone 505-507-4906
----- Original Message -----
For the most part, Furnace is a black box that hands you objects :)
No
special ClassLoading knowledge required, really. You can include as much as
you want on the OSGi ClassPath and furnace will give you objects just the
same (as long as you actually have those types on your class-path.) But I
think it's fine if we continue to try to get 1.0 working, I just don't want
to deplete your time and energy on this, because I think your time is very
valuable :)
A few things to know:
* Furnace is just a runtime & container. It handles object
instantiation and
creates a modular classloading environment that is mostly transparent.
* Anything you take from inside Furnace and use outside, will be a proxy of
the actual object. This means that objects and services requested from and
passed in to Furnace must be proxy-able.
* Furnace can be started and stopped. Once stopped, you should immediately
drop all references and clean up any lingering registries where .class
instances might be held (otherwise you will get classloader memory leaks.)
But let's continue with the path we are on. I think that simply
adding the
spring jars that contain ApplicationContext.class to the OSGi/eclipse
classpath will resolve this problem.
~Lincoln
On Tue, Dec 16, 2014 at 3:35 PM, Ian Tewksbury <
itewksbu(a)redhat.com > wrote:
> My only worry is I am still not understanding how to correctly leverage
> forge/furnace to do the class loading properly and trying to do that at the
> same time as switching APIs could make things even more difficult. In both
> the new windup I am assuming it has third party jar dependencies, just like
> windup 1.0 does, so I would run into the same issues. IF you think for some
> reason the design of 2.0 would be such that I am less likely to be hitting
> these class loading issues I will just bite the bullet and try and do the
> switch over at the same time. It would just help my brain a lot if I could
> get 1.0 working so I have a better baseline of comparison when I then break
> everything to work with 2.0. I am afraid I wont know whether I am debugging
> API changes or class loading forge/furnace changes if I am doing both at
> the
> same time.
> From: "Lincoln Baxter, III" <
lincolnbaxter(a)gmail.com >
> To: "Windup-dev List" < windup-dev(a)lists.jboss.org >
> Sent: Tuesday, December 16, 2014 1:13:01 PM
> Subject: Re: [windup-dev]
org.springframework.context.ApplicationContext
> cannot be found by org.jboss.tools.windup.runtime_3.1.0.qualifier
> Since windup 2.0 is in no way backwards compatible with Windup
1.0, and the
> APIs you'll need probably don't exist in Windup 2.0 yet, I suspect that we
> will be solving unnecessary problems (like seemingly Spring related issues
> such as this one) by trying to stand up Windup 1 at this point, but that's
> fine, we can do this first.
>
~Lincoln
>
> On Tue, Dec 16, 2014 at 9:49 AM, Ian Tewksbury <
itewksbu(a)redhat.com >
> wrote:
> > Lincoln,
>
> > I didn't want to try to bite off more then I can chew
at once. Hence I
> > want
> > to make sure I can load windup via forge/furnace before I also try to
> > switch
> > over to using the new windup. If I can load one version with forge then I
> > can load any version. But right now I can't load the version I had
> > working,
> > which means if I tried to switch to loading Windup 2.0 I would be dealing
> > with new API and class loading issues at the same time.
>
> > So first goal, load windup 1 via forge, once I can see I
can do that,
> > then
> > I
> > can switch out for windup 2.
>
> > I have a hunch about the class loading issues, but I will
put that
> > conversation on the forge forum because it seems the best place.
>
> > Blue Skies,
>
> > ~Ian
>
> > From: "Lincoln Baxter, III" <
lincolnbaxter(a)gmail.com >
>
> > To: "Windup-dev List" < windup-dev(a)lists.jboss.org >
>
> > Sent: Monday, December 15, 2014 4:22:57 PM
>
> > Subject: Re: [windup-dev]
org.springframework.context.ApplicationContext
> > cannot be found by org.jboss.tools.windup.runtime_3.1.0.qualifier
>
> > Hey Ian,
>
> > Glad to see you! Sorry you're having trouble getting
this up and running
> > again (as you said, not sure we ever did get it there.)
>
> > At this point, I would abandon using the Legacy windup
codebase. We've
> > long
> > since stopped working on it. My suggestion, now, would be to update to
> > the
> > Windup 2.0.0.Beta6 (or SNAPSHOT) version, and start picking things up
> > from
> > there.
>
> > As I recall, we weren't ready at the time of your last
attempt, to
> > produce
> > a
> > report, or information that you could consume in Eclipse, but I do
> > believe
> > we are at that point now.
>
> > To answer some of your questions:
>
> > * The addon needs to contain any required JARs from
libraries that are
> > included. It won't go out and find things on the fly - everything must be
> > bundled.
>
> > * The new entry point for Windup is used here in WindupCommand (you
> > should
> > be
> > able to use this as an example):
> >
https://github.com/windup/windup/blob/master/ui/src/main/java/org/jboss/w...
> > -
>
> > * You pretty much just need to ask Furnace for instances of:
>
> > org.jboss.windup.graph.GraphContextFactory ;
>
> >
>
> > org.jboss.windup.exec.WindupProcessor ;
>
> > The rest "should" be self explanatory via the example.
>
> >
~Lincoln
> >
>
> > On Mon, Dec 15, 2014 at 11:56 AM, Ian Tewksbury <
itewksbu(a)redhat.com >
> > wrote:
>
> > > Robb,
> >
>
> > > I am not using it. Windup is attempting to use it as
it is loading its
> > > rules.
> > > This issue is not really spring specfic, spring just happens to be the
> > > first
> > > JAR that is having issues being loaded. The issue is indicitive of a
> > > larger
> > > problem. Forge/Furnace is not getting queried when trying to load
> > > classes
> > > that are in JARs provided by the addon.
> >
>
> > > Blue Skies,
> >
>
> > > ~Ian
> >
>
> > > From: "Robb Greathouse" <
robb.greathouse(a)redhat.com >
> >
>
> > > To: "Windup-dev List" < windup-dev(a)lists.jboss.org >
> >
>
> > > Sent: Monday, December 15, 2014 11:35:34 AM
> >
>
> > > Subject: Re: [windup-dev]
> > > org.springframework.context.ApplicationContext
> > > cannot be found by org.jboss.tools.windup.runtime_3.1.0.qualifier
> >
>
> > > Hi,
> >
>
> > > Quick question. How do you use springframework in
eclipse?
> >
>
> > > Robb Greathouse
> >
>
> > > Chief Evangelist
> >
>
> > > Middleware Business Unit
> >
>
> > > JBoss, a Division of Red Hat
> >
>
> > > cellphone 505-507-4906
> >
>
> > > > Linconln,
> > >
> >
>
> > > > I am trying to get Eclipse to be able to load
windup legacy with
> > > > Forge
> > > > and
> > > > have run into the error I think I was running into months ago when I
> > > > last
> > > > tried this. The legacy-windup-engine depends on ApplicationContext
as
> > > > a
> > > > maven dependency but Eclipse/Forage does not seem to be able find
the
> > > > dependency. I have honestly forget how Forge is supposed to work at
> > > > this
> > > > point. I thought Forge should automatically be finding all the
> > > > required
> > > > dependencies of the jars in the add-on. But maybe I am crazy. Does
> > > > the
> > > > addon
> > > > need to include all the jars that the legacy-windup jars depend on?
> > >
> >
>
> > > > Blue Skies,
> > >
> >
>
> > > > ~Ian
> > >
> >
>
> > > > java.lang.NoClassDefFoundError:
> > > > org/springframework/context/ApplicationContext
> > >
> >
>
> > > > 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_ffb85582-a284-4183-a727-6db372ddc32c.createWindupEngine(WindupFactory_$$_javassist_ffb85582-a284-4183-a727-6db372ddc32c.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)
> > >
> >
>
> > > > Caused by: 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)
> > >
> >
>
> > > > ... 24 more
> > >
> >
>
> > > > _______________________________________________
> > >
> >
>
> > > > windup-dev mailing list
> > >
> >
>
> > > > windup-dev(a)lists.jboss.org
> > >
> >
>
> > > >
https://lists.jboss.org/mailman/listinfo/windup-dev
> > >
> >
>
> > > _______________________________________________
> >
>
> > > windup-dev mailing list
> >
>
> > > windup-dev(a)lists.jboss.org
> >
>
> > >
https://lists.jboss.org/mailman/listinfo/windup-dev
> >
>
> > > _______________________________________________
> >
>
> > > windup-dev mailing list
> >
>
> > > windup-dev(a)lists.jboss.org
> >
>
> > >
https://lists.jboss.org/mailman/listinfo/windup-dev
> >
>
> > --
>
> > Lincoln Baxter, III
>
> >
http://ocpsoft.org
>
> > "Simpler is better."
>
> > _______________________________________________
>
> > windup-dev mailing list
>
> > windup-dev(a)lists.jboss.org
>
> >
https://lists.jboss.org/mailman/listinfo/windup-dev
>
> > _______________________________________________
>
> > windup-dev mailing list
>
> > windup-dev(a)lists.jboss.org
>
> >
https://lists.jboss.org/mailman/listinfo/windup-dev
>
> --
> Lincoln Baxter, III
>
http://ocpsoft.org
> "Simpler is better."
> _______________________________________________
> windup-dev mailing list
> windup-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/windup-dev
> _______________________________________________
> windup-dev mailing list
> windup-dev(a)lists.jboss.org
>
https://lists.jboss.org/mailman/listinfo/windup-dev
--
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
_______________________________________________
windup-dev mailing list
windup-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/windup-dev