一个诡异的错误

 

关于jsp web项目中的javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver错误

分类: javax/el/ELResolver java.lang.ClassNotFoundException: javax.el.ELResolver 566人阅读 评论 (3) 收藏 举报

错误:


javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/el/ELResolver

	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:343)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.NoClassDefFoundError: javax/el/ELResolver

	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	java.net.URLClassLoader.defineClass(Unknown Source)
	java.net.URLClassLoader.access$100(Unknown Source)
	java.net.URLClassLoader$1.run(Unknown Source)
	java.net.URLClassLoader$1.run(Unknown Source)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:220)
	org.apache.jsp.result_jsp._jspInit(result_jsp.java:33)
	org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)

root cause

java.lang.ClassNotFoundException: javax.el.ELResolver

	java.net.URLClassLoader$1.run(Unknown Source)
	java.net.URLClassLoader$1.run(Unknown Source)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.defineClass1(Native Method)
	java.lang.ClassLoader.defineClass(Unknown Source)
	java.security.SecureClassLoader.defineClass(Unknown Source)
	java.net.URLClassLoader.defineClass(Unknown Source)
	java.net.URLClassLoader.access$100(Unknown Source)
	java.net.URLClassLoader$1.run(Unknown Source)
	java.net.URLClassLoader$1.run(Unknown Source)
	java.security.AccessController.doPrivileged(Native Method)
	java.net.URLClassLoader.findClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	java.lang.ClassLoader.loadClass(Unknown Source)
	org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:220)
	org.apache.jsp.result_jsp._jspInit(result_jsp.java:33)
	org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:49)
	org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:180)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:722)


这个错误出现的原因是你把jsp-api.jar和servlet-api.jar这两个jar都加入到了jdk的classpath之中了,解决办法就是把jsp-api.jar删除,
解决问题so easy,妈妈再也不用担心我学java啦。。。

你可能感兴趣的:(错误)