After the integration of JSP-based reports into the project in Linux, the display does not appear, to view the Tomcat log, there are the following error message:
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 @ line: [+] In the generated Java file: [/home/programs/apache-tomcat-powersupervise/work/catalina/lo Calhost/powersupervise/org/apache/jsp/reportpages/jspreport/filerecordreport_jsp.java]
Basically is generated JSP corresponding Java file 33 line error, parse error, find the corresponding Java file corresponding code, as follows:
Package Org.apache.jsp.reportpages.jspreport;import Javax.servlet.*;import Javax.servlet.http.*;import javax.servlet.jsp.*;p ublic 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>
Search on the Internet, most of the reason is due to this jspsourcedependent class conflict, but find all the web-inf/lib and Tomcat under the Lib and the JRE on the JSP parsing jar package, In addition to Tomcat's LIB, there is no similar version of the different duplicate jar package, so in the integrated development environment eclipse into this class, incredibly can find this class, prompting the automatic introduction, as follows:
Then Ctrl-Press and hold, click on this class, finally found the class where the jar package and path, as follows:
Incredibly in the Jetty-server-8.1.8.jar also have this kind of, no wonder, so deleted this class, report back to normal.
This problem occurs on the Internet as well:
1, Jsper-runtime.jar exist conflict, delete can.
2, in the project after upgrading Tomcat, this problem occurs, the solution is to create a new JSP file, the old JSP files copy the contents of the solution. However, this is the solution of the netizen, in view of this situation, personal view, the root cause is still the jar package version and the old generated _jsp.java class in conflict, just put the things in the Tomcat work directory to restart Tomcat with the new environment to re-parse the JSP.
Jasperexception problems and workarounds, the return type is incompatible with,jspsourcedependent.getdependants (), Jsper.jar conflict, JSP parsing exception
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
The return type is incompatible with jspsourcedependent.getdependants (): jasperexception Problem Analysis and solution