首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

java.lang.NoClassDefFoundError: org.apache.log4j.Category

2014-01-26 
小程序如下: %@ page languagejava importorg.globus.gram.Gram % %@ page contentTypetext/htm

小程序如下:
<%@ page language="java" import="org.globus.gram.Gram" %>
<%@ page contentType="text/html" %>
<%
int i=Gram.getActiveJobs();
out.print(i);
%>
import用到的包我已经放到webapps/ROOT/WEB-INF/lib下了,还是出现以下错误,不知道要怎么办```

description: The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: org/apache/log4j/Category
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.test.jobsub_005f2_jsp._jspService(jobsub_005f2_jsp.java:66)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


root cause

java.lang.NoClassDefFoundError: org.apache.log4j.Category
org.apache.jsp.test.jobsub_005f2_jsp._jspService(jobsub_005f2_jsp.java:52)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)

谢谢各位先^^

------解决方法--------------------------------------------------------
没找到的是这个类:org.apache.log4j.Category
跟Tomcat服务器有关
------解决方法--------------------------------------------------------
检查你的那个包里面的相对路径是否正确

        

热点排行