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 ...
随机推荐
- Android RxJava 2.0中backpressure(背压)概念的理解
英文原文:https://github.com/ReactiveX/RxJava/wiki/Backpressure Backpressure(背压.反压力) 在rxjava中会经常遇到一种情况就是被 ...
- esp8266 SOC方案经过半年沉淀之后再度重启
我发誓这是最后一次玩esp8266,该脱坑了...... 以前看不懂的教程 http://club.gizwits.com/thread-6447-1-1.html 2018教程 http://clu ...
- Python 将中文转拼音
文字转拼音 import os.path class PinYin(object): def __init__(self): self.word_dict = {} def load_word(sel ...
- C++(存储类)经典!!
C++变量的存储类别(动态存储.静态存储.自动变量.寄存器变量.外部变量)动态存储方式与静态存储方式 我们已经了解了变量的作用域.作用域是从空间的角度来分析的,分为全局变量和局部变量. 变量还有另一种 ...
- JVM GC调优一则–增大Eden Space提高性能
缘起 线上有Tomcat升级到7.0.52版,然后有应用的JVM FullGC变频繁,在高峰期socket连接数,Cpu使用率都暴增. 思路 思路是Tomcat本身的代码应该是没有问题的,有问题的可能 ...
- 富士康的盈利秒杀99%的A股公司:3星|《三联生活周刊》2018年10期
三联生活周刊·最美的数学:天才为何成群到来(2018年10期) 本期专题是数学和成都,我都跳过去没看.其他内容也还有点意思. 总体评价3星. 以下是本期一些内容的摘抄,#号后面是kindle电子版中的 ...
- asp.net MVC 和 webForm的区别
asp.net MVC请求过程 ASP.NET MVC框架只是给开发者提供了开发web应用程序的一种选择,并不是要取代Webform这两种技术各有优缺点,开发者需要根据实际情况,选择对应的技术有时候, ...
- spring用来干什么,解决的问题
// 1. 实体类 class User{ } //2. dao class UserDao{ .. 访问db } //3. service class UserService{ UserDao ...
- HDU多校Round 7
Solved:2 rank:293 J. Sequense 不知道自己写的什么东西 以后整数分块直接用 n / (n / i)表示一个块内相同n / i的最大i #include <bits/s ...
- 二叉查找树(Binary Search Tree)
Date:2019-06-25 14:40:32 基本操作 注意:数据量较大时,插入建树的时间复杂度会很高,慎用! //查找 void Search(node *root, int x) { if(r ...