The return type is incompatible with JspSourceDependent.getDependants():JasperException问题分析与解决方法
Linux下基于JSP的报表集成到项目中后,显示不出来,查看tomcat的日志。有例如以下报错信息:
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文件里相应代码。例如以下:
package org.apache.jsp.reportPages.jspReport; import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*; public final class fileRecordReport_jsp extends org.apache.jasper.runtime.HttpJspBase
<strong> implements org.apache.jasper.runtime.JspSourceDependent</strong> { private static final javax.servlet.jsp.JspFactory _jspxFactory =
javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; static {
_jspx_dependants = new java.util.HashMap<java.lang.String,java.lang.Long>(1);
_jspx_dependants.put("/WEB-INF/reportConfig/runqianReport4.tld", Long.valueOf(1435203638000L));
} private org.apache.jasper.runtime.TagHandlerPool _005fjspx_005ftagPool_005freport_005fhtml_0026_005fwidth_005fseparator_005fselectText_005fscrollWidth_005fscrollHeight_005fscale_005freportFileName_005fparams_005fneedScroll_005fname_005ffuncBarLocation_005fexceptionPage_005fnobody; private javax.el.ExpressionFactory _el_expressionfactory;
private org.apache.tomcat.InstanceManager _jsp_instancemanager;
<strong>
public java.util.Map<java.lang.String,java.lang.Long> getDependants() {
return _jspx_dependants;
}</strong>
网上搜了搜。大部分原因是因为这个JspSourceDependent类冲突引起的,只是找遍全部WEB-INF/lib和tomcat下的lib以及jre中下有关jsp解析的jar包,除tomcat的lib下。没发现有类似版本号不同反复的jar包。于是在集成开发环境ECLIPSE中打入这个类。竟然能找到这个类。提示自己主动引入后,例如以下:
然后ctrl键盘按住。点击这个类。最终找到了这个类所在的jar包及路径了,例如以下:
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center">
竟然在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解析异常
The return type is incompatible with JspSourceDependent.getDependants():JasperException问题分析与解决方法的更多相关文章
- 使用JFinal的第一个项目出现的问题(The return type is incompatible with JspSourceDependent.getDependants())
四月 08, 2016 4:35:34 下午 org.apache.catalina.core.ApplicationDispatcher invoke严重: Servlet.service() fo ...
- C#中异常:“The type initializer to throw an exception(类型初始值设定项引发异常)”的简单分析与解决方法
对于C#中异常:“The type initializer to throw an exception(类型初始值设定项引发异常)”的简单分析,目前本人分析两种情况,如下: 情况一: 借鉴麒麟.NET ...
- error C4430: missing type specifier - int assumed. Note: C++ does not support default-int 解决方法
在VS2012中生成时出错:error C4430: missing type specifier - int assumed. Note: C++ does not support default- ...
- Type.GetType()在跨程序集反射时返回null的解决方法
在开发中,经常会遇到这种情况,在程序集A.dll中需要反射程序集B.dll中的类型.如果使用稍有不慎,就会产生运行时错误.例如使用Type.GetType("BNameSpace.Class ...
- Dynamics CRM2015 The plug-in type does not exist in the specified assembly问题的解决方法
在用插件工具PluginProfiler调试时,报"The plug-in type xxxx does not exist in the specified assembly" ...
- 关于在调用JAVAFX相关包时遇到Access restriction: The type 'Application' is not API (restriction on required library)的解决方法
点击工具栏的Project->Properties->Java Build Path->Libraries-> 双击第一项 点击Add添加允许javafx 然后就不会报错了
- variable '' of type '' referenced from scope '', but it is not defined 异常解决方法
最近在做一个功能,通过拼接lamdba表达试来实现的功能,但测试时总是出现一个错误,如下图所示,网上也找不到答案,差点都放弃了.. 如上图图所示,我是想通过一个lamdba表达式(上图的IdField ...
- Generic method return type
Here's the Animal class: public class Animal{ private Map<String,Animal> friends =new HashMap& ...
- c++11: trailing return type in functions(函数返回类型后置)
In C++03, the return type of a function template cannot be generalized if the return type relies on ...
随机推荐
- Python之Pandas中Series、DataFrame实践
Python之Pandas中Series.DataFrame实践 1. pandas的数据结构Series 1.1 Series是一种类似于一维数组的对象,它由一组数据(各种NumPy数据类型)以及一 ...
- (求助)对某一颜色,设置透明度 alpha 后,其他使用该颜色的地方 受到影响!!!!原因未知
对某一颜色,设置透明度 alpha 后,其他使用该颜色的地方 受到影响!!!!原因未知,有谁碰到过这样的问题?????? 测试了以下三款手机,结果如下: 1.android 4.4.2: 不受影响 2 ...
- ci框架中model简单的mysql操作
<?php class SingerModel extends CI_Model { function SingerModel() { //会将数据库对象赋值给CI_Controller的db属 ...
- CentOS上oracle 11g R2数据库安装折腾记
1.虚拟机上centos镜像的获取.这里推荐网易镜像站中的CentOS7版本(其他开源镜像站亦可).这里给出链接: http://mirrors.163.com/centos/7.3.1611/iso ...
- 你的宽带ip地址被100.64了吗?
你的宽带ip地址被100.64了吗? 最近需要用外网的时候发现,宿舍路由wan口的ip变成了100.64.X.X,本以为是一个外网的ip,可事实上并不是,并且从外网无法直接访问. 首先,我们都 ...
- MFC_1.2 消息映射宏 数据绑定和交换
消息映射宏 有三个主要的宏 类内声明 DECLARE_MESSAGE_MAP 表示使用消息映射 在CPP文件中使用 BEGIN_MESSAGE_MAP 和 END_MESSAGE_MAP 包含对应的消 ...
- c# 常用 Common
/// <summary> /// md5加密字符串 /// </summary> /// <param name="message">< ...
- 顶点的度 (20 分) Java解法
顶点的度 顶点的图.给定一个有向图,输出各顶点的出度和入度. 输入格式: 输入文件中包含多个测试数据,每个测试数据描述了一个无权有向图.每个测试数据的第一行为两个正整数n 和m,1 ≤ n ≤ 100 ...
- tab下拉显示
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- MAC 打开Chrome打开开发者工具的快捷键
mac下safari和chrome打开开发者工具的快捷键相同,都是 option(alt)+command+i 这个是我的默认配置,没有更改过的.