Bug 49367 - I found a problem,if I use main execute is no problem,but used it in web application,have this problem:
Summary: I found a problem,if I use main execute is no problem,but used it in web appl...
Status: CLOSED FIXED
Alias: None
Product: POI
Classification: Unclassified
Component: POI Overall (show other bugs)
Version: 3.6-FINAL
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: ---
Assignee: POI Developers List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-01 10:18 UTC by zhoushu126
Modified: 2010-06-02 00:59 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description zhoushu126 2010-06-01 10:18:15 UTC
I found a problem,if I use main execute is no problem,but used it in web application,have this problem:
I use poi-3.6-20091214.jar ,can you help me check .thank you!

java.lang.NoSuchMethodError: org.apache.poi.hssf.usermodel.HSSFCell.setCellValue(Lorg/apache/poi/ss/usermodel/RichTextString;)V
	at com.demo.struts.util.ExportExcel.exportExcel(ExportExcel.java:110)
	at com.demo.struts.actions.ChargeFeeAction.exportExcel(ChargeFeeAction.java:335)
	at com.demo.struts.actions.ChargeFeeAction.list(ChargeFeeAction.java:132)
	at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:270)
	at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
	at org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
	at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	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.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
	at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
	at java.lang.Thread.run(Thread.java:619)
Comment 1 David Fisher 2010-06-01 10:28:35 UTC
This is a question that should really start on the user list.

The stack dump is very helpful - struts, spring framework and tomcat are in use.

NoSuchMethod error almost always means a problem with the classpath. For webapps and Tomcat this means that you need to put POI jar files in one of two places:

(1) In the WEB-INF/lib subfolder of your webapps.

(2) In tomcat/shared/lib if Tomcat 5.5 or earlier, or tomcat/lib if Tomcat 6 or more recent.
Comment 2 zhoushu126 2010-06-02 00:59:09 UTC
Thank you for your help,I check you said file path,then found 

(1) In the WEB-INF/lib subfolder of your webapps.

--- this path had exits poi-2.5.1.jar in my webapps,I only delete build path libraries in eclipes program,so poi-2.5.1.jar sill exits webapps in tomcat6.0, I detete all poi-2.5.1.jar in program. is OK

(2) In tomcat/shared/lib if Tomcat 5.5 or earlier, or tomcat/lib if Tomcat 6 or
more recent.

----I think no need this step.

anyway,now is OK thank you again.