Just looked at this a bit..    I don't really know what the eclipse jarinjar 
stuff is doing, but I have a workaround.   If the FIRST line of you main (or 
at least before any CXF code is called) you do:

System.setProperty("org.apache.cxf.JDKBugHacks.defaultUsesCaches", "true");

then it's very quick.    In general, we turn off the defaultUsesCaches to work 
around bugs in JAXB and other libraries that cause the jars to become locked 
and thus not undeployable and such.   That apparently causes issues with the 
Eclipse jarinjar stuff as it reopens and parses each jar for each class it 
wants to load.   Very expensive.    The property above would keep that turned 
on.

Dan




On Wednesday, January 18, 2012 12:46:58 PM Scott Stroud wrote:
> To reproduce I just created a class with a main that uses the
> JaxWsProxyFactoryBean in it for the client.  Then in Eclipse (3.7 at least)
> right click on the project -> Export -> Runnable Jar -> Select your Launch
> Config (your Main class) -> Select the "Package required libraries into
> generated JAR" -> Let it make the jar.  Then run that jar "java -jar
> myJar.jar".  Make sure that all your libs are "Referenced Libraries" and
> will be exported.
> 
> I believe the key part is that you select "Package required libraries into
> generated JAR".  It then just puts the jars into your jar and adds the
> references to the META-INF and uses Eclipse's jarinjar stuff to load the
> classes.  This seems to be the issue because if I select ether "Extract
> libs" or "libs to sub-dir" in the Wizard it works.  So for now thats what
> Im doing so it works.  Thanks.
-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to