Reason
When you are working with java libraries that internally depend on cglib, then it’s very normal to encounter the below error:
Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at net.sf.cglib.core.DebuggingClassWriter.toByteArray(DebuggingClassWriter.java:73)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:26)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:144)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:116)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.cglib.proxy.Enhancer.(Enhancer.java:69)
This error is due to an incompatible version of cglib with additional jar files in your project, such as asm.

Solution
The solution is very easy. Just place the suitable version of cglib in your classpath.
A correct dependency will look like this:
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm-util</artifactId>
<version>9.4</version>
</dependency>
Happy Learning !!
Hi, I need help to solve the problem.
Even am also facing the issue while starting of Tomcat 8.5.24 server and received the below error. Can you suggest exact solution for this?
Thanks, it’s working
I am facing the issue while starting of Tomcat 7 server and received the below error. I have tried the suggestion provided by you but it is not working.
Can you please help on priority basis? Thanks
Thanks Lokesh! I was struggling for the jars version mismatch.
Exception in thread "Thread-29" java.lang.IncompatibleClassChangeError: Implemen ting class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 1) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(Webapp ClassLoader.java:2818) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoa der.java:1159) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa der.java:1647) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoa der.java:1526) at au.com.ezidebit.px.PCIServiceStub.getPolicy(PCIServiceStub.java:2419) at au.com.ezidebit.px.PCIServiceStub.populateAxisService(PCIServiceStub. java:57) at au.com.ezidebit.px.PCIServiceStub.(PCIServiceStub.java:204) at au.com.ezidebit.px.PCIServiceStub.(PCIServiceStub.java:193) at au.com.ezidebit.px.PCIServiceStub.(PCIServiceStub.java:241) at au.com.ezidebit.px.PCIServiceStub.(PCIServiceStub.java:233) at com.sapienter.jbilling.server.payment.tasks.EzidebitPaymentTask.proce ss(EzidebitPaymentTask.java:91) at com.sapienter.jbilling.server.process.BillingProcessSessionBean.email AndPayment(BillingProcessSessionBean.java:523) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:202) at $Proxy98.emailAndPayment(Unknown Source) at com.sapienter.jbilling.server.process.BillingProcessSessionBean.proce ssEntity(BillingProcessSessionBean.java:265) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:202) at $Proxy98.processEntity(Unknown Source) at com.sapienter.jbilling.server.process.BillingProcessSessionBean.proce ssEntity(BillingProcessSessionBean.java:777) at com.sapienter.jbilling.server.process.BillingProcessSessionBean.trigg er(BillingProcessSessionBean.java:695) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:309) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo inpoint(ReflectiveMethodInvocation.java:183) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:150) at org.springframework.transaction.interceptor.TransactionInterceptor.in voke(TransactionInterceptor.java:110) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed( ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:202) at $Proxy98.trigger(Unknown Source) at com.sapienter.jbilling.server.util.WebServicesSessionSpringBean$1.run (WebServicesSessionSpringBean.java:2581) at java.lang.Thread.run(Thread.java:662)Have you tried the solution suggested in post?
hi
i chaged a class file which is a part of jar file.
It was compiled and running succesfully in my local but when we deployed from server end it was throwing the below exception.
Exception in thread "main" java.lang.IncompatibleClassChangeError at mapfre.trn.saptron.SapCon.getConexion(SapCon.java:745) at mapfre.trn.saptron.SapCon.getConexion(SapCon.java:714) at mapfre.com.c.GUI.TTextField.lanzaValidacionOracleInterno(TTextField.j ava:3784) at mapfre.com.c.GUI.TTextField.validacionMetodo(TTextField.java:3931) at mapfre.com.c.GUI.TTextField.lanzaValidacion(TTextField.java:3140) at mapfre.trn.utilidades.JMenuTron.preJmenuTron(JMenuTron.java:87) at mapfre.trn.utilidades.JMenuTron.main(JMenuTron.java:73)Can you be specific what change you made? It can be triggered for many reasons such as changing static variable to non-static or vice-versa; declaring a new field which hides any super class field and things like that. Please note that it may trigger even when JVM versions at your local and prod are different.
I am getting this
INFO: Starting service Catalina Apr 30, 2014 4:25:05 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.12 java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521) at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:1956) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1919) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1806) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1765) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1751) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1255) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:882) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:317) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5081) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145) at org.apache.catalina.startup.Catalina.start(Catalina.java:620) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)Problem solved or still facing issue after trying the fix provided in post??
Hi I need help!!!!!! My problem is
I see this for the first time in my life!! Can you help me please?
Check if you configured something like this: https://stackoverflow.com/questions/5714053/how-can-we-redirect-a-java-program-console-output-to-multiple-files