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

Upgrade ehcache dependency as part of Spring Boot migration #383

Closed
wants to merge 13 commits into from
Closed

Upgrade ehcache dependency as part of Spring Boot migration #383

wants to merge 13 commits into from

Conversation

Jenson3210
Copy link
Contributor

testing fix for #376

Jente Sondervorst and others added 2 commits June 28, 2023 20:51
--> java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
@timtebeek timtebeek added the bug Something isn't working label Jun 29, 2023
@timtebeek timtebeek changed the title Issue 376 Upgrade ehcache dependency as part of Spring Boot migration Jun 30, 2023
@timtebeek
Copy link
Contributor

@AlekSimpson would be great if you could see this through! :)

@knutwannheden
Copy link
Contributor

I merged the origin/main branch to see if that fixes the failed build.

@timtebeek
Copy link
Contributor

Tried this again for a bit; switching to a different recipe that only changes the version number, as we're not changing the groupId or artifactId. Now getting a puzzling error

UpdateEhCacheVersionTest > Gradle > addVersionNumber() FAILED
    java.lang.AssertionError: Expected recipe to complete in 1 cycle, but took 0 cycle.
        at org.openrewrite.test.LargeSourceSetCheckingExpectedCycles.afterCycle(LargeSourceSetCheckingExpectedCycles.java:80)
        at org.openrewrite.RecipeScheduler.scheduleRun(RecipeScheduler.java:88)
        at org.openrewrite.Recipe.run(Recipe.java:279)
        at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:341)
        at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:132)
        at org.openrewrite.java.spring.boot3.UpdateEhCacheVersionTest$Gradle.addVersionNumber(UpdateEhCacheVersionTest.java:99)

UpdateEhCacheVersionTest > Maven > addVersionNumber() FAILED
    java.lang.AssertionError: Failed to parse sources or run recipe
        at org.openrewrite.test.RewriteTest.lambda$defaultExecutionContext$10(RewriteTest.java:582)
        at org.openrewrite.test.RewriteTest$$Lambda$463/0x00007fa578262f68.accept(Unknown Source)
        at org.openrewrite.maven.MavenParser.parseInputs(MavenParser.java:92)
        at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:271)
        at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:132)
        at org.openrewrite.test.RewriteTest.rewriteRun(RewriteTest.java:127)
        at org.openrewrite.java.spring.boot3.UpdateEhCacheVersionTest$Maven.addVersionNumber(UpdateEhCacheVersionTest.java:50)

        Caused by:
        java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlElement
            at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:137)
            at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.<init>(JaxbAnnotationIntrospector.java:124)
            at com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.setupModule(JaxbAnnotationModule.java:98)
            at com.fasterxml.jackson.databind.ObjectMapper.registerModule(ObjectMapper.java:879)
            at org.openrewrite.maven.internal.MavenXmlMapper.<clinit>(MavenXmlMapper.java:71)
            at org.openrewrite.maven.internal.RawPom.parse(RawPom.java:107)
            at org.openrewrite.maven.MavenParser.parseInputs(MavenParser.java:75)
            ... 4 more

            Caused by:
            java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlElement
                at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
                at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
                at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:525)
                ... 11 more

@timtebeek
Copy link
Contributor

It looks like Spring Boot again manages a version for Ehcache, now at 3.10.8 in Spring Boot 3.1.3
https://docs.spring.io/spring-boot/docs/current/reference/html/dependency-versions.html
That removes the need for special handling, as users are likely to upgrade directly to 3.1 or 3.2, as support for 3.0 expires this November.

Thanks again for reporting this issue and the attempts to fix it in #383; I don't think we require anything to be done at this point.

@timtebeek timtebeek closed this Sep 14, 2023
@Jenson3210 Jenson3210 deleted the issue_376 branch February 16, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants