java web在进行管理员操作的时候,抛出了下面的异常,怎么解决啊

我把异常贴出来:

HTTP Status 500 - An exception occurred processing JSP page /Admin/adminMember.jsp at line 40
type Exception report

message An exception occurred processing JSP page /Admin/adminMember.jsp at line 40

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

exception

org.apache.jasper.JasperException: An exception occurred processing JSP page /Admin/adminMember.jsp at line 40

37:       </tr>
38:       <tr>
39:         <td height="30" align="center">     
40:             <display:table name="memberList" id="row" pagesize="15" export="true" class="displaytag" requestURI="/Admin/adminMember.do?method=browseMember" >
41:                 <display:column property="loginName" title="${label1}" sortable="true" headerClass="sortable" style="text-align:center;"/>
42:                 <display:column property="memberName" title="${label2}" style="text-align:center;"/>
43:                 <display:column property="memberlevel.levelName" title="${label3}" sortable="true" headerClass="sortable" style="text-align:center;"/>


Stacktrace:
    org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:584)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:466)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    com.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.builder.ToStringBuilder
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:909)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:838)
    org.apache.jsp.Admin.adminMember_jsp._jspService(adminMember_jsp.java:322)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    com.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
root cause

java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.builder.ToStringBuilder
    org.apache.commons.lang.ArrayUtils.toString(ArrayUtils.java:171)
    org.apache.commons.lang.ArrayUtils.toString(ArrayUtils.java:152)
    org.displaytag.export.ExportViewFactory.<init>(ExportViewFactory.java:61)
    org.displaytag.export.ExportViewFactory.getInstance(ExportViewFactory.java:79)
    org.displaytag.tags.TableTag.doStartTag(TableTag.java:709)
    org.apache.jsp.Admin.adminMember_jsp._jspService(adminMember_jsp.java:237)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1085)
    org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:398)
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:241)
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
    org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    com.filter.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:32)
    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.5.9 logs.

Apache Tomcat/8.5.9
0

3个回答

根据报错看,你是缺少一个类。造成这种原因有2种:
1.你未导入Apache common lang jar包
2.你已经导入了这个jar包,但是你的版本不对,可能和其他版本存在冲突,如果是maven可以查看这个jar有多少个,然后排除一个。

1
skyboertao
风姿-懒人 回复qq_40413584: 把老版本排除掉,maven有个pom.xml文件的在里面排除。就可以了
8 个月之前 回复
qq_40413584
qq_40413584 是java web,我觉着应该是版本的问题,请问一下你知道怎么更新吗?
8 个月之前 回复
qq_40413584
qq_40413584 感谢,我去看看
8 个月之前 回复

你的handler找不到对应的方法了 java.lang.NoClassDefFoundError: Could not initialize class org.apache.commons.lang.builder.ToStringBuilder

0
qq_40413584
qq_40413584 回复u012705901: 好的
8 个月之前 回复
u012705901
Rudy2013 回复qq_40413584: 查一下你访问的接口是否有这个方法,或者直接去访问接口,断点看程序是不是有报错
8 个月之前 回复
qq_40413584
qq_40413584 怎么解决啊
8 个月之前 回复

初步判断jsp标签编译运行依赖Apache common lang jar包,加上就行

0
qq_40413584
qq_40413584 感谢,我去试试
8 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!