The hierarchy of the type ‘class name’ is inconsistent

Somehow, this is a tricky compilation error which means that you are implementing a non-existing interface or you are extending a non-existing class.

It appears due one of the following two reasons. First, eclipse got stuck and you need to do is to restart it and rebuild your project. Follow next steps:

  • close eclipse
  • close all java and javaw processes
  • open eclipse and choose Project -> Clean. Be sure clean all projects is checked
  • build the entire workspace

Above steps are valid for any version of eclipse and also for any IDE build on eclipse – eg. IBM Rational Application Developer (RAD) or IBM Rational Software Architect (RSA).

Second, you have in your project a reference to a jar that is not present in the build path and you need to check your build path. Right click on your project -> Properties -> Java Build Path and check Projects and Libraries tabs.

Where to check Java Build Path in Eclipse

In my case I found missing jars under Web App Libraries.

Spread the love
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  

Leave a Reply