






















1. aspectjweaver-1.8 13 jar invalid cen header (invalid zip64 extra data field size)
The aspectjweaver-1.8.13.jar (and similar older versions like 1.8.9) fails with an "Invalid CEN header (invalid zip64 extra data field size)" error when used with modern JDK versions (JDK 11.0.20+, 17.0.8+, 21, and 22+). This is caused by stricter ZIP64 validation checks introduced by Oracle to prevent security vulnerabilities and ensure adherence to the ZIP specification.
To resolve this issue, use one of the following solutions:
-Djdk.util.zip.disableZip64ExtraFieldValidation=truesetenv file.org/aspectj/aspectjweaver/1.8.13 directory from your local .m2/repository and re-running your build to force a fresh download. 2. 配置好idea的jdk后,terminl上运行mvn clean install,报错:
cannot find symbol [ERROR] symbol: variable log
In JDK 25 and other modern Java versions (21+), the Maven error cannot find symbol: variable log is typically caused by Lombok not being compatible with the newer compiler or lacking the required annotation processing configuration.
Core Fixes
<compilerArgs> flag to your maven-compiler-plugin configuration in pom.xml:
xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs>
<arg>-proc:full</arg>
</compilerArgs>
</configuration>
</plugin>
annotationProcessorPaths section of the maven-compiler-plugin:
xml
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.34</version> <!-- Use the latest version for JDK 25 support -->
</path>
</annotationProcessorPaths>
</configuration>
3. [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project api: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTag :: UNKNOWN
The error java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTag :: UNKNOWN typically occurs when you use an outdated version of Lombok with a newer version of the Java Development Kit (JDK).
This specific TypeTag :: UNKNOWN or TypeTags error is triggered because Lombok relies on internal javac APIs that frequently change in newer JDK releases. When Lombok fails to find a specific field (like UNKNOWN) via reflection, it throws this initialization error.
Immediate Solutions
pom.xml (Maven) or build.gradle (Gradle) with the latest version from the Project Lombok website.JAVA_HOME back to Java 8.maven-compiler-plugin version is too old to handle the newer JDK's internal changes. Ensure you are using version 3.10.1 or newer. Summary Checklist
>= 1.18.38 in your build file.release or source/target flags are correctly set for your JDK. 4. dubbo报错:
dubbo Can't create adaptive extension interface org.apache.dubbo.rpc.Protocol, cause: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang"
This error occurs because you are running Apache Dubbo on Java 17 or higher. Starting with JDK 16, Java's module system enforces strong encapsulation, which blocks Dubbo's internal bytecode generator from reflectively accessing ClassLoader.defineClass.
To fix this, you must explicitly allow access to the java.lang package by adding a JVM argument to your application's startup command.
Solution: Add JVM Startup Argument
Add the following flag to your java execution command:
bash
--add-opens=java.base/java.lang=ALL-UNNAMED
Use code with caution.
Implementation by Environment
-jar or main class:java --add-opens=java.base/java.lang=ALL-UNNAMED -jar your-dubbo-app.jar--add-opens=java.base/java.lang=ALL-UNNAMED into the box.pom.xml:
xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>--add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
</configuration>
</plugin>
Use code with caution.
test block in build.gradle:
gradle
test {
jvmArgs '--add-opens', 'java.base/java.lang=ALL-UNNAMED'
}
Use code with cauti
Note: Using the latest stable version of Dubbo (3.x) often improves compatibility, but these --add-opens flags remain the standard workaround for bytecode-heavy frameworks on modern JDKs.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。