java.lang.ClassNotFoundException:org.jooq.util.JavaGenerator [英] java.lang.ClassNotFoundException: org.jooq.util.JavaGenerator

查看:224
本文介绍了java.lang.ClassNotFoundException:org.jooq.util.JavaGenerator的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从jOOQ 3.10升级到3.11后,我遇到以下异常:

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)

这是什么原因?

推荐答案

重用 org.jooq.util 较旧的Java版本中的软件包名称



较旧的jOOQ版本在 jooq 和<$ c $之间存在软件包名称冲突c> jooq-meta / jooq-codegen 伪像,它们全部重用了 org.jooq.util 包。在较早的Java版本(直到Java 8)中都可以。

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.

在JPMS中,从Java 9开始,在模块路径(与传统类路径相对)上运行代码时,不再允许这样做。为了实现向前兼容性,请在<$ c $中使用将jOOQ模块化。 c> jooq-meta 和 jooq-codegen 已重命名:
https://github.com/jOOQ/jOOQ/issues/7419

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

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

jooq 模块(运行时)未更改其程序包名称。

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

  • https://github.com/jOOQ/jOOQ/issues/7419
  • https://github.com/etiennestuder/gradle-jooq-plugin/issues/71
  • https://groups.google.com/forum/#!topic/jooq-user/-ILukM1EvlM
  • https://groups.google.com/forum/#!topic/jooq-user/CRFH6qhh8Rk

这篇关于java.lang.ClassNotFoundException:org.jooq.util.JavaGenerator的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆