Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The log4j-transform:process-classes fails when run multiple times #41

Open
ppkarwasz opened this issue May 7, 2023 · 0 comments
Open

Comments

@ppkarwasz
Copy link
Contributor

As reported by @rgoers on the mailing list, the Log4j Maven Transform plugin can fail if if runs multiple times:

I built and ran my test project and it ran fine. However, the first time I ran my project build it failed as below. I ran it several more times and it worked the second time, failed the same way the third time and then worked the few times I ran it again after that.

[ERROR] Failed to execute goal org.apache.logging.log4j:log4j-transform-maven-plugin:0.1.0:process-classes (default) on project customer-engagement-service: Execution default of goal org.apache.logging.log4j:log4j-transform-maven-plugin:0.1.0:process-classes failed:
An API incompatibility was encountered while executing org.apache.logging.log4j:log4j-transform-maven-plugin:0.1.0:process-classes: java.lang.ClassFormatError: Truncated class file
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.logging.log4j:log4j-transform-maven-plugin:0.1.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/rgoers/.m2/repository/org/apache/logging/log4j/log4j-transform-maven-plugin/0.1.0/log4j-transform-maven-plugin-0.1.0.jar
[ERROR] urls[1] = file:/Users/rgoers/.m2/repository/org/apache/logging/log4j/log4j-weaver/0.1.0/log4j-weaver-0.1.0.jar
[ERROR] urls[2] = file:/Users/rgoers/.m2/repository/org/ow2/asm/asm/9.5/asm-9.5.jar
[ERROR] urls[3] = file:/Users/rgoers/.m2/repository/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar
[ERROR] urls[4] = file:/Users/rgoers/.m2/repository/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar
[ERROR] urls[5] = file:/Users/rgoers/.m2/repository/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar
[ERROR] urls[6] = file:/Users/rgoers/.m2/repository/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar
[ERROR] urls[7] = file:/Users/rgoers/.m2/repository/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
[ERROR] urls[8] = file:/Users/rgoers/.m2/repository/org/codehaus/plexus/plexus-utils/3.5.1/plexus-utils-3.5.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
@ppkarwasz ppkarwasz changed the title The log4j-transform:process-classes fails when ran multiple times The log4j-transform:process-classes fails when run multiple times Dec 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant