Я обновил версию tomcat до 8.5.51
с 7.0.59
. После этого обновления я получаю исключение при попытке получить доступ к индексу. jsp страница.
SEVERE: Servlet.service() for servlet [jsp] threw exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [24] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
The type index_005f_jsp must implement the inherited abstract method JspSourceImports.getPackageImports()
An error occurred at line: [24] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
The type index_005f_jsp must implement the inherited abstract method JspSourceImports.getClassImports()
An error occurred at line: [38] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
The type Set is not generic; it cannot be parameterized with arguments <String>
An error occurred at line: [40] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
The type Set is not generic; it cannot be parameterized with arguments <String>
An error occurred at line: [43] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
_jspx_imports_packages cannot be resolved to a variable
An error occurred at line: [44] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
_jspx_imports_packages cannot be resolved
An error occurred at line: [64] in the generated java file:
[/home/application_path/work/org/apache/jsp/index_005f_jsp.java]
The type Set is not generic; it cannot be parameterized with arguments <String>
Stacktrace:
at org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
at org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:212)
at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:552)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:381)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:351)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:335)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:597)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:399)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:386)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:330)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:728)
at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:470)
at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:395)
at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:316)
at ActiveServerPkg.ActiveServer.doPost2(ActiveServer.java:1004)
at ActiveServerPkg.ActiveServer.doPost(ActiveServer.java:253)
at ActiveServerPkg.ActiveServer.doGet(ActiveServer.java:245)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:634)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:609)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Разница между созданными файлами сервлетов
с tomcat 7.0.59
public final class index_005f_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent {
с tomcat 8.5.51
public final class index_005f_jsp extends org.apache.jasper.runtime.HttpJspBase
implements org.apache.jasper.runtime.JspSourceDependent,
org.apache.jasper.runtime.JspSourceImports {
JspSourceImports интерфейс получен добавлено в список орудий
Я подумал, что это может быть связано с изменением обратной совместимости кода / синтаксиса в версии, поэтому заменил мой индекс. jsp содержимое простым сообщением Hello World , но проблема все еще остается той же .
Исходное содержимое JSP не может быть передано из-за проблем с политикой org, изменено jsp, смотрите ниже, где я могу воспроизвести эту проблему.
<html>
<body>
<h2>Hello World</h2>
</body>
</html>
java используется версия openjdk version 1.8.0_212
Баночки из папки lib tomcat ...
Список банок, которые доступны в моей папке WEB-INF / lib
activation.jar jackson-annotations-2.10.2.ja ribbon-2.7.17.jar
antlr-complete-3.5.2.jar jackson-core-2.10.2.jar ribbon-archaius-2.7.17.jar
aopalliance-1.0.jar jackson-databind-2.10.2.jar ribbon-core-2.7.17.jar
apache.jar jai_codec.jar ribbon-loadbalancer-2.7.17.jar
archaius-core-0.7.6.jar jai_core.jar ribbon-transport-2.7.17.jar
aspectj-maven-plugin-1.7.jar javassist-3.3.jar security.jar
aspectjweaver-1.8.9.jar javax.batch-api-1.0.jar servo-core-0.10.1.jar
avalon-framework-cvs-20020806.jar javax.persistence-2.1.1.jar servo-internal-0.10.1.jar
batik.jar jboss-logging-3.3.0.Final.jar slf4j-api-1.7.5.jar
bcprov-jdk16-145.jar jce1_2_2.jar slf4j-log4j12-1.6.6.jar
bsf-2.4.0.jar jcert.jar smtp.jar
cglib-3.1.jar jdbc.jar spring-aop-4.3.26.RELEASE.jar
commons-codec-1.10.jar jettison-1.3.7.jar spring-aspects-4.3.26.RELEASE.jar
commons-collections-3.2.2.jar jnet.jar spring-batch-core-4.2.1.RELEASE.jar
commons-configuration-1.8.jar js.jar spring-batch-infrastructure-4.2.1.RELEASE.jar
commons-dbcp-1.3.jar jta-1.1.jar spring-beans-4.3.26.RELEASE.jar
commons-httpclient-3.1.SONATYPE.jar local_policy.jar spring-context-4.3.26.RELEASE.jar
commons-lang-2.4.jar log4j-1.2.17.jar spring-context-support-4.3.26.RELEASE.jar
commons-logging-1.2.jar logback-classic-1.0.12.jar spring-core-4.3.26.RELEASE.jar
commons-net-3.5.jar logback-core-1.0.12.jar spring-expression-4.3.26.RELEASE.jar
commons-pool-1.5.4.jar mailapi.jar spring-jdbc-4.3.26.RELEASE.jar
cryptix-jce-api.jar mail.jar spring-orm-4.3.26.RELEASE.jar
cryptix-jce-compat.jar micrometer-core-1.1.5.jar spring-oxm-4.3.26.RELEASE.jar
cryptix-jce-provider.jar mlibwrapper_jai.jar spring-retry-1.1.2.RELEASE.jar
cryptix-message-api.jar mybatis-3.2.4.jar spring-tx-4.3.26.RELEASE.jar
cryptix-openpgp-provider.jar mybatis-spring-1.2.2.jar spring-web-4.3.26.RELEASE.jar
cryptix-pki-api.jar netflix-commons-util-0.1.1.jar sunjce_provider.jar
dom4j-1.6.1.jar netflix-statistics-0.1.1.jar tag_gen.jar
fop.jar ojdbc7.jar tomcat-jdbc-9.0.22.jar
guava-19.0.jar ostermillerutils_1_07_00.jar velocity-1.6.2.jar
hibernate-commons-annotations-4.0.4.Final.jar poi-3.17.jar xalan200.jar
hibernate-core-4.3.10.Final.jar poi-ooxml-3.17.jar xerces-2.4.0.jar
hibernate-ehcache-4.1.9.Final.jar poi-ooxml-schemas-3.17.jar xmlbeans-2.3.0.jar
hibernate-validator-4.3.0.Final.jar pop3.jar xmlpull-1.1.3.1.jar
imap.jar quartz-2.2.1.jar XmlSchema-1.2.jar
j2ssh.jar quartz-jobs-2.2.1.jar xstream-1.4.11.1.jar
Очищено в Каталог rk, но не повезло: (
Также пробовал решения по ссылкам ниже, но все еще не работает.
Исключение Jasper при использовании Tomcat 9
JSP компиляция завершается с Tomcat 8.0.20. Работает с 8.0.11