NutzCN Logo
问答 EXCEL表上传成功,但后台流无法与设置的表绑定
发布于 2547天前 作者 qq_09dec3d3 1445 次浏览 复制 上一个帖子 下一个帖子
标签:
@IocBean
@At("/update")
@Ok("json")
@Fail("http:500")
public class ponmessAction {
    @Inject
	protected Dao dao;
    @At
    @AdaptBy(type = UploadAdaptor.class,  args = { "${base}/uploadTemp", "8192000", "UTF-8", "10"  })
    @SuppressWarnings("CallToPrintStackTrace")
    public Object updatefile(@Param("fileName") TempFile f,HttpSession session) throws SQLException, IOException
    {
   	InputStream in=f.getInputStream();
              程序执行这个语句就跳走报错:                 List<fjtjzl> fjTjzl = J4E.fromExcel(in, fjtjzl.class,null);
                
                
                
		return "ok";
	}
}


17-11-25 00:28:40.327 WARN [http-nio-8084-exec-82] Error@/update/updatefile : java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/Workbook at main.ponmessAction.updatefile(ponmessAction.java:59) at main.ponmessAction$FM$updatefile$ae82f45f3e22a8b64920fd849ab47cc7.invoke(ponmessAction.java) at org.nutz.mvc.impl.processor.MethodInvokeProcessor.process(MethodInvokeProcessor.java:31) at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) at org.nutz.mvc.impl.processor.AdaptorProcessor.process(AdaptorProcessor.java:30) at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) at org.nutz.mvc.impl.processor.ActionFiltersProcessor.process(ActionFiltersProcessor.java:58) at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:123) at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27) at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44) at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15) at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44) at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67) at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31) at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.ClassNotFoundException: org.apache.poi.ss.usermodel.Workbook at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1333) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1167) ... 35 more 17-11-25 00:28:40.301 DEBUG [http-nio-8084-exec-82] Found mapping for [POST] path=/update/updatefile : ponmessAction.updatefile(ponmessAction.java:57) 17-11-25 00:28:40.301 DEBUG [http-nio-8084-exec-82] Get 'ponmessAction'<class main.ponmessAction> 17-11-25 00:28:40.301 DEBUG [http-nio-8084-exec-82] Select Html4 Form upload parser --> /wxthjava/update/updatefile 17-11-25 00:28:40.302 DEBUG [http-nio-8084-exec-82] FastUpload : /update/updatefile 17-11-25 00:28:40.302 DEBUG [http-nio-8084-exec-82] info created 17-11-25 00:28:40.302 DEBUG [http-nio-8084-exec-82] Params map created - 0 params 17-11-25 00:28:40.302 DEBUG [http-nio-8084-exec-82] boundary: -----------------------------7e111828471b52 17-11-25 00:28:40.320 DEBUG [http-nio-8084-exec-82] skip first boundary 17-11-25 00:28:40.320 DEBUG [http-nio-8084-exec-82] Reading... 17-11-25 00:28:40.321 DEBUG [http-nio-8084-exec-82] Upload File info: FilePath=[C:\Users\pc\Desktop\PON口\pon口-obd005\pon口-obd005.xls],fieldName=[fileName] 17-11-25 00:28:40.321 DEBUG [http-nio-8084-exec-82] Upload Info: name=pon口-obd005.xls,content_type=application/vnd.ms-excel 17-11-25 00:28:40.325 DEBUG [http-nio-8084-exec-82] ...Done 58254 bytes readed

这个是什么原因?

2 回复

要加poi相关的jar

老大好牛的,问题解决了,但新问题来了,不规格的EXCEL表,只需要取部分行的数据,对于INPUTSTREAM的EXCEL文档怎么操作?好烦的,帮帮忙,谢谢

添加回复
请先登陆
回到顶部