日期:2014-05-18  浏览次数:20772 次

求助:使用jexcelapi组件的问题[java.lang.NoSuchMethodError: common.Assert.verify(Z)V]
最近在做一个批量导入的项目,用到了jexcelapi组件,我下载的版本是jexcelapi_2_6_4,在本地配置后使用正常,在配置远程服务器时,一运行测试文件就会提示如下错误:
exception  

javax.servlet.ServletException:   common.Assert.verify(Z)V
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.page_005fminput2_jsp._jspService(page_005fminput2_jsp.java:209)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)


root   cause  

java.lang.NoSuchMethodError:   common.Assert.verify(Z)V
jxl.read.biff.SSTRecord.getString(SSTRecord.java:426)
jxl.read.biff.LabelSSTRecord. <init> (LabelSSTRecord.java:56)
jxl.read.biff.SheetReader.read(SheetReader.java:410)
jxl.read.biff.SheetImpl.readSheet(SheetImpl.java:686)
jxl.read.biff.WorkbookParser.getSheet(WorkbookParser.java:252)
org.apache.jsp.page_005fminput2_jsp._jspService(page_005fminput2_jsp.java:106)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

从错误提示好像是common包中的一个方法没有找到,但是一样的配置方法,在本地机器上就没有类似的提示。
请大家帮帮忙,我是一点办法也没有了,tomcat重启了n次,就差重启服务器了。先谢谢大家了!

------解决方案--------------------
export classpath一下
试试