0

Zk Spring new installation

asked 2011-10-20 03:47:47 +0800

murali2610 gravatar image murali2610
6 1

Hi All,

I am trying to setup a new test project with ZKspring as mentioned in the ZK Spring essentials documentation.


When I start my tomcat server I see the below error. Could someone help me get past this?
javassist.CannotCompileException: by java.lang.LinkageError: loader (instance of org/apache/catalina/loader/WebappClassLoader): attempted duplicate class definition for name: "org/zkoss/spring/beans/zkcomponents/ZKComponentBeanMethods"
at javassist.ClassPool.toClass(ClassPool.java:1088)
at javassist.CtClass.toClass(CtClass.java:1153)
at org.zkoss.spring.web.context.CoreContextListener.preprocessSpringBeansForZKComponentinjection(CoreContextListener.java:124)
at org.zkoss.spring.web.context.CoreContextListener.contextInitialized(CoreContextListener.java:71)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.LinkageError: loader (instance of org/apache/catalina/loader/WebappClassLoader): attempted duplicate class definition for name: "org/zkoss/spring/beans/zkcomponents/ZKComponentBeanMethods"
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at sun.reflect.GeneratedMethodAccessor25.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at javassist.ClassPool.toClass2(ClassPool.java:1101)
at javassist.ClassPool.toClass(ClassPool.java:1082)
... 11 more


Thanks in advance.

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2011-10-20 04:10:18 +0800

murali2610 gravatar image murali2610
6 1

My bad. I had to swap the order of the listeners in my web.xml with zk spring listener first.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-10-20 03:47:47 +0800

Seen: 1,319 times

Last updated: Oct 20 '11

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More