• Atitit tomcat 启动报错 ZipException: archive is not a ZIP archive. 1.1. Should sh lib jar err... 1


    Atitit tomcat 启动报错 ZipException: archive is not a ZIP archive.

     

    1.1. ----Should sh lib jar err... 1

    1.2. ----ZipTest   :\0wkspc\hislog\src\main\java\com\attilax\compress\ZipTest.java 1

    1.3. ----Result 2

    1.4. ---使用bcomparejar库同步tomcat 发布历史目录tmp0----下面的库即可果然很多jar体积都变成91了。奇怪 3

     

    1.1. ----Should sh lib jar err...

     

    Test the jar  final String dir = "C:\\0wkspc\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\honurse\\WEB-INF\\lib";

     

     

    1.2. ----ZipTest   :\0wkspc\hislog\src\main\java\com\attilax\compress\ZipTest.java

    package com.attilax.compress;

    import java.io.File;

    import java.io.IOException;

    import org.apache.commons.io.FileUtils;

    import org.apache.log4j.Logger;

    import com.attilax.io.DirTraveService;

    import com.attilax.io.PathService;

    import com.attilax.util.timestampUtil;

    import com.cnhis.cloudhealth.module.log.Cls1;

    import com.google.common.base.Function;

    public class ZipTest {

    public static Logger logger = Logger.getLogger(ZipTest.class);

    public static void main(String[] args) {

    DirTraveService dts=new DirTraveService();

    //final String dir = "C:\\0wkspc\\移动医疗源码\\移动医护\\移动护士站\\honurse\\holib";

    final String dir = "C:\\0wkspc\\.metadata\\.plugins\\org.eclipse.wst.server.core\\tmp0\\wtpwebapps\\honurse\\WEB-INF\\lib";

    dts.trave_throwEx(dir, new Function<File, Object>() {

    @Override

    public Object apply(File arg0) {

     

    String f = arg0.getAbsolutePath();

    logger.info("arg0:"+f);

    if(f.toLowerCase().trim().endsWith(".jar"))

    {

    System.out.println(ZipUtil. unzip_filelist(f));

    }

    return null;

    }

    }, new Function<Integer, Object>() {

    @Override

    public Object apply(Integer cnt_index) {

    //Map m=Maps.newConcurrentMap();m.put("index", cnt_index)

    logger.info("cnt_index:"+cnt_index);

    return null;

    }});

    }

     

     

     

    1.3. ----Result

     

     <arg0:C:\0wkspc\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\honurse\WEB-INF\lib\apache-solr-core-3.6.1.jar>

    Exception in thread "main" java.lang.RuntimeException: java.util.zip.ZipException: archive is not a ZIP archive

    at com.attilax.util.ExUtil.throwExV2(ExUtil.java:59)

    at com.attilax.compress.ZipUtil.unzip_filelist(ZipUtil.java:177)

    at com.attilax.compress.ZipTest$1.apply(ZipTest.java:34)

    at com.attilax.compress.ZipTest$1.apply(ZipTest.java:1)

    at com.attilax.io.DirTraveService.trave_throwEx(DirTraveService.java:110)

    at com.attilax.compress.ZipTest.main(ZipTest.java:25)

    Caused by: java.util.zip.ZipException: archive is not a ZIP archive

    at org.apache.tools.zip.ZipFile.positionAtEndOfCentralDirectoryRecord(ZipFile.java:771)

    at org.apache.tools.zip.ZipFile.positionAtCentralDirectory(ZipFile.java:707)

    at org.apache.tools.zip.ZipFile.populateFromCentralDirectory(ZipFile.java:452)

    at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:214)

    at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:190)

    at org.apache.tools.zip.ZipFile.<init>(ZipFile.java:162)

    at com.attilax.compress.ZipUtil.unzip_filelist(ZipUtil.java:158)

     

     

    1.4. ---使用bcomparejar库同步tomcat 发布历史目录tmp0----下面的库即可果然很多jar体积都变成91了。奇怪

  • 相关阅读:
    PHP数据库备份文件分卷导入的实现思路
    用delphi如何实现启动停止windows服务
    【创意logo】第23个世界无烟日 让烟草远离女性
    修改“windows xp资源管理器”的默认打开路径
    PHP百行代码快速构建简易聊天室
    简单的方法实现判断Mysql内某个字段Fields是否存在
    Blackhand的插件管理部分
    PHP 与 ASP.NET 正面交锋
    C语言运算符
    功能齐全的发送邮件类
  • 原文地址:https://www.cnblogs.com/attilax/p/15197627.html
Copyright © 2020-2023  润新知