Eclipse The hierarchy of the type … is inconsisten

I am developing a Spring/Vaadin/Hibernate application.

Everything works but I still have the following error markers in Eclipse STS 2.8.1:

The hierarchy of the type BankView is inconsistent
The hierarchy of the type AbstractEntityView is inconsistent

In my case, I found the The hierarchy of the type ... is inconsistent error in Eclipse being caused by a jar file class from which I was extending my class referencing a class that was not in the build path.

So if you have:

// in other.dep.jar
class FromOtherDepJar {}

// in dep.jar
class FromDepJar extends FromOtherDepJar {}

// in the current project
class ProblematicClass extends FromDepJar {}

If dep.jar is in the project‘s classpath, but other.dep.jar isn‘t, Eclipse will show the The hierarchy of the type ... is inconsistent error.

Take a look at the Problems View in Eclipse, the Description column is more verbose about what the actual problem is than the hover-over.

时间: 2024-12-06 05:55:25

Eclipse The hierarchy of the type … is inconsisten的相关文章

关于The hierarchy of the type TestBeforeAdvice is inconsistent的问题

今天准备写一个spring aop的demo,创建了TestBeforeAdvice类,该类实现了MethodBeforeAdvice接口,eclipse报了"The hierarchy of the type TestBeforeAdvice is inconsistent"的错误. 后百度找到原因:spring-aop.jar要依赖aopalliance.jar,所以需要导入aopalliance.jar. 以后碰到该问题,可考虑是否有依赖的jar未到入.

The hierarchy of the type NsRedisConnectionFactory is inconsistent

The hierarchy of the type is inconsistent 解释为:层次结构的类型不一致 由于我在eclipse里建了两个JAVA PROJECT项目,分别是A projiect和B projiect,项目A引用了一些JAR包,然后项目B引用了项目A,但是B没有引用A的JAR包,就出现了这个问题了 结果在B项目里引用A项目的JAR包就OK了.

The hierarchy of the type GreetingBeforeAdvice is inconsistent

今天照着<spring3.x企业应用开发实战>敲代码时,碰到这个问题,找了一下,发现是缺少jar包引起的问题. The hierarchy of the type GreetingBeforeAdvice is inconsistent 直译的话,是类的层次结构不一致. 怎么理解呢? 当前的类继承于某个类,这个类或者这个类继承的类或者再往上继承的某个类所在的jar包没有被引入. 具体到自己的jar包问题 自己的spring引入jar包有 添加上缺失的jar包 aopalliance-1.0.j

The hierarchy of the type is inconsistent错误问题

在springMVC的AOP 面向切面编程中,引用: package com.ah.aop; import java.lang.reflect.Method; import org.springframework.aop.MethodBeforeAdvice; public class MyMethodBeforeAdvice implements MethodBeforeAdvice { @Override    public void before(Method arg0, Object[]

The hierarchy of the type AnchorTag is inconsistent

在项目开发中需要覆盖某个类,但是在覆盖时遇到了: 这个问题的大概意思也就是AnchorTag类无法继承父类之类的. 可是仔细查看你导入的包后发现并没有错误,那么用以下办法就可以解决了. 解决办法: 如果是MyEclipse的话,右键点击工程目录,Properties->Java Build Path->Libraries->Add Libraries->Myeclipse Libraries(next)->Java EE 5 Libraries应该就OK了. 如果还是不行的话

解决The hierarchy of the type is inconsistent错误

可能的原因:自己的类继承于某个类,这个类或者这个类继承的类或者再往上继承的某个类所在的jar包没有被引入. 例如:使用Spring的AOP时,如果需要继承MethodBeforeAdvice和AfterReturningAdvice类,除了引入Spring的jar包时,还需要引入org.aopalliance.aop的jar包,因为Advice类是这个包里面的,否则在编写Java代码时会报错. 版权声明:本文为博主原创文章,未经博主允许不得转载.

Java:The hierarchy of the type is inconsistent错误

原因一 在继承(extends)/实现(implements) 的某个 类/接口 中,这个类/接口所依赖的其他jar,在本类中不能依赖或者引用. 举例:Class A 继承(extends) Class B ,在Class B中导入了com.jixue.dna.ui.portal.TaskUtil类,而Class A是不能依赖com.jixue.dna.ui.portal.jar包的,所以报错. 原因二 在某个 类/接口 中,所依赖的jar包中依赖另一个jar包,而本类/接口不能依赖另一个jar

Beginning Scala study note(8) Scala Type System

1. Unified Type System Scala has a unified type system, enclosed by the type Any at the top of the hierarchy and the type Nothing at the bottom of the hierarchy. All Scala types inherit from Any. # Using Any, Book extends AnyRef, and x is an Int that

ubuntu安装jdk/eclipse

1.下载JDK 从官网下载jdk8 jdk-8u5-linux-x64.tar.gz 2.解压$ tar -zxvf jdk-8u5-linux-x64.tar.gz解压出来是一个jdk1.8.0_05文件夹3.将文件夹移动到安装目录$ sudo mv jdk1.8.0_05 /usr/local/ 4.配置环境变量 ,更改/etc/profile文件 sudo gedit /etc/profile 在文件最后加上如下几行: export JAVA_HOME=/usr/local/jdk1.8.