4

I'm encountering the following exception after upgrading from jOOQ 3.10 to 3.11:

Caused by: java.lang.ClassNotFoundException: org.jooq.util.JavaGenerator
    at java.net.URLClassLoader.findClass (URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:424)
    at java.lang.ClassLoader.loadClass (ClassLoader.java:357)
    at org.jooq.codegen.GenerationTool.loadClass (GenerationTool.java:819)
    at org.jooq.codegen.GenerationTool.run (GenerationTool.java:329)
    at org.jooq.codegen.GenerationTool.generate (GenerationTool.java:220)
    at org.jooq.codegen.maven.Plugin.execute (Plugin.java:195)

What's the reason for this? Has this class been deleted?

2 Answers 2

5

Reusing org.jooq.util package names in older Java versions

Older jOOQ versions had a package name conflict between the jooq and jooq-meta / jooq-codegen artefacts, which all reused the org.jooq.util package. This was OK in older versions of Java, up to Java 8.

Forward compatibility for Java 9 / JPMS

Under the JPMS, starting with Java 9, this is no longer allowed when running code on the module path (as opposed to the legacy classpath). For forwards compatibility, when jOOQ will be modularised, the offending packages in jooq-meta and jooq-codegen have been renamed: https://github.com/jOOQ/jOOQ/issues/7419

Packages in the following code generation modules now have these prefixes:

  • jooq-meta: org.jooq.meta
  • jooq-meta-extensions: org.jooq.meta.extensions
  • jooq-codegen: org.jooq.codegen
  • jooq-codegen-maven: org.jooq.codegen.maven

The jooq module (the runtime) did not change its package names.

See also

Sign up to request clarification or add additional context in comments.

Comments

0

Replace all

org.jooq.util. 

with

org.jooq.meta.

All done.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.