Maven Project error: Error: java: java.lang.ExceptionInInitializerError

After the import maven project, run the test abnormalities occur: Error: java: java.lang.ExceptionInInitializerError
Query the network, questions the reasons mentioned lombok version of the problem, link: https: //www.cnblogs.com/zhoukedou/p/7007972.html.
An answer that is mentioned is dependent on the presence of conflict maven, maven will re-download the deleted file after the warehouse, still error.
On the subject of other Tip:
> Static block of code and static variables with class loading and loading, loading order of the static variable according to the position of the start of the static variable declarations. So there are two reasons for this exception report:
> 1: Static variables uninitialized class is invoked. This problem occurs when using single-case model, there is also the class static variable, static variable in accordance with the loading sequence is started in accordance with the position of the static variable declaration syntax to initialize static variables are written in the lead after the initialization instance instance, check the static variable initialization sequence can be.
> 2: is a static variable or a static code block during a load or an abnormality. To address this issue, static variables one by one to check the class to find out why a variable initialization failure on the line.
Under the project solution to the problem:
> For lombok, lombok version is too low and does not support java10 above. Https://mvnrepository.com need to query the new version.
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok --> <dependency>
    <groupId>org.projectlombok</groupId>
    <artifactId>lombok</artifactId>
    <version>1.18.4</version>
    <scope>provided</scope>
</dependency>

Guess you like

Origin www.cnblogs.com/jlutiger/p/11058047.html