2014-11-22 66 views
0

我想使用DisplayTag.jar在基於struts2的應用程序中顯示數據表。我在構建路徑上有displayTag-1.2.jar和commons-beanutils-1.8,但仍然在運行時出現以下異常空白頁面顯示:使用DisplayTag庫的問題

23-nov-2014 0:42:58 org.apache.catalina.core.StandardWrapperValve invoke 
SEVERE: Servlet.service() for servlet default threw exception 
java.lang.ClassNotFoundException: org.apache.commons.beanutils.NestedNullException 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387) 
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) 
    at org.displaytag.tags.TemplateTag.evaluateExpression(TemplateTag.java:84) 
    at org.displaytag.tags.TableTag.initParameters(TableTag.java:932) 
    at org.displaytag.tags.TableTag.doStartTag(TableTag.java:767) 
    at org.apache.jsp.transactionsData_jsp._jspService(transactionsData_jsp.java:121) 
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) 
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) 
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) 
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) 
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:630) 
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) 
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:374) 
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) 
    at org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:139) 
    at org.apache.struts2.dispatcher.StrutsResultSupport.execute(St 

任何人都知道是什麼問題?

+0

solve.Added commons-beanutils-1.7。 – 2014-11-23 00:42:12

回答

0

通過添加commons-beanutils-1.7解決。

0
 
ClassNotFoundException occurs when java doesnt find class files in its classpath. 
class files resides in jars, for this case org.apache.commons.beanutils.NestedNullException class is not found by the JVM, 
Please download the jar from below link and add it to your build path. 
http://commons.apache.org/proper/commons-beanutils/ 
thanks.