我尝试在Tomcat 8.0.14中部署新的Web应用程序,但每当我点击开始按钮时,我都会反复获取失败 - 无法启动上下文路径/ salamander的应用程序 。其他部署的应用程序运行正常,每当我点击开始按钮。但为什么不申请这个?
网络的XML:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<display-name>Salamander</display-name>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>beytoote</servlet-name>
<servlet-class>site.crawler.servlet.beytoote</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>beytoote</servlet-name>
<url-pattern>/beytoote</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>bartarinha</servlet-name>
<servlet-class>site.crawler.servlet.bartarinha</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>bartarinha</servlet-name>
<url-pattern>/bartarinha</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>akairan</servlet-name>
<servlet-class>site.crawler.servlet.akairan</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>akairan</servlet-name>
<url-pattern>/akairan</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>zoomit</servlet-name>
<servlet-class>site.crawler.servlet.zoomit</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>zoomit</servlet-name>
<url-pattern>/zoomit</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>niksalehi</servlet-name>
<servlet-class>site.crawler.servlet.niksalehi</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>niksalehi</servlet-name>
<url-pattern>/niksalehi</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>persianv</servlet-name>
<servlet-class>site.crawler.servlet.persianv</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>persianv</servlet-name>
<url-pattern>/persianv</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>namnak</servlet-name>
<servlet-class>site.crawler.servlet.namnak</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>namnak</servlet-name>
<url-pattern>/namnak</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>seemorgh</servlet-name>
<servlet-class>site.crawler.servlet.seemorgh</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>seemorgh</servlet-name>
<url-pattern>/seemorgh</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>pardad</servlet-name>
<servlet-class>site.crawler.servlet.pardad</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>pardad</servlet-name>
<url-pattern>/pardad</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>faradeed</servlet-name>
<servlet-class>site.crawler.servlet.faradeed</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>faradeed</servlet-name>
<url-pattern>/faradeed</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>musicema</servlet-name>
<servlet-class>site.crawler.servlet.musicema</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>musicema</servlet-name>
<url-pattern>/musicema</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>bargozideha</servlet-name>
<servlet-class>site.crawler.servlet.bargozideha</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>bargozideha</servlet-name>
<url-pattern>/bargozideha</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>tabnakbato</servlet-name>
<servlet-class>site.crawler.servlet.tabnakbato</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>tabnakbato</servlet-name>
<url-pattern>/tabnakbato</url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>login.html</welcome-file>
</welcome-file-list>
<filter>
<filter-name>RequestLoggingFilter</filter-name>
<filter-class>com.journaldev.servlet.filters.RequestLoggingFilter</filter-class>
</filter>
<filter>
<filter-name>AuthenticationFilter</filter-name>
<filter-class>com.journaldev.servlet.filters.AuthenticationFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>RequestLoggingFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
<filter-mapping>
<filter-name>AuthenticationFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
已更新 catalina.2016-02-28.log 文件:
28-Feb-2016 09:26:44.716 SEVERE [http-nio-8080-exec-63] org.apache.catalina.core.StandardContext.filterStart Exception starting filter AuthenticationFilter
java.lang.UnsupportedClassVersionError: com/journaldev/servlet/filters/AuthenticationFilter : Unsupported major.minor version 52.0 (unable to load class com.journaldev.servlet.filters.AuthenticationFilter)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2454)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:852)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1262)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1145)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:520)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:501)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:120)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:258)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4640)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5247)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1265)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:673)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:221)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:644)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:618)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:537)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
答案 0 :(得分:0)
您的Web应用程序(或者确切地说,com.journaldev.servlet.filters.AuthenticationFilter
类)已编译为Java 8类格式,并且服务器在无法运行Java 8类的Java版本上运行。
升级Tomcat在Java 8上运行的Java版本,或者使用与Tomcat服务器运行的版本兼容的源代码级别编译Java源代码,如How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
中所述