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

Versions 0.5.0/0.6.1 fail with error NoClassDefFoundError: org/codehaus/doxia/sink/Sink #116

Closed
cicirello opened this issue Nov 11, 2024 · 9 comments

Comments

@cicirello
Copy link

cicirello commented Nov 11, 2024

Versions 0.5.0 and 0.6.1 fail with following error:

Error injecting: org.hjug.mavenreport.RefactorFirstMavenReport
java.lang.NoClassDefFoundError: org/codehaus/doxia/sink/Sink

My configuration of the plugin from my pom.xml

<plugin>
  <groupId>org.hjug.refactorfirst.plugin</groupId>
  <artifactId>refactor-first-maven-plugin</artifactId>
  <version>0.6.1</version>       
  <configuration>
    <showDetails>true</showDetails>
  </configuration>
  <executions>
    <execution>
      <id>refactor-first</id>
      <phase>test</phase>
      <goals>
        <goal>report</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Note that this was previously working with version 0.4.0.

Other Potentially Relevant Details:

This is for a Java 17 project.

@jimbethancourt
Copy link
Collaborator

Hi @cicirello!
Thank you for your bug report! I noticed that you're using it in several of your repositories - thank you! I'd be happy to try to reproduce the issue locally. There weren't any changes to the Maven Report dependency versions between RefactorFirst versions 0.5.0 and 0.6.1 looking at commit history.

What is the URL of the repository you're having issues with?
What version of Maven are you using? I'm thinking this might play a part in the issue.
What OS are you running on? (though I don't think this will have an impact)

Thanks!
Jim

@cicirello
Copy link
Author

Hi @jimbethancourt yes, I use it in several repositories (great tool by the way). Here are some more details.

It actually appears that I get the same error with 0.5.0. But, 0.4.0 is working fine. I thought that I had actually tried 0.5.0, but I apparently hadn't actually used 0.5.0 after updating to it. So the issue actually appeared in 0.5.0 for me.

Repository:
The repository where I discovered the issue is: https://github.com/cicirello/Chips-n-Salsa

I checked a few others where I use the same plugins, etc, and I get the same error in the following repositories as well.

https://github.com/cicirello/JavaPermutationTools
https://github.com/cicirello/rho-mu
https://github.com/cicirello/core

The last one of the above has the shortest build time of those 4 repositories, and also doesn't have any dependencies other than Maven plug-ins.

I have RefactorFirst configured in a profile. You can activate it with the following to reproduce the error (for any of the above repositories):

mvn clean package -P "analysis"

Operating System: Windows 10

Maven: Apache Maven 3.8.5

Java:
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8)
OpenJDK 64-Bit Server VM Temurin-17.0.2+8 (build 17.0.2+8, mixed mode, sharing)

Thanks,
Vince

@cicirello
Copy link
Author

Hi again @jimbethancourt after my previous reply above, I decided to update Maven to see whether that makes a difference. I still get the same error with Apache Maven 3.9.9.

@cicirello cicirello changed the title Version 0.6.1 fails with error NoClassDefFoundError: org/codehaus/doxia/sink/Sink Versions 0.5.0/0.6.1 fails with error NoClassDefFoundError: org/codehaus/doxia/sink/Sink Nov 16, 2024
@cicirello cicirello changed the title Versions 0.5.0/0.6.1 fails with error NoClassDefFoundError: org/codehaus/doxia/sink/Sink Versions 0.5.0/0.6.1 fail with error NoClassDefFoundError: org/codehaus/doxia/sink/Sink Nov 16, 2024
@jimbethancourt
Copy link
Collaborator

Good news @cicirello! It turns out that the issue is resolved if the doxia-reporting dependencies are upgraded to version 4.0.0. I should be able to cut a release tomorrow. It looks like I need to upgrade a few dependencies with CVSS scores higher than I'm comfortable with as well.

@jimbethancourt
Copy link
Collaborator

And thank you for your kind words!

@cicirello
Copy link
Author

@jimbethancourt great. Thanks for the update.

jimbethancourt added a commit that referenced this issue Nov 17, 2024
- #116 Fixed Doxia issues by upgrading maven-reporting-api and maven-reporting-impl versions
- #119 Updated vulnerable dependencies or excluded their vulnerable transitive dependencies
- Updated Maven api & plugin dependency versions
jimbethancourt added a commit that referenced this issue Nov 17, 2024
@jimbethancourt
Copy link
Collaborator

I just released version 0.6.2 that should fix this problem. It should be available in a few hours and definitely by tomorrow.

@cicirello
Copy link
Author

@jimbethancourt thanks. I tried it out. Works great.

@jimbethancourt
Copy link
Collaborator

Thanks @cicirello! That's great news!

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

2 participants