网页运行的错误:
HTTP Status 500 - Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
type Exception report
message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:986) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) javax.servlet.http.HttpServlet.service(HttpServlet.java:622) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config org.springframework.web.servlet.support.JstlUtils.exposeLocalizationContext(JstlUtils.java:101) org.springframework.web.servlet.view.JstlView.exposeHelpers(JstlView.java:135) org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1257) org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) javax.servlet.http.HttpServlet.service(HttpServlet.java:622) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause
java.lang.ClassNotFoundException: javax.servlet.jsp.jstl.core.Config org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) org.springframework.web.servlet.support.JstlUtils.exposeLocalizationContext(JstlUtils.java:101) org.springframework.web.servlet.view.JstlView.exposeHelpers(JstlView.java:135) org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:142) org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:303) org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1257) org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037) org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980) org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897) org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970) org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861) javax.servlet.http.HttpServlet.service(HttpServlet.java:622) org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846) javax.servlet.http.HttpServlet.service(HttpServlet.java:729) org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.37 logs.
Apache Tomcat/8.0.37
后台代码:
D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\bin\catalina.bat run
[2016-12-27 01:35:35,443] Artifact springmvcthree:war exploded: Server is not connected. Deploy is not available.
Using CATALINA_BASE: "C:\Users\19644\.IntelliJIdea2016.3\system\tomcat\Unnamed_springmvcthree"
Using CATALINA_HOME: "D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37"
Using CATALINA_TMPDIR: "D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\temp"
Using JRE_HOME: "C:\Program Files\Java\jdk1.8.0_102\jre"
Using CLASSPATH: "D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\bin\bootstrap.jar;D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\bin\tomcat-juli.jar"
2016-12-27 01:35:41 JRebel: Contacting myJRebel server ..
Exception in thread "AsyncFileHandlerWriter-1872034366" 27-Dec-2016 01:35:47.635 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.0.37
27-Dec-2016 01:35:47.641 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 1 2016 10:01:52 UTC
java.lang.NoSuchMethodError: org.apache.juli.AsyncFileHandler._jr$ig$closed(Ljava/lang/Object;)Z
at org.apache.juli.AsyncFileHandler$LogEntry.flush(AsyncFileHandler.java:166)
at org.apache.juli.AsyncFileHandler$LoggerThread.run(AsyncFileHandler.java:146)
27-Dec-2016 01:35:47.643 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number: 8.0.37.0
27-Dec-2016 01:35:47.644 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name: Windows 10
27-Dec-2016 01:35:47.644 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version: 10.0
27-Dec-2016 01:35:47.645 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture: amd64
27-Dec-2016 01:35:47.646 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home: C:\Program Files\Java\jdk1.8.0_102\jre
27-Dec-2016 01:35:47.651 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version: 1.8.0_102-b14
27-Dec-2016 01:35:47.652 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor: Oracle Corporation
27-Dec-2016 01:35:47.653 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE: C:\Users\19644\.IntelliJIdea2016.3\system\tomcat\Unnamed_springmvcthree
27-Dec-2016 01:35:47.653 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME: D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37
27-Dec-2016 01:35:47.654 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Drebel.base=C:\Users\19644\.jrebel
27-Dec-2016 01:35:47.655 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Drebel.env.ide.plugin.version=7.0.1
27-Dec-2016 01:35:47.656 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Drebel.env.ide.version=2016.3.1
27-Dec-2016 01:35:47.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Drebel.env.ide.product=IU
27-Dec-2016 01:35:47.657 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Drebel.env.ide=intellij
27-Dec-2016 01:35:47.658 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Drebel.notification.url=http://localhost:13852
27-Dec-2016 01:35:47.658 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentpath:C:\Users\19644\.IntelliJIdea2016.3\config\plugins\jr-ide-idea\lib\jrebel6\lib\jrebel64.dll
27-Dec-2016 01:35:47.659 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote=
27-Dec-2016 01:35:47.659 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.port=1099
27-Dec-2016 01:35:47.660 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.ssl=false
27-Dec-2016 01:35:47.660 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.management.jmxremote.authenticate=false
27-Dec-2016 01:35:47.661 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.rmi.server.hostname=127.0.0.1
27-Dec-2016 01:35:47.662 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
27-Dec-2016 01:35:47.663 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Users\19644\.IntelliJIdea2016.3\system\tomcat\Unnamed_springmvcthree\conf\logging.properties
27-Dec-2016 01:35:47.664 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
27-Dec-2016 01:35:47.665 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\endorsed
27-Dec-2016 01:35:47.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Users\19644\.IntelliJIdea2016.3\system\tomcat\Unnamed_springmvcthree
27-Dec-2016 01:35:47.666 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37
27-Dec-2016 01:35:47.667 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\temp
27-Dec-2016 01:35:47.667 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded APR based Apache Tomcat Native library 1.2.8 using APR version 1.5.2.
27-Dec-2016 01:35:47.668 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
27-Dec-2016 01:35:48.896 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.2h 3 May 2016)
27-Dec-2016 01:35:49.362 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
27-Dec-2016 01:35:49.423 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
27-Dec-2016 01:35:49.429 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 5223 ms
27-Dec-2016 01:35:49.547 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
27-Dec-2016 01:35:49.547 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.37
27-Dec-2016 01:35:49.583 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-apr-8080"]
27-Dec-2016 01:35:49.641 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
27-Dec-2016 01:35:49.667 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 238 ms
[2016-12-27 01:35:49,909] Artifact springmvcthree:war exploded: Artifact is being deployed, please wait...
Connected to server
27-Dec-2016 01:35:59.598 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\webapps\manager
27-Dec-2016 01:36:01.110 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory D:\TutorialSummary\java\server\apache-tomcat-8.0.37-windows-x64\apache-tomcat-8.0.37\webapps\manager has finished in 1,512 ms
27-Dec-2016 01:36:04.804 INFO [RMI TCP Connection(4)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
27-Dec-2016 01:36:05.032 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization started
27-Dec-2016 01:36:06.380 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing Root WebApplicationContext: startup date [Tue Dec 27 01:36:06 CST 2016]; root of context hierarchy
2016-12-27 01:36:08 JRebel: Monitoring Spring bean definitions in ‘D:\File\Java\IDEA\SpringMVC\springmvcthree\out\artifacts\springmvcthree_war_exploded\WEB-INF\applicationContext.xml‘.
27-Dec-2016 01:36:08.351 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml]
27-Dec-2016 01:36:12.988 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.context.ContextLoader.initWebApplicationContext Root WebApplicationContext: initialization completed in 7955 ms
27-Dec-2016 01:36:13.113 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet ‘dispatcher‘: initialization started
27-Dec-2016 01:36:13.137 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.context.support.XmlWebApplicationContext.prepareRefresh Refreshing WebApplicationContext for namespace ‘dispatcher-servlet‘: startup date [Tue Dec 27 01:36:13 CST 2016]; parent: Root WebApplicationContext
2016-12-27 01:36:13 JRebel: Monitoring Spring bean definitions in ‘D:\File\Java\IDEA\SpringMVC\springmvcthree\out\artifacts\springmvcthree_war_exploded\WEB-INF\dispatcher-servlet.xml‘.
27-Dec-2016 01:36:13.157 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions Loading XML bean definitions from ServletContext resource [/WEB-INF/dispatcher-servlet.xml]
27-Dec-2016 01:36:14.667 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.registerHandler Mapped URL path [/hi/hello] onto handler ‘helloWorld‘
27-Dec-2016 01:36:14.669 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.registerHandler Mapped URL path [/hi/hello.*] onto handler ‘helloWorld‘
27-Dec-2016 01:36:14.671 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping.registerHandler Mapped URL path [/hi/hello/] onto handler ‘helloWorld‘
27-Dec-2016 01:36:15.755 INFO [RMI TCP Connection(4)-127.0.0.1] org.springframework.web.servlet.DispatcherServlet.initServletBean FrameworkServlet ‘dispatcher‘: initialization completed in 2642 ms
[2016-12-27 01:36:15,889] Artifact springmvcthree:war exploded: Artifact is deployed successfully
[2016-12-27 01:36:15,890] Artifact springmvcthree:war exploded: Deploy took 25,981 milliseconds
hello World!
2016-12-27 01:36:39 JRebel: Starting logging to file: C:\Users\19644\.jrebel\jrebel.log
2016-12-27 01:36:39 JRebel:
2016-12-27 01:36:39 JRebel: #############################################################
2016-12-27 01:36:39 JRebel:
2016-12-27 01:36:39 JRebel: JRebel Agent 7.0.1 (201612011351)
2016-12-27 01:36:39 JRebel: (c) Copyright ZeroTurnaround AS, Estonia, Tartu.
2016-12-27 01:36:39 JRebel:
2016-12-27 01:36:39 JRebel: Over the last 1 days JRebel prevented
2016-12-27 01:36:39 JRebel: at least 0 redeploys/restarts saving you about 0 hours.
2016-12-27 01:36:39 JRebel:
2016-12-27 01:36:39 JRebel: Licensed to Zky Zky (using myJRebel).
2016-12-27 01:36:39 JRebel:
2016-12-27 01:36:39 JRebel:
2016-12-27 01:36:39 JRebel: #############################################################
2016-12-27 01:36:39 JRebel:
解决方案:从报错message Handler processing failed; nested exception is java.lang.NoClassDefFoundError: javax/servlet/jsp/jstl/core/Config知道,这个是由于缺少jar包导致。添加jstl的两个jar包。就好了,一个是jstl-1.2.jar另一个是standard-1.1.2.jar。
添加完这两个包后重新编译运行。错误小时,工程能正常运行。