• java.lang.ExceptionInInitializerError


    java.lang.ExceptionInInitializerError
    at com.csdhsm.compiler.test.DevTest.testReadInput(DevTest.java:27)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
    at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
    Caused by: java.lang.NullPointerException
    at com.csdhsm.compiler.factory.TypeFactory.<init>(TypeFactory.java:18)
    at com.csdhsm.compiler.utils.CompilerUtil.<clinit>(CompilerUtil.java:31)
    ... 24 more

    今天遇到个异常,ExceptionInInitializerError  ,这个错误是说变量初始化出现问题,后来经过仔细排查,是在静态类中使用了未初始化的变量,导致空指针,才报的这个错。

  • 相关阅读:
    map() 方法
    js冒泡排序
    vmware设置桥接时复制物理网络连接状态是什么意思
    关于http 请求接口,url 末尾需要加斜杠 “/”才能正常访问的情况
    使用fiddler监测java发送 Http请求
    .gitignore 不生效怎么办?
    mybatis 批量更新 报错
    win10设置锁屏时间
    基于JWT机制的单点登录
    mybatis 注解写法 多层嵌套foreach,调用存储过程,批量插入数据
  • 原文地址:https://www.cnblogs.com/a294098789/p/5325486.html
Copyright © 2020-2023  润新知