“NoClassDefFoundError: Could not initialize class” error

后端 未结 6 1849
逝去的感伤
逝去的感伤 2020-11-27 12:54

When I run my project, I get numerous outputs of this error:

Sep 9, 2009 8:22:23 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service()         


        
6条回答
  •  醉梦人生
    2020-11-27 13:27

    I had this:

     class Util {
      static boolean isNeverAsync = System.getenv().get("asyncc_exclude_redundancy").equals("yes");
    }
    

    you can probably see the problem, the env var might return null instead of string. So just to test my theory, I changed it to:

     class Util {
      static boolean isNeverAsync = false;
    }
    

    and the problem went away. Too bad that Java can't give you the exact stack trace of the error though, kinda weird.

提交回复
热议问题