zoukankan      html  css  js  c++  java
  • Caused by: java.lang.NoClassDefFoundError at com.jc.zm.ZmAlarmAction.analyDo(ZmAlarmAction.java:198)

       ZmPlanDayAction objPlanDay = new ZmPlanDayAction();
       objPlanDay.setDao(dao);
       objPlanDay.setServletRequest(req);
       objPlanDay.analy(prcsDate, itemId, "01", id, custId, "01", condId, condName,
        mayQues, contentId, contentName, measure, content, analy);

    运行时,执行到第一行时出现了下面的错误:

    Caused by: java.lang.NoClassDefFoundError at com.jc.zm.ZmAlarmAction.analyDo(ZmAlarmAction.java:198)

    检查发现,ZmPlanDayAction.class 文件存在,后仔细检查发现,原来这些文件在开始的时候就已经出错了,导致了class文件不能执行下去的情况。

    ZmPlanDayAction.java在开头时候的语句错误了。代码如下:

     private static Integer dayPlanFlowId = Integer.parseInt(BaseConfig.getValue("dayPlanFlowId"));
     private static Integer weekPlanFlowId = Integer.parseInt(BaseConfig.getValue("weekPlanFlowId"));
     private static Integer monthPlanFlowId = Integer.parseInt(BaseConfig.getValue("monthPlanFlowId"));
     private static Integer planSumFlowId = Integer.parseInt(BaseConfig.getValue("planSumFlowId"));

    最后一句代码中的 planSumFlowId 这个在配置文件(baseconfig.properties)中的名称为“sumPlanFlowId”,因为找不到该配置项,导致了class文件一开始就错误了。

  • 相关阅读:
    Python-第三方库requests详解
    python读取excel文件
    python 代理
    python urllib 和 urllib2
    HTTPS请求 SSL证书验证
    python requests.exceptions.ConnectionError
    python django -7 Git与项目
    python django -6 常用的第三方包或工具
    python django -5 进阶
    python django -4 模板
  • 原文地址:https://www.cnblogs.com/zmc/p/3170018.html
Copyright © 2011-2022 走看看