-
Notifications
You must be signed in to change notification settings - Fork 84
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
java.lang.ClassNotFoundException: jakarta.xml.bind.annotation.XmlSchema #209
Comments
Hm, I cannot reproduce it. It should be pulled in as a transitive dependency. All integration tests and examples are working fine. I'll try to investigate. Thanks for reporting. Do you observe the same thing when running the examples, for exmaple, this one? |
@etiennestuder It does work in the example project 🤔 I will investigate why it's happening with our current setup.. |
@LinkedList What version of Gradle and jOOQ are you using in your real project? |
@etiennestuder
|
Hm, this is not what I'm seeing on my projects nor the example projects. I see:
Do have some dependency rules specifiec? Running your command above with |
Your dependency rule likely comes in via a Note that there is also such a rule in the gradle-jooq-plugin, but it only applies to the jOOQ libraries: |
Not sure if this helps, but my build is experiencing the exact same issue, with the exact same results from dependencyInsight. I'd like to add my build.gradle file to the discussion to see if it sheds any light on the subject.
|
@etiennestuder That seems correct, when I removed spring dependency management, the code generator started working (although my build broke). Upgrading to the latest (1.0.11.RELEASE) still produces the same issue. As a workaround, I just put the plugin into isolation:
|
Yep, as suspected. Thanks for the report, @LinkedList and the additional confirmation @mbrinkg8tr. I'll close this issue now. The gradle-jooq-plugin is applying normal dependency declarations and it is outside of this plugin control what version rules other plugins enforce. |
I've added a section to the README should this come up again for someone. |
Thank you @etiennestuder and @mbrinkg8tr for help analysing this 👍 |
Any workaround for this? |
.\gradlew -q dependencyInsight --configuration jooqGenerator --dependency jakarta.xml.bind-api
jakarta.xml.bind:jakarta.xml.bind-api:2.3.3 (selected by rule)
variant "runtime" [
org.gradle.status = release (not requested)
org.gradle.usage = java-runtime (not requested)
org.gradle.libraryelements = jar (not requested)
org.gradle.category = library (not requested)
]
jakarta.xml.bind:jakarta.xml.bind-api:3.0.0 -> 2.3.3
\--- org.jooq:jooq:3.16.4
+--- org.jooq:jooq-codegen:3.16.4
| \--- jooqGenerator (requested org.jooq:jooq-codegen)
\--- org.jooq:jooq-meta:3.16.4
\--- org.jooq:jooq-codegen:3.16.4 (*)
(*) - dependencies omitted (listed previously) |
@hantsy explicitly adding the version should work
|
@LinkedList Thanks. |
Hi 👋
Since the upgrade to v 7.0 the generator needs explicit dependency to
jakarta.xml.bind:jakarta.xml.bind-api
,I don't know if this is intentional but I couldn't find anything in the README.
the fix is just adding the dependency:
jooqGenerator("jakarta.xml.bind:jakarta.xml.bind-api:3.0.1")
The text was updated successfully, but these errors were encountered: