https://www.cnblogs.com/mthoutai/p/7136304.html

错误提示:

The return type is incompatible with JspSourceDependent.getDependants()

Stacktrace:] with root cause
 org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: [33] in the generated java file: [/home/programs/apache-tomcat-PowerSupervise/work/Catalina/localhost/PowerSupervise/org/apache/jsp/reportPages/jspReport/fileRecordReport_jsp.java]

大致就是生成的JSP相应的java文件33行报错,解析错误。找到相应的java文件里相应代码。例如以下:

解决办法:

找到冲突jar包,删除或重命名即可。

我删除的是WEB-INF/lib/jasper-runtime.jar

-------------------------------------------原文---------------------------------------

大部分原因是因为这个JspSourceDependent类冲突引起的,只是找遍全部WEB-INF/lib和tomcat下的lib以及jre中下有关jsp解析的jar包,除tomcat的lib下。没发现有类似版本号不同反复的jar包。于是在集成开发环境ECLIPSE中打入这个类。竟然能找到这个类。提示自己主动引入后,例如以下:

然后ctrl键盘按住。点击这个类。最终找到了这个类所在的jar包及路径了,例如以下:

竟然在jetty-server-8.1.8.jar里也有此类,怪不得呢,于是删除了此类,报表恢复正常了。

网上也例如以下情况出现此问题:

1、jsper-runtime.jar存在冲突,删除就可以。

2、在升级tomcat后的项目中,后出现此问题。解决的方法是新建jsp文件。把老jsp文件的内容copy过来。就攻克了。只是这是网友的解决方法,针对这样的情况,个人之见,根本原因还是jar包版本号与旧的已生成的_jsp.java类中的类存在冲突。仅仅需把tomcat的work文件夹下的东西删除重新启动tomcat用新的环境又一次解析JSP就可以。

JasperException问题与解决的方法。the return type is incompatible with,JspSourceDependent.getDependants(),jsper.jar冲突,JSP解析异常

Unable to compile class for JSP的更多相关文章

  1. JSP连接数据库,报Unable to compile class for JSP

    先看一下报错原因: HTTP Status 500 - Unable to compile class for JSP: type Exception report message Unable to ...

  2. org.apache.jasper.JasperException: Unable to compile class for JSP

    项目启动时报错 : The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory S ...

  3. jsp调用javabean出现错误HTTP Status 500 - Unable to compile class for JSP

    HTTP Status 500 - Unable to compile class for JSP:   type Exception report message Unable to compile ...

  4. Count:858org.apache.jasper.JasperException: Unable to compile class for JSP

    1.错误描述 Count:858org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurre ...

  5. Servlet.service() for servlet [jsp] in context with path [/Healthy_manager] threw exception [Unable to compile class for JSP] with root cause java.lang.IllegalArgumentException: Page directive: inval

    严重: Servlet.service() for servlet [jsp] in context with path [/Healthy_manager] threw exception [Una ...

  6. tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案【原创】

    问题描述: tomcat启动后,console正常,console中语句为: 信息: Server startup in 7291 ms   但浏览器访问首页面http://localhost:808 ...

  7. JAVA Drp项目实战—— Unable to compile class for JSP 一波三折

    交代下背景.电脑系统是64位的,用的是64位的Tomcat.安装是32位的Myeclipse10,java环境也是32位的.Tomcat在開始启动时会报这样一个错误,"Can't load ...

  8. JSP Unable to compile class for JSP

    今天刚弄好MyEclipse环境,试了一下jsp的创建,然后就出现了一个很令人纠结的问题. 文档目录如下: Jsp代码如下: <%@page import="com.pd.Person ...

  9. tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案

    转:tomcat启动后,页面浏览时报错 Unable to compile class for JSP的解决方案 检查tomcat与web工程对应版本,tomcat中对应版本的jar包拷贝到web工程 ...

随机推荐

  1. Oracle 日志归档 自动清理

    exp emis/emis@orcl file=d:\backup\oracle\oracle%date:~0,10%.dmp owner=emis log=d:\backup\oracle\orac ...

  2. html内容溢出部分...

    首先标签必须满足不是行内标签 方法一:(单行)此方法没有任何问题 width: 38px;(需要给定宽度) overflow: hidden; white-space: nowrap; text-ov ...

  3. How to CORS enable ArcGIS Server 10.2.1 to Access REST Services without Using proxy.ashx

    http://gis.stackexchange.com/questions/86206/how-to-cors-enable-arcgis-server-10-2-1-to-access-rest- ...

  4. Oracle数据库基础教程

    Oracle基础 简介 数据库实例 表空间 登录身份和角色 用户和授权 数据类型 数据操作 导入数据库 一.Oracle基础: 1.简介 Oracle创建数据库不能像SQL Server那样用一个简单 ...

  5. Android 开发第二步——建立文件

    先以Hello World工程为样板 启动AVD 但在编程过程中遇到了非常棘手的问题 等待下一期完成

  6. mapPartitions

    mapPartitions操作与 map类似,只不过映射的参数由RDD中的每一个元素变成了RDD中每一个分区的迭代器,如果映射过程需要频繁创建额外的对象,使用mapPartitions操作要比map操 ...

  7. centos使用记

    20180404:今天在笔记本上安装了centos6.9,第一次安装的7.4时进不了安装界面,后来下载了6.9版的,可以安装.安装完后启动时出现fail reg的错误,然后提示登陆,不知是用户名为:r ...

  8. node.js 爬虫中文乱码 处理

    爬虫中文乱码可做如下处理 import request from 'superagent'; import cheerio from 'cheerio';//类似jquery写法 const Icon ...

  9. 解决git中文乱码问题

    三条命令fix乱码问题: git config --global gui.encoding utf-8 git config --global i18n.commitencoding utf-8 gi ...

  10. GridEh 当前行

    DataSet当前行,不是当前选中的行 int arow = 0;    arow = cds1->RecNo;    arow = cds1->RecordCount;    arow ...