jklingsporn / vertx-jooq

A jOOQ-CodeGenerator to create vertx-ified DAOs and POJOs.
MIT License
385 stars 53 forks source link

@DataObject can not be enabled #163

Closed zou8944 closed 4 years ago

zou8944 commented 4 years ago

Dear jklingsporn, thanks for supporting @DataObject, but I just can not enable it. according to your readme file, I extend DelegatingVertxGenerator as follow.

class TtpRXReactiveVertxGenerator extends DelegatingVertxGenerator {
  TtpRXReactiveVertxGenerator() {
    super(VertxGeneratorBuilder.init().withRXAPI().withPostgresReactiveDriver().build(new BuildOptions().withBuildFlags(EnumSet.of(BuildOptions.BuildFlag.GENERATE_DATA_OBJECT_ANNOTATION))))
  }
}

when execute the generator, I got following error。

Execution failed for task ':generateJooq'.
> io/github/jklingsporn/vertx/jooq/generate/builder/ComponentBasedVertxGenerator

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':generateJooq'.
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:121)
    at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:117)
    at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:184)
      ......
Caused by: java.lang.IllegalAccessError: io/github/jklingsporn/vertx/jooq/generate/builder/ComponentBasedVertxGenerator
    at TtpRXReactiveVertxGenerator.<init>(/home/floyd/WorkCode/ttp/build.gradle:43)
    at org.jooq.codegen.GenerationTool.run0(GenerationTool.java:379)
    at org.jooq.codegen.GenerationTool.run(GenerationTool.java:222)
    at org.jooq.codegen.GenerationTool.generate(GenerationTool.java:213)

In my opinion, the error is caused by visibility of class ComponentBasedVertxGenerator, it's not public, so I can not access it in my package. Is that right?

jklingsporn commented 4 years ago

Hello and sorry for the late reply. You have probably forgot to include vertx-jooq-generate as a dependency.