继承一个类的时候报错:The hierarchy of the type 'Class name' is inconsistent
来源:互联网 发布:手机投影画画软件 编辑:程序博客网 时间:2024/05/17 06:12
一、问题描述
在开发中,需要集成一个类的时候,发现继承的时候出现错误:The hierarchy of the type 'Class name' is inconsistent,大致意思是类的层次不匹配。
二、原因
因为所集成的类中依赖了其他的类,如ServletRequest,而该类或接口没有在项目中映入,所以会出现此错误。
三、解决办法
在pom.xml中加入支持包
<dependency> <groupId>org.apache.tomcat</groupId> <artifactId>tomcat-servlet-api</artifactId> <version>7.0.8</version> <scope>provided</scope></dependency>注意scope的作用范围,在此只作为支持包就可以了。也可以不用写scope范围。
0 0
- 继承一个类的时候报错:The hierarchy of the type 'Class name' is inconsistent
- eclipse报错之The hierarchy of the type “class name” is inconsistent (jface)
- 继承“JdbcDaoSupport”后,报“The hierarchy of the type AccoutDaoImpl is inconsistent”的解决方案
- 继承“HibernateDaoSupport”后,报“The hierarchy of the type AccoutDaoImpl is inconsistent”的解决方案
- 【填坑】The hierarchy of the type class is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent
- 关于 Eclipse hierarchy of the type is inconsistent错
- java错误:the hierarchy of type "类名" is inconsistent
- 问题解决 The hierarchy of the type is inconsistent
- The hierarchy of the type is inconsistent错误
- 问题解决 The hierarchy of the type is inconsistent
- apache shiro框架的@RequiresRoles 不起作用
- eclipse怎么设置字体大小
- Spring+Springmvc+Mabatis环境搭建
- 104. Maximum Depth of Binary Tree--LeetCode Record
- 一道常被人轻视的前端JS面试题
- 继承一个类的时候报错:The hierarchy of the type 'Class name' is inconsistent
- 使用log.i和Toast.makeText进行Android开发测试
- IOS 同步异步请求JSON数据
- fill_parent、wrap_content和match_parent的区别
- LintCode_128 Hash Function
- sql server 安装错误
- Java 异常处理
- 用黑暗森林模型理解TCP的三次握手
- Java字节序,java整型数与网络字节序 byte[] 数组转换关系