I have had some similar issue in the past (and finally decided to ditch
spring :).

IIRC, the maven-shade-plugin could be used to relocate packages of classes
of dependencies. But it is kind of black magic :/

-Rob

On Wed, Mar 30, 2016 at 4:20 PM, Marieke Vandamme <marieke.vanda...@tvh.com>
wrote:

> Hi,
>
> That's something I first tried, but other libraries we use (like
> org.apache.tika.tika-parsers) set version of asm or cglib.
> I also see that asm-util is used, but with version 5.0.3.
> Is there no standard dependencies I can use to solve this? I do not have to
> possibility to not set the version, because I then end up with multiple
> version of asm in my war-file.
> Thanks again.
>
>
> 2016-03-30 16:08 GMT+02:00 Martin Grigorov <mgrigo...@apache.org>:
>
> > Hi,
> >
> > The versions were "latest" at the time Wicket 7 was in development (ASM
> > 5.0.x, CGLIB 3.1.x).
> > The current latest of ASM and CGLIB are targeted for Java 8 (ASM 5.1.x,
> > CGLIB 3.2.x).
> > Both ASM and CGLIB do not follow semantic versioning and this leads to
> > confusions like this one.
> >
> > The solution is simple: do not set the versions in your pom.xml but just
> > use the transitive dependencies coming with wicket-spring.
> >
> > Martin Grigorov
> > Wicket Training and Consulting
> > https://twitter.com/mtgrigorov
> >
> > On Wed, Mar 30, 2016 at 4:00 PM, Marieke Vandamme <
> > marieke.vanda...@tvh.com>
> > wrote:
> >
> > > ​Hi,
> > >
> > > I'm trying to use wicket 7.2.0 and saw in the migration guide ​that
> other
> > > libraries also changed to the latest stable version.
> > > So I also tried this, and the following are used by me now:
> > > - Spring Framework 4.2.5
> > > - ASM 5.1
> > > - CGLIB 3.2.1
> > >
> > > I get the following stacktrace, on which I'm really lost, and could not
> > > find any answer on the internet on..
> > > Thanks for any help. Kind Regards, Marieke
> > >
> > > javax.servlet.ServletException:
> > net.sf.cglib.core.CodeGenerationException:
> > > java.lang.reflect.InvocationTargetException-->null
> > > at
> > org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:455)
> > > at
> > org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:353)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4574)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5184)
> > > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > > at
> > >
> > >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:726)
> > > at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:702)
> > > at
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:697)
> > > at
> > >
> > >
> >
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:579)
> > > at
> > >
> > >
> >
> org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1744)
> > > at
> > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > > at
> > >
> > >
> >
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> > > at
> > >
> > >
> >
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> > > at java.lang.Thread.run(Thread.java:722)
> > > Caused by: net.sf.cglib.core.CodeGenerationException:
> > > java.lang.reflect.InvocationTargetException-->null
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:320)
> > > at net.sf.cglib.proxy.Enhancer.generate(Enhancer.java:445)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:82)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:80)
> > > at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
> > > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> > > at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> > > at
> > >
> net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
> > > at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:102)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:275)
> > > at net.sf.cglib.proxy.Enhancer.nextInstance(Enhancer.java:643)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:279)
> > > at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:433)
> > > at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:304)
> > > at org.apache.wicket.jmx.Initializer.createProxy(Initializer.java:294)
> > > at org.apache.wicket.jmx.Initializer.register(Initializer.java:249)
> > > at org.apache.wicket.jmx.Initializer.init(Initializer.java:192)
> > > at org.apache.wicket.Application.initInitializers(Application.java:741)
> > > at
> > org.apache.wicket.Application.initializeComponents(Application.java:643)
> > > at org.apache.wicket.Application.initApplication(Application.java:949)
> > > at
> > org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:429)
> > > ... 18 more
> > > Caused by: java.lang.reflect.InvocationTargetException
> > > at sun.reflect.GeneratedMethodAccessor53.invoke(Unknown Source)
> > > at
> > >
> > >
> >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > > at java.lang.reflect.Method.invoke(Method.java:601)
> > > at net.sf.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:409)
> > > at
> > >
> > >
> >
> net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:311)
> > > ... 39 more
> > > Caused by: java.lang.LinkageError: loader (instance of
> > >  org/apache/catalina/loader/WebappClassLoader): attempted  duplicate
> > class
> > > definition for name: "org/apache/wicket/jmx/Application"
> > > at java.lang.ClassLoader.defineClass1(Native Method)
> > > at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
> > > ... 44 more
> > >
> > > --
> > >
> > >
> > > **** DISCLAIMER ****
> > >
> > > http://www.tvh.com/glob/en/email-disclaimer
> > >
> > > "This message is delivered to all addressees subject to the conditions
> > > set forth in the attached disclaimer, which is an integral part of this
> > > message."
> > >
> >
>
> --
>
>
> **** DISCLAIMER ****
>
> http://www.tvh.com/glob/en/email-disclaimer
>
> "This message is delivered to all addressees subject to the conditions
> set forth in the attached disclaimer, which is an integral part of this
> message."
>

Reply via email to