java.lang.IncompatibleClassChangeError: Implementing class

Stack Overflow | Ftapia23 | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    failed to start Context, TOMCAT 8

    Stack Overflow | 8 months ago | Ftapia23
    java.lang.IncompatibleClassChangeError: Implementing class
  2. 0

    My code compiles fine and my app deploys to Tomcat 8 but I'm getting the following error in my Tomcat localhost log when the app attempts to start. Any ideas on how to resolve this (or even how to get further debug info for where the issue is)? I have enabled FINE logging on the localhost log and found several other filters starting with no exceptions (see below updated log output). Why is the struts2 filter specifically having issues and all of these other filters aren't? Also as a test, I commented out the struts2 filter (org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter for me) and the application installs and starts with no issues. So, the problem is certainly localized to the struts2 filter. from my tomcat localhost log... {noformat} 13-Jul-2016 16:22:34.847 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.listenerStart Sending application start events 13-Jul-2016 16:22:35.225 INFO [http-nio-8080-exec-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext 13-Jul-2016 16:22:36.224 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filters 13-Jul-2016 16:22:36.224 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filter 'ApplicationInitFilter' 13-Jul-2016 16:22:53.465 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filter 'monitoring' 13-Jul-2016 16:22:53.846 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filter 'Tomcat WebSocket (JSR356) Filter' 13-Jul-2016 16:22:53.846 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filter 'springSecurityFilterChain' 13-Jul-2016 16:22:53.848 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filter 'javamelody' 13-Jul-2016 16:22:53.848 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Starting filter 'struts2' 13-Jul-2016 16:22:54.534 SEVERE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter struts2 java.lang.IncompatibleClassChangeError: Implementing class at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2541) at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:858) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2541) at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:858) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1301) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1166) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildClassFinder(PackageBasedActionConfigBuilder.java:416) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:397) at org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:354) at org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:274) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) at org.apache.struts2.dispatcher.Dispatcher.getContainer(Dispatcher.java:970) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:438) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:482) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) 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:4689) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5329) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1092) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:473) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1612) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:300) at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1451) at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:897) at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:335) at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) 13-Jul-2016 16:22:54.541 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStop Stopping filters 13-Jul-2016 16:22:54.541 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStop Stopping filter 'ApplicationInitFilter' 13-Jul-2016 16:22:54.564 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStop Stopping filter 'monitoring' 13-Jul-2016 16:22:54.781 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStop Stopping filter 'Tomcat WebSocket (JSR356) Filter' 13-Jul-2016 16:22:54.781 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStop Stopping filter 'javamelody' 13-Jul-2016 16:22:54.781 FINE [http-nio-8080-exec-1] org.apache.catalina.core.StandardContext.filterStop Stopping filter 'springSecurityFilterChain' 13-Jul-2016 16:22:54.781 INFO [http-nio-8080-exec-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext {noformat}

    Apache's JIRA Issue Tracker | 10 months ago | Zack Macomber
    java.lang.IncompatibleClassChangeError: Implementing class
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Spring学习心得(三)——注解装配 - JAVA语言 - 木鱼驿站[ITfish]

    itfish.net | 1 year ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\zhiyuan.lv\myspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\MySpringMVC\WEB-INF\classes\service\UserService.class]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class
  5. 0

    Spring学习心得(3)——注解装配 - 软件架构设计

    myexception.cn | 1 year ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\zhiyuan.lv\myspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\MySpringMVC\WEB-INF\classes\service\UserService.class]; nested exception is java.lang.IncompatibleClassChangeError: class org.springframework.core.type.classreading.ClassMetadataReadingVisitor has interface org.springframework.asm.ClassVisitor as super class

    41 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IncompatibleClassChangeError

      Implementing class

      at java.lang.ClassLoader.defineClass1()
    2. Java RT
      SecureClassLoader.defineClass
      1. java.lang.ClassLoader.defineClass1(Native Method)
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      3. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      3 frames
    3. Glassfish Core
      WebappClassLoaderBase.loadClass
      1. org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2560)
      2. org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:859)
      3. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1302)
      4. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
      4 frames
    4. Java RT
      SecureClassLoader.defineClass
      1. java.lang.ClassLoader.defineClass1(Native Method)
      2. java.lang.ClassLoader.defineClass(ClassLoader.java:763)
      3. java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
      3 frames
    5. Glassfish Core
      WebappClassLoaderBase.loadClass
      1. org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2560)
      2. org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:859)
      3. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1302)
      4. org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167)
      4 frames
    6. Struts 2 Convention Plugin
      ClasspathPackageProvider.loadPackages
      1. org.apache.struts2.convention.PackageBasedActionConfigBuilder.findActions(PackageBasedActionConfigBuilder.java:390)
      2. org.apache.struts2.convention.PackageBasedActionConfigBuilder.buildActionConfigs(PackageBasedActionConfigBuilder.java:347)
      3. org.apache.struts2.convention.ClasspathPackageProvider.loadPackages(ClasspathPackageProvider.java:53)
      3 frames
    7. XWork
      ConfigurationManager.getConfiguration
      1. com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:268)
      2. com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67)
      2 frames
    8. Struts2
      StrutsListener.contextInitialized
      1. org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:445)
      2. org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:489)
      3. org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74)
      4. org.apache.struts2.dispatcher.ng.listener.StrutsListener.contextInitialized(StrutsListener.java:46)
      4 frames
    9. Glassfish Core
      HostConfig$DeployWar.run
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
      2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
      3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      4. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
      5. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
      6. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
      7. org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:940)
      8. org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1816)
      8 frames
    10. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      2. java.util.concurrent.FutureTask.run(FutureTask.java:266)
      3. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      5. java.lang.Thread.run(Thread.java:745)
      5 frames