起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

楼主: qweasdzxc

[结贴] 打包下载

[复制链接]

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-19 17:52:21 | 显示全部楼层
本帖最后由 qweasdzxc 于 2017-5-19 18:33 编辑
jishuang 发表于 2017-5-19 17:42
Cannot read property 'setBizParams' of undefined

justep.Request.setBizParams(url);是5.2的写法,下 ...

1.我现在文件是下载到G:/files,想在JAVA代码里想获取X5所在路径怎么获取?
2.如果有多个文件,代码报错
  1. //不存在
  2. 11111111111111111111111
  3. 2017-05-19 18:21:54 [SQL Time]sql 执行时间:2ms, exec KSQL:  select SA_DocNode,  SA_DocNode.sParentID, SA_DocNode.sDocName, SA_DocNode.sSequence, SA_DocNode.sSize, SA_DocNode.sKind, SA_DocNode.sDocPath, SA_DocNode.sDocDisplayPath, SA_DocNode.sCreatorFID, SA_DocNode.sCreatorName, SA_DocNode.sCreatorDeptName, SA_DocNode.sCreateTime, SA_DocNode.sEditorFID, SA_DocNode.sEditorName, SA_DocNode.sEditorDeptName, SA_DocNode.sLastWriterFID, SA_DocNode.sLastWriterName, SA_DocNode.sLastWriterDeptName, SA_DocNode.sLastWriteTime, SA_DocNode.sFileID, SA_DocNode.sDescription, SA_DocNode.sDocLiveVersionID, SA_DocNode.version, SA_DocNode.sFinishTime, SA_DocNode.sClassification, SA_DocNode.sKeywords, SA_DocNode.sDocSerialNumber, SA_DocNode.sNameSpace, SA_DocNode.sFlag, SA_DocNode.sCacheName, SA_DocNode.sRevisionCacheName  from SA_DocNode SA_DocNode where 1=1 and SA_DocNode.sFlag = 1  and SA_DocNode.sDocPath  ='/defaultDocNameSpace'
  4.   --> sql:SELECT  SA_DocNode.sID, SA_DocNode.sParentID AS sParentID, SA_DocNode.SDOCNAME AS sDocName, SA_DocNode.SSEQUENCE AS sSequence, SA_DocNode.SSIZE AS sSize, SA_DocNode.SKIND AS sKind, SA_DocNode.SDOCPATH AS sDocPath, SA_DocNode.SDOCDISPLAYPATH AS sDocDisplayPath, SA_DocNode.SCREATORFID AS sCreatorFID, SA_DocNode.SCREATORNAME AS sCreatorName, SA_DocNode.SCREATORDEPTNAME AS sCreatorDeptName, SA_DocNode.SCREATETIME AS sCreateTime, SA_DocNode.SEDITORFID AS sEditorFID, SA_DocNode.SEDITORNAME AS sEditorName, SA_DocNode.SEDITORDEPTNAME AS sEditorDeptName, SA_DocNode.SLASTWRITERFID AS sLastWriterFID, SA_DocNode.SLASTWRITERNAME AS sLastWriterName, SA_DocNode.SLASTWRITERDEPTNAME AS sLastWriterDeptName, SA_DocNode.SLASTWRITETIME AS sLastWriteTime, SA_DocNode.SFILEID AS sFileID, SA_DocNode.SDESCRIPTION AS sDescription, SA_DocNode.SDOCLIVEVERSIONID AS sDocLiveVersionID, SA_DocNode.VERSION AS version, SA_DocNode.SFINISHTIME AS sFinishTime, SA_DocNode.SCLASSIFICATION AS sClassification, SA_DocNode.SKEYWORDS AS sKeywords, SA_DocNode.SDOCSERIALNUMBER AS sDocSerialNumber, SA_DocNode.SNAMESPACE AS sNameSpace, SA_DocNode.SFLAG AS sFlag, SA_DocNode.SCACHENAME AS sCacheName, SA_DocNode.SREVISIONCACHENAME AS sRevisionCacheName FROM SA_DocNode SA_DocNode  WHERE  (? = ?) AND (SA_DocNode.SFLAG = ?) AND (SA_DocNode.SDOCPATH = ?)
  5. --> binds:[1, 1, 1, /defaultDocNameSpace]
  6. 2222222222222222222222222
  7. 2017-05-19 18:21:54 excute stream action, params:{"accept":"application/json","action":"downloadAllAction","actionFlag":"__action_0__","activity":"listActivity","contentType":"json","executeContext":"","executor":"","parameters":{"fAssetAccessory":"[{"docID":"C7888D00C0300001C6966FD49BF8D3D0","docName":"组织机构以及用户密码.xlsx","size":"11583","docPath":"/defaultDocNameSpace","fileID":"96-defaultDocNameSpace","time":"2017-05-19T17:57:04.644Z"},{"docID":"C7888D0192A00001A0B41B0019ED67A0","docName":"测试.docx","size":"12946","docPath":"/defaultDocNameSpace","fileID":"97-defaultDocNameSpace","time":"2017-05-19T17:57:04.646Z"},{"docID":"C7888D029AE000013D9E191ACE841AA0","docName":"软件资产库管理_需求规格说明书V1.0(20160603).doc","size":"2732032","docPath":"/defaultDocNameSpace","fileID":"98-defaultDocNameSpace","time":"2017-05-19T17:57:04.649Z"}]"},"process":"/SAM/assetManage/process/assetout/assetoutProcess"}
  8. java.lang.reflect.InvocationTargetException
  9.     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  10.     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  11.     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  12.     at java.lang.reflect.Method.invoke(Method.java:497)
  13.     at com.justep.system.action.Engine.invokeActions(Native Method)
  14.     at com.justep.system.action.Engine.invokeActions(Unknown Source)
  15.     at com.justep.business.server.BusinessServer.doAction(Unknown Source)
  16.     at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
  17.     at com.justep.business.server.BusinessServer.excute(Unknown Source)
  18.     at com.justep.business.server.BusinessServer.excute(Unknown Source)
  19.     at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
  20.     at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
  21.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  22.     at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
  23.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  24.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  25.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  26.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  27.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  28.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  29.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  30.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  31.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  32.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  33.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  34.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  35.     at java.lang.Thread.run(Thread.java:745)
  36. Caused by: java.lang.NullPointerException
  37.     at AssetManage.downloadAll(AssetManage.java:593)
  38.     ... 27 more

复制代码
  1.        public static String downloadAll(String fAssetAccessory){
  2.         Docs docs = new Docs();
  3.         File file = new File("G:/files");
  4.         deleteAllFilesOfDir(file);
  5.         if  (!file .exists()  && !file .isDirectory())      
  6.         {      
  7.             System.out.println("//不存在");  
  8.             file .mkdir();   
  9.         } else   
  10.         {  
  11.             System.out.println("//目录存在");  
  12.         }
  13.         String fileName=null;
  14.         String attachmentInfo = fAssetAccessory;//获取到存储附件信息的字段值
  15.         JSONArray ja = JSONArray.parseArray(attachmentInfo);//把json传转换为JSONArray对象
  16.         for (int i = 0; i < ja.size(); i++) {//解析JSONArray获取具体的附件信息
  17.         JSONObject jsonObject = ja.getJSONObject(i);
  18.                 String docID = jsonObject.getString("docID");
  19.                 String docPath = jsonObject.getString("docPath");
  20.                 System.out.println("11111111111111111111111");
  21.                 if(docID!=null && docPath!=null){
  22.                 com.justep.doc.Doc doc = docs.query(null, docPath, null, null, null).get(docID);
  23.                 System.out.println("2222222222222222222222222");
  24.                 File outPutFile =new File("G:/files/"+doc.getsDocName());
  25.                 System.out.println("333333333333333333333333333333");
  26.                 try {
  27.                     System.out.println("44444444444444444444444444444444");
  28.                     doc.download(new FileOutputStream(outPutFile));
  29.                     System.out.println("555555555555555555555555555555");
  30.                     ZipMultiFile("G:/files/", "G:/files.zip");
  31.                     System.out.println("6666666666666666666666666666666666");
  32.                     fileName="G:/files.zip";
  33.                 } catch (FileNotFoundException e) {
  34.                     // TODO 自动生成的 catch 块
  35.                     e.printStackTrace();

  36.                 } catch (Exception e) {
  37.                     // TODO 自动生成的 catch 块
  38.                     e.printStackTrace();

  39.                 }
  40.                 }
  41.         }
  42.         return fileName;

  43.         
  44.     }
  45.     /** 一次性压缩多个文件,文件存放至一个文件夹中*/
  46.     public static void ZipMultiFile(String filepath ,String zippath) {
  47.         try {
  48.             File file = new File(filepath);// 要被压缩的文件夹
  49.             File zipFile = new File(zippath);
  50.             InputStream input = null;
  51.             ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
  52.             if(file.isDirectory()){
  53.                 File[] files = file.listFiles();
  54.                 for(int i = 0; i < files.length; ++i){
  55.                     input = new FileInputStream(files[i]);
  56.                     zipOut.putNextEntry(new ZipEntry(file.getName() + File.separator + files[i].getName()));
  57.                     int temp = 0;
  58.                     while((temp = input.read()) != -1){
  59.                         zipOut.write(temp);
  60.                     }
  61.                     input.close();
  62.                 }
  63.             }
  64.             zipOut.close();
  65.         } catch (Exception e) {
  66.             e.printStackTrace();
  67.         }
  68.     }
  69.     public static void deleteAllFilesOfDir(File path) {  
  70.         if (!path.exists())  
  71.             return;  
  72.         if (path.isFile()) {  
  73.             path.delete();  
  74.             return;  
  75.         }  
  76.         File[] files = path.listFiles();  
  77.         for (int i = 0; i < files.length; i++) {  
  78.             deleteAllFilesOfDir(files[i]);  
  79.         }  
  80.         path.delete();  
  81.     }  
复制代码


回复 支持 反对

使用道具 举报

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-19 18:35:28 | 显示全部楼层
本帖最后由 qweasdzxc 于 2017-5-19 19:06 编辑
jishuang 发表于 2017-5-19 17:42
Cannot read property 'setBizParams' of undefined

justep.Request.setBizParams(url);是5.2的写法,下 ...

3.多个文件在下图的情况中,我点了前面两个文件的下载没反应,但是可以浏览,最后一个文件的下载报错, 现在我发现不管哪个.w文件,只要是attachmentPC组件下附件都不能下载
2017-05-19 18:32:51 发送请求到文档服务器失败,HTTP/1.1 200 OK
javax.servlet.ServletException: java.lang.RuntimeException: 发送请求到文档服务器失败,HTTP/1.1 200 OK
        at com.justep.ui.servlet.MainServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.justep.portal.filter.RedirectFilter.doFilter(Unknown Source)
        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:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: 发送请求到文档服务器失败,HTTP/1.1 200 OK
        at com.justep.ui.system.service.doc.DocUtils.downLoadDoc(Unknown Source)
        at com.justep.ui.system.service.doc.DocUtils.service(Unknown Source)
        at UploadDoc.doPost(UploadDoc.java:15)
        at UploadDoc.doGet(UploadDoc.java:11)
        at com.justep.ui.impl.JProcessorImpl.execute(Unknown Source)
        at com.justep.ui.JavaServer.runJava(Unknown Source)
        at com.justep.ui.JavaServer.doJ(Unknown Source)
        at com.justep.ui.JavaServer.service(Native Method)
        ... 17 more
Caused by: ClientAbortException:  java.net.SocketException: Software caused connection abort: socket write error
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:369)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:363)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
        ... 25 more
Caused by: java.net.SocketException: Software caused connection abort: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:761)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:363)
        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:785)
        at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:598)
        at org.apache.coyote.Response.doWrite(Response.java:533)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:364)
        ... 30 more
五月 19, 2017 6:32:51 下午 org.apache.catalina.core.StandardWrapperValve invoke
严重: Servlet.service() for servlet main-servlet threw exception
java.net.SocketException: Software caused connection abort: socket write error
        at java.net.SocketOutputStream.socketWrite0(Native Method)
        at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
        at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
        at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:761)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:363)
        at org.apache.coyote.http11.InternalOutputBuffer$OutputStreamOutputBuffer.doWrite(InternalOutputBuffer.java:785)
        at org.apache.coyote.http11.filters.IdentityOutputFilter.doWrite(IdentityOutputFilter.java:118)
        at org.apache.coyote.http11.InternalOutputBuffer.doWrite(InternalOutputBuffer.java:598)
        at org.apache.coyote.Response.doWrite(Response.java:533)
        at org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:364)
        at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
        at org.apache.tomcat.util.buf.ByteChunk.append(ByteChunk.java:363)
        at org.apache.catalina.connector.OutputBuffer.writeBytes(OutputBuffer.java:392)
        at org.apache.catalina.connector.OutputBuffer.write(OutputBuffer.java:381)
        at org.apache.catalina.connector.CoyoteOutputStream.write(CoyoteOutputStream.java:89)
        at com.justep.ui.system.service.doc.DocUtils.downLoadDoc(Unknown Source)
        at com.justep.ui.system.service.doc.DocUtils.service(Unknown Source)
        at UploadDoc.doPost(UploadDoc.java:15)
        at UploadDoc.doGet(UploadDoc.java:11)
        at com.justep.ui.impl.JProcessorImpl.execute(Unknown Source)
        at com.justep.ui.JavaServer.runJava(Unknown Source)
        at com.justep.ui.JavaServer.doJ(Unknown Source)
        at com.justep.ui.JavaServer.service(Native Method)
        at com.justep.ui.servlet.MainServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.justep.portal.filter.RedirectFilter.doFilter(Unknown Source)
        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:127)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:745)


006.png
回复 支持 反对

使用道具 举报

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-19 18:35:48 | 显示全部楼层
qweasdzxc 发表于 2017-5-19 18:35
3.多个文件在下图的情况中,我点了前面三个文件的下载没反应,最后一个文件的下载报错
2017-05-19 18:32: ...

五月 19, 2017 6:32:51 下午 org.apache.catalina.core.ApplicationDispatcher invoke
严重: Servlet.service() for servlet jsp threw exception
java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:611)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:183)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at org.apache.jsp.error_jsp._jspService(error_jsp.java:147)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
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:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
五月 19, 2017 6:32:51 下午 org.apache.catalina.core.StandardHostValve custom
严重: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp]
org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:424)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
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:646)
at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
at org.apache.catalina.connector.Response.getWriter(Response.java:611)
at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:183)
at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
at org.apache.jsp.error_jsp._jspService(error_jsp.java:147)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
... 18 more
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36067
发表于 2017-5-22 09:20:44 | 显示全部楼层
1.如果是获取平台版本目录参考http://docs.wex5.com/bex5-server-question-list-10035/
2.java代码调试跟踪看看报的空指针
Caused by: java.lang.NullPointerException
    at AssetManage.downloadAll(AssetManage.java:593)
3.确认文档服务器启动正确吗?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-22 09:34:38 | 显示全部楼层
本帖最后由 qweasdzxc 于 2017-5-22 10:17 编辑
jishuang 发表于 2017-5-22 09:20
1.如果是获取平台版本目录参考http://docs.wex5.com/bex5-server-question-list-10035/
2.java代码调试跟踪 ...

1.我把文档服务的设置成下图007那样,这样设置正确吗?
2.我现在要是先打包多个文件下载,可是下载下来的有两个文件如图012,之前是点击了图013中下面那个打包下载。现在发现点打包下载不能获得正确的当前行
        var detailData=this.comp("detailData");
        var row=detailData.getCurrentRow();
        debugger
        var fAssetAccessory=row.row.fAssetAccessory.value.latestValue;
        alert(fAssetAccessory);

  1. //目录存在
  2. ja.size():1
  3. docID:C7858B446B40000128941CABC0832C30
  4. docPath:/defaultDocNameSpace
  5. 11111111111111111111111
  6. 2017-05-22 10:10:21 [SQL Time]sql 执行时间:2ms, exec KSQL:  select SA_DocNode,  SA_DocNode.sParentID, SA_DocNode.sDocName, SA_DocNode.sSequence, SA_DocNode.sSize, SA_DocNode.sKind, SA_DocNode.sDocPath, SA_DocNode.sDocDisplayPath, SA_DocNode.sCreatorFID, SA_DocNode.sCreatorName, SA_DocNode.sCreatorDeptName, SA_DocNode.sCreateTime, SA_DocNode.sEditorFID, SA_DocNode.sEditorName, SA_DocNode.sEditorDeptName, SA_DocNode.sLastWriterFID, SA_DocNode.sLastWriterName, SA_DocNode.sLastWriterDeptName, SA_DocNode.sLastWriteTime, SA_DocNode.sFileID, SA_DocNode.sDescription, SA_DocNode.sDocLiveVersionID, SA_DocNode.version, SA_DocNode.sFinishTime, SA_DocNode.sClassification, SA_DocNode.sKeywords, SA_DocNode.sDocSerialNumber, SA_DocNode.sNameSpace, SA_DocNode.sFlag, SA_DocNode.sCacheName, SA_DocNode.sRevisionCacheName  from SA_DocNode SA_DocNode where 1=1 and SA_DocNode.sFlag = 1  and SA_DocNode.sDocPath  ='/defaultDocNameSpace'
  7.   --> sql:SELECT  SA_DocNode.sID, SA_DocNode.sParentID AS sParentID, SA_DocNode.SDOCNAME AS sDocName, SA_DocNode.SSEQUENCE AS sSequence, SA_DocNode.SSIZE AS sSize, SA_DocNode.SKIND AS sKind, SA_DocNode.SDOCPATH AS sDocPath, SA_DocNode.SDOCDISPLAYPATH AS sDocDisplayPath, SA_DocNode.SCREATORFID AS sCreatorFID, SA_DocNode.SCREATORNAME AS sCreatorName, SA_DocNode.SCREATORDEPTNAME AS sCreatorDeptName, SA_DocNode.SCREATETIME AS sCreateTime, SA_DocNode.SEDITORFID AS sEditorFID, SA_DocNode.SEDITORNAME AS sEditorName, SA_DocNode.SEDITORDEPTNAME AS sEditorDeptName, SA_DocNode.SLASTWRITERFID AS sLastWriterFID, SA_DocNode.SLASTWRITERNAME AS sLastWriterName, SA_DocNode.SLASTWRITERDEPTNAME AS sLastWriterDeptName, SA_DocNode.SLASTWRITETIME AS sLastWriteTime, SA_DocNode.SFILEID AS sFileID, SA_DocNode.SDESCRIPTION AS sDescription, SA_DocNode.SDOCLIVEVERSIONID AS sDocLiveVersionID, SA_DocNode.VERSION AS version, SA_DocNode.SFINISHTIME AS sFinishTime, SA_DocNode.SCLASSIFICATION AS sClassification, SA_DocNode.SKEYWORDS AS sKeywords, SA_DocNode.SDOCSERIALNUMBER AS sDocSerialNumber, SA_DocNode.SNAMESPACE AS sNameSpace, SA_DocNode.SFLAG AS sFlag, SA_DocNode.SCACHENAME AS sCacheName, SA_DocNode.SREVISIONCACHENAME AS sRevisionCacheName FROM SA_DocNode SA_DocNode  WHERE  (? = ?) AND (SA_DocNode.SFLAG = ?) AND (SA_DocNode.SDOCPATH = ?)
  8. --> binds:[1, 1, 1, /defaultDocNameSpace]
  9. 2222222222222222222222222测试.docx
  10. 333333333333333333333333333333
  11. 44444444444444444444444444444444
  12. 2017-05-22 10:10:21 [SQL Time]sql 执行时间:1ms, exec KSQL: select SA_DocNameSpace ,SA_DocNode , SA_DocNameSpace.sDisplayName ,SA_DocNameSpace.sUrl,SA_DocNameSpace.sAccessMode,SA_DocNameSpace.sFlag,SA_DocNameSpace.version  from SA_DocNameSpace SA_DocNameSpace OPTIONAL JOIN SA_DocNode SA_DocNode on SA_DocNameSpace = SA_DocNode.sNameSpace where SA_DocNameSpace.sFlag = 1 and SA_DocNode.sFlag = 1 order by SA_DocNameSpace.sDisplayName asc
  13.   --> sql:SELECT  SA_DocNameSpace.sID, SA_DocNode.sID, SA_DocNameSpace.sDisplayName AS sDisplayName, SA_DocNameSpace.SURL AS sUrl, SA_DocNameSpace.SACCESSMODE AS sAccessMode, SA_DocNameSpace.sFlag AS sFlag, SA_DocNameSpace.version AS version FROM SA_DocNameSpace SA_DocNameSpace LEFT JOIN SA_DocNode SA_DocNode ON SA_DocNameSpace.sID = SA_DocNode.SNAMESPACE  WHERE  (SA_DocNameSpace.sFlag = ?) AND (SA_DocNode.SFLAG = ?)   ORDER BY SA_DocNameSpace.sDisplayName ASC
  14. --> binds:[1, 1]
  15. 555555555555555555555555555555
  16. 6666666666666666666666666666666666
  17. 2017-05-22 10:10:22 编码: JUSTEP120033; 提示: 输出Action结果出错
  18. javax.servlet.ServletException: com.justep.biz.client.ActionException: 编码: JUSTEP120033; 提示: 输出Action结果出错
  19.     at com.justep.ui.servlet.MainServlet.service(Unknown Source)
  20.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  21.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  22.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  23.     at com.justep.portal.filter.RedirectFilter.doFilter(Unknown Source)
  24.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  25.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  26.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  27.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  28.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  29.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  30.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  31.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  32.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  33.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  34.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  35.     at java.lang.Thread.run(Thread.java:745)
  36. Caused by: com.justep.biz.client.ActionException: 编码: JUSTEP120033; 提示: 输出Action结果出错
  37.     at com.justep.biz.client.ActionException.create(Unknown Source)
  38.     at com.justep.biz.client.StreamCallback.execute(Unknown Source)
  39.     at com.justep.biz.client.ActionEngine.invokeActions(Unknown Source)
  40.     at com.justep.biz.client.ActionEngine.invokeAction(Unknown Source)
  41.     at DownloadFile.doGet(DownloadFile.java:35)
  42.     at com.justep.ui.impl.JProcessorImpl.execute(Unknown Source)
  43.     at com.justep.ui.JavaServer.runJava(Unknown Source)
  44.     at com.justep.ui.JavaServer.doJ(Unknown Source)
  45.     at com.justep.ui.JavaServer.service(Native Method)
  46.     ... 17 more
  47. Caused by: ClientAbortException:  java.net.SocketException: Software caused connection abort: socket write error
  48.     at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:330)
  49.     at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:296)
  50.     at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  51.     ... 25 more
复制代码




007.png
008.png
009.png
010.png
011.png
012.png
013.png
回复 支持 反对

使用道具 举报

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-22 10:16:28 | 显示全部楼层
qweasdzxc 发表于 2017-5-22 09:34
1.我把文档服务的设置成下图007那样,这样设置正确吗?
2.我现在要是先打包多个文件下载,可是下载下来的 ...
  1. Caused by: java.net.SocketException: Software caused connection abort: socket write error
  2.     at java.net.SocketOutputStream.socketWrite0(Native Method)
  3.     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
  4.     at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
  5.     at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:761)
  6.     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
  7.     at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:318)
  8.     at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:987)
  9.     at org.apache.coyote.Response.action(Response.java:186)
  10.     at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:325)
  11.     ... 27 more
  12. 五月 22, 2017 10:10:22 上午 org.apache.catalina.core.StandardWrapperValve invoke
  13. 严重: Servlet.service() for servlet main-servlet threw exception
  14. java.net.SocketException: Software caused connection abort: socket write error
  15.     at java.net.SocketOutputStream.socketWrite0(Native Method)
  16.     at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
  17.     at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
  18.     at org.apache.coyote.http11.InternalOutputBuffer.realWriteBytes(InternalOutputBuffer.java:761)
  19.     at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:448)
  20.     at org.apache.coyote.http11.InternalOutputBuffer.flush(InternalOutputBuffer.java:318)
  21.     at org.apache.coyote.http11.Http11Processor.action(Http11Processor.java:987)
  22.     at org.apache.coyote.Response.action(Response.java:186)
  23.     at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:325)
  24.     at org.apache.catalina.connector.OutputBuffer.flush(OutputBuffer.java:296)
  25.     at org.apache.catalina.connector.CoyoteOutputStream.flush(CoyoteOutputStream.java:98)
  26.     at com.justep.biz.client.StreamCallback.execute(Unknown Source)
  27.     at com.justep.biz.client.ActionEngine.invokeActions(Unknown Source)
  28.     at com.justep.biz.client.ActionEngine.invokeAction(Unknown Source)
  29.     at DownloadFile.doGet(DownloadFile.java:35)
  30.     at com.justep.ui.impl.JProcessorImpl.execute(Unknown Source)
  31.     at com.justep.ui.JavaServer.runJava(Unknown Source)
  32.     at com.justep.ui.JavaServer.doJ(Unknown Source)
  33.     at com.justep.ui.JavaServer.service(Native Method)
  34.     at com.justep.ui.servlet.MainServlet.service(Unknown Source)
  35.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  36.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  37.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  38.     at com.justep.portal.filter.RedirectFilter.doFilter(Unknown Source)
  39.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  40.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  41.     at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  42.     at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  43.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  44.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  45.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  46.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  47.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  48.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  49.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  50.     at java.lang.Thread.run(Thread.java:745)
  51. 五月 22, 2017 10:10:22 上午 org.apache.catalina.core.ApplicationDispatcher invoke
  52. 严重: Servlet.service() for servlet jsp threw exception
  53. java.lang.IllegalStateException: getOutputStream() has already been called for this response
  54.     at org.apache.catalina.connector.Response.getWriter(Response.java:611)
  55.     at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
  56.     at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
  57.     at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
  58.     at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
  59.     at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:183)
  60.     at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
  61.     at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
  62.     at org.apache.jsp.error_jsp._jspService(error_jsp.java:147)
  63.     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  64.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  65.     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
  66.     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  67.     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  68.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  69.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  70.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  71.     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
  72.     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
  73.     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
  74.     at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
  75.     at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
  76.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
  77.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  78.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  79.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  80.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  81.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  82.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  83.     at java.lang.Thread.run(Thread.java:745)

  84. 五月 22, 2017 10:10:22 上午 org.apache.catalina.core.StandardHostValve custom
  85. 严重: Exception Processing ErrorPage[exceptionType=java.lang.Exception, location=/error.jsp]
  86. org.apache.jasper.JasperException: java.lang.IllegalStateException: getOutputStream() has already been called for this response
  87.     at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:502)
  88.     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:424)
  89.     at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
  90.     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
  91.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  92.     at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  93.     at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  94.     at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646)
  95.     at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:551)
  96.     at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:488)
  97.     at org.apache.catalina.core.StandardHostValve.custom(StandardHostValve.java:416)
  98.     at org.apache.catalina.core.StandardHostValve.throwable(StandardHostValve.java:270)
  99.     at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
  100.     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  101.     at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  102.     at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  103.     at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  104.     at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  105.     at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  106.     at java.lang.Thread.run(Thread.java:745)
  107. Caused by: java.lang.IllegalStateException: getOutputStream() has already been called for this response
  108.     at org.apache.catalina.connector.Response.getWriter(Response.java:611)
  109.     at org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
  110.     at javax.servlet.ServletResponseWrapper.getWriter(ServletResponseWrapper.java:112)
  111.     at org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:125)
  112.     at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:118)
  113.     at org.apache.jasper.runtime.PageContextImpl.release(PageContextImpl.java:183)
  114.     at org.apache.jasper.runtime.JspFactoryImpl.internalReleasePageContext(JspFactoryImpl.java:118)
  115.     at org.apache.jasper.runtime.JspFactoryImpl.releasePageContext(JspFactoryImpl.java:77)
  116.     at org.apache.jsp.error_jsp._jspService(error_jsp.java:147)
  117.     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  118.     at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  119.     at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:388)
  120.     ... 18 more
复制代码
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36067
发表于 2017-5-22 11:13:03 | 显示全部楼层
java.lang.IllegalStateException: getOutputStream() has already been called for this response这个就是标准的报错信息,多次发请求导致的

切换data的记录获取当前行不正确?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-22 11:49:17 | 显示全部楼层
jishuang 发表于 2017-5-22 11:13
java.lang.IllegalStateException: getOutputStream() has already been called for this response这个就是 ...

1.删除文件夹以及文件的方法换过好几个都不能删除干净,导致多次请求,有好的删除方法吗?
2.不正确
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36067
发表于 2017-5-22 13:56:20 | 显示全部楼层
1.File操作文件以及文件夹就是java标准的,可以到网上查找
2.具体怎么切换data记录的?
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
 楼主| 发表于 2017-5-22 14:50:09 | 显示全部楼层
本帖最后由 qweasdzxc 于 2017-5-22 15:04 编辑
jishuang 发表于 2017-5-22 13:56
1.File操作文件以及文件夹就是java标准的,可以到网上查找
2.具体怎么切换data记录的? ...
  1. public static String downloadAll(String fAssetAccessory){
  2.                 Docs docs = new Docs();
  3.                 String fileName=null;
  4.                 String oldPath="G:/files";
  5.         File file = new File(oldPath);
  6.         while(file .exists()  && file .isDirectory()){
  7.                 new AssetManage().deleteFile(file);
  8.         }
  9.         file .mkdir();
  10.         String attachmentInfo = fAssetAccessory;//获取到存储附件信息的字段值
  11.             JSONArray ja = JSONArray.parseArray(attachmentInfo);//把json传转换为JSONArray对象
  12.             System.out.println("ja.size():"+ja.size());
  13.             for (int i = 0; i < ja.size(); i++) {//解析JSONArray获取具体的附件信息
  14.             JSONObject jsonObject = ja.getJSONObject(i);
  15.                     String docID = jsonObject.getString("docID");
  16.                     String docPath = jsonObject.getString("docPath");
  17.                     System.out.println("docID:"+docID);
  18.                     System.out.println("docPath:"+docPath);
  19.                     System.out.println("11111111111111111111111");
  20.                     if(docID!=null && docPath!=null){
  21.                     com.justep.doc.Doc doc = docs.query(null, docPath, null, null, null).get(docID);
  22.                     System.out.println("2222222222222222222222222"+doc.getsDocName());
  23.                     File outPutFile =new File("G:/files/"+doc.getsDocName());
  24.                     System.out.println("333333333333333333333333333333");
  25.                     try {
  26.                             System.out.println("44444444444444444444444444444444");
  27.                                     doc.download(new FileOutputStream(outPutFile));
  28.                                     System.out.println("555555555555555555555555555555");
  29.                                     ZipMultiFile("G:/files/", "G:/downloadfiles.zip");
  30.                                     System.out.println("6666666666666666666666666666666666");
  31.                                     fileName="G:/downloadfiles.zip";
  32.                             } catch (FileNotFoundException e) {
  33.                                     // TODO 自动生成的 catch 块
  34.                                     e.printStackTrace();

  35.                             } catch (Exception e) {
  36.                                     // TODO 自动生成的 catch 块
  37.                                     e.printStackTrace();

  38.                             }
  39.                     }
  40.             }
  41.                 return fileName;

  42.                
  43.         }
  44.         /** 一次性压缩多个文件,文件存放至一个文件夹中*/
  45.     public static void ZipMultiFile(String filepath ,String zippath) {
  46.                 try {
  47.                 File file = new File(filepath);// 要被压缩的文件夹
  48.                 File zipFile = new File(zippath);
  49.                 InputStream input = null;
  50.                 ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFile));
  51.                 if(file.isDirectory()){
  52.                     File[] files = file.listFiles();
  53.                     for(int i = 0; i < files.length; ++i){
  54.                         input = new FileInputStream(files[i]);
  55.                         zipOut.putNextEntry(new ZipEntry(file.getName() + File.separator + files[i].getName()));
  56.                         int temp = 0;
  57.                         while((temp = input.read()) != -1){
  58.                             zipOut.write(temp);
  59.                         }
  60.                         input.close();
  61.                     }
  62.                 }
  63.                 zipOut.close();
  64.                 } catch (Exception e) {
  65.                         e.printStackTrace();
  66.                 }
  67.         }
  68.    
  69.     private void deleteFile(File file) {  
  70.         if (file.exists()) {//判断文件是否存在  
  71.          if (file.isFile()) {//判断是否是文件  
  72.           file.delete();//删除文件   
  73.          } else if (file.isDirectory()) {//否则如果它是一个目录  
  74.           File[] files = file.listFiles();//声明目录下所有的文件 files[];  
  75.           for (int i = 0;i < files.length;i ++) {//遍历目录下所有的文件  
  76.            this.deleteFile(files[i]);//把每个文件用这个方法进行迭代  
  77.           }  
  78.           file.delete();//删除文件夹  
  79.          }  
  80.         } else {  
  81.          System.out.println("所删除的文件不存在");  
  82.         }  
  83.        }

  84.     public static Object downloadAllAction2(String fileName) throws UnsupportedEncodingException {
  85.                 FileInputStream fis = null;
  86.                 String s = java.net.URLDecoder.decode(fileName, "UTF-8");
  87.                 File file = new File(s);
  88.                 if (file.getAbsolutePath().startsWith(file.getAbsolutePath())) {
  89.                         try {
  90.                                 fis = new FileInputStream(file);
  91.                         } catch (FileNotFoundException e) {
  92.                                 throw new RuntimeException("获取文件失败!", e);
  93.                         }
  94.                 } else
  95.                         throw new RuntimeException("获取文件失败,超出获取文件权限范围!");
  96.                 return fis;
  97.         }
复制代码
试了好多次,删除代码执行了(76-82行),就是删不了,现在循环(6-8行)都成死循环了?有时候前2次能正常删除,第3次就死循环了;有时候第一次运行了,第二次就死循环了。能远程帮忙看看嘛?急!!!!!

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-25 04:32 , Processed in 0.060971 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表