IDEA新建SpringMVC项目报错解决办法

网页运行的错误:

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。

添加完这两个包后重新编译运行。错误小时,工程能正常运行。

时间: 2024-09-30 06:48:13

IDEA新建SpringMVC项目报错解决办法的相关文章

最新版ADT新建项目报错解决办法(三)

自从在谷歌官网下载了最新版的ADT,版本号version:23.0.2.1259578,集成版的(adt-bundle-windows-x86-20140702.rar).笔者就走上了与报错斗争的道路,新建项目时总无故报错,提示内容为: [2014-12-11 09:46:50 - test] E:\workspace\test\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found

使用Android Studio打开eclipse项目以及打开网上下载的studio项目报错解决办法

第一次使用markdown来写博客,不熟悉使用markdown用法的可以参考视频教程(http://edu.csdn.net/course/detail/508/) 下面来介绍一下标题的题目,之前刚接触Android Studio也是一头雾水,在此写下来和大家分享:] (一) . Andriod Studio下载网址:http://www.androiddevtools.cn/(好多最新开发工具)可以找到最新的稳定版本的zip压缩包,解压后就可以直接用,关联之前本地的SDK即可. (二). St

SpringMVC版本报错解决办法

报错代码: 1 <?xml version="1.0" encoding="UTF-8"?> 2 <beans xmlns="http://www.springframework.org/schema/beans" 3 xmlns:context="http://www.springframework.org/schema/context" 4 xmlns:xsi="http://www.w3.or

cocos2dx 2.2.3 xcode5.0,新建mac项目报错

cocos2dx 2.2.3 xcode5.0,新建mac项目报错 Undefined symbols for architecture x86_64: "cocos2d::extension::LabelReader::createInstance()", referenced from: cocos2d::extension::GUIReader::GUIReader() in GUIReader.o "cocos2d::extension::ButtonReader::

quick3.3final版创建项目报错解决

quick3.3final版创建项目报错解决 今天新下载了quick3.3final版,于是安装,创建项目,打开player新建项目如下图 然后点击创建,就发生了如下错误,相信应该有不少朋友会碰到的 首先,这里有两个错误 1.PHP Notice:  Undefined index: extracmd in /Users/wangmeng/Documents/quick-3.3/quick/bin/lib/quick/ProjectCreator.php on line 117 这是117行有未

PHP多次调用Mysql存储过程报错解决办法

PHP多次调用Mysql数据库的存储过程会出现问题,主要问题为存储过程中执行多次SQL语句不能一一释放导致的,网上找了一些解决办法,比如使用 multi_query 然后一个一个释放,但是发现根本不适合我们的项目,我们使用CI框架写的,更多的是使用CI的数据库处理方法.所以只能另辟蹊径. 一次偶然,把Mysql链接方式改成了mysqli,两种不同的PHP连接mysql的扩展,官方在高版本中推荐使用mysqli,结果却奇迹般好了,使用Mysql长连接也行,天意么? PHP多次调用Mysql存储过程

Tomcat启动报错java.net.AbstractPlainSocketImpl(java/net/AbstractPlainSocketImpl.java:178:-1)Struts在网络复杂情况下启动报错解决办法

SSH项目 在网络复杂的情况(具体规律未知)下,Tomcat启动时,报如下错误: [ERROR] 2014-08-12 14:52:58,484 [org.apache.struts2.dispatcher.Dispatcher :27] - Dispatcher initialization failedUnable to load configuration. - Class: java.net.AbstractPlainSocketImplFile: AbstractPlainSocket

Spring集成JPA配置懒加载两个报错解决办法

一:报错no session 因为entitymanager对象在事物提交后就关闭了 报错的 no session相当于sql的session 解决办法:解决办法 在web.xmL配置一个过滤器 使其在这个session中的manager在结束后再关闭open <!--配置openmanager--> <filter> <filter-name>openEntity</filter-name> <filter-class>org.springfr

springboot x.x.x RELEASE pom 第一行报错解决办法

springboot x.x.x RELEASE pom 第一行报错解决办法 在pom.xml 文件的properties中加入maven jar插件的版本号 <properties> <maven-jar-plugin.version>3.1.1</maven-jar-plugin.version> </properties> 再在项目右键maven ,update project 更新项目即可 原文地址:https://www.cnblogs.com/Y