Hi,
I have an issue after migrating from version 4.2.1 to 4.3.0+
<project>
<build>
<plugins>
...
<plugin>
<groupId>com.mysema.maven</groupId>
<artifactId>apt-maven-plugin</artifactId>
<version>1.1.3</version>
<dependencies>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
<version>4.3.0</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>process</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/generated-sources/queries</outputDirectory>
<processor>org.springframework.data.mongodb.repository.support.MongoAnnotationProcessor
</processor>
<logOnlyOnError>true</logOnlyOnError>
</configuration>
</execution>
</executions>
</plugin>
...
</plugins>
</build>
</project>
stacktraces:
[INFO] --- apt-maven-plugin:1.1.3:process (default) @ adp-api-s ---
[ERROR] execute error
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.querydsl.apt.DefaultConfiguration.<init>(Ljavax/annotation/processing/RoundEnvironment;Ljava/util/Map;Ljava/util/Collection;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V
at java.util.concurrent.FutureTask.report (FutureTask.java:122)
at java.util.concurrent.FutureTask.get (FutureTask.java:192)
at com.mysema.maven.apt.AbstractProcessorMojo.execute (AbstractProcessorMojo.java:346)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: com.querydsl.apt.DefaultConfiguration.<init>(Ljavax/annotation/processing/RoundEnvironment;Ljava/util/Map;Ljava/util/Collection;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V
at com.sun.tools.javac.main.Main.compile (Main.java:553)
at com.sun.tools.javac.api.JavacTaskImpl.doCall (JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call (JavacTaskImpl.java:138)
at com.sun.tools.javac.api.JavacTaskImpl.call (JavacTaskImpl.java:67)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
Caused by: java.lang.NoSuchMethodError: com.querydsl.apt.DefaultConfiguration.<init>(Ljavax/annotation/processing/RoundEnvironment;Ljava/util/Map;Ljava/util/Collection;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V
at org.springframework.data.mongodb.repository.support.MongoAnnotationProcessor.createConfiguration (MongoAnnotationProcessor.java:58)
at com.querydsl.apt.AbstractQuerydslProcessor.process (AbstractQuerydslProcessor.java:83)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor (JavacProcessingEnvironment.java:802)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs (JavacProcessingEnvironment.java:713)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800 (JavacProcessingEnvironment.java:91)
at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run (JavacProcessingEnvironment.java:1043)
at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing (JavacProcessingEnvironment.java:1184)
at com.sun.tools.javac.main.JavaCompiler.processAnnotations (JavaCompiler.java:1170)
at com.sun.tools.javac.main.JavaCompiler.compile (JavaCompiler.java:856)
at com.sun.tools.javac.main.Main.compile (Main.java:523)
at com.sun.tools.javac.api.JavacTaskImpl.doCall (JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call (JavacTaskImpl.java:138)
at com.sun.tools.javac.api.JavacTaskImpl.call (JavacTaskImpl.java:67)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
at java.lang.Thread.run (Thread.java:748)
Thanks
Yes, this issue was reported (https://github.com/querydsl/querydsl/issues/2545) and a fix is already merged into master and should be published but for some reason is not.
I see there was some problem during the deployment. https://travis-ci.org/github/querydsl/querydsl/builds/667404924
Hopefuly the job will be restarted asap
I received the Dependabot update for Querydsl 4.3.1 with the fix this morning. It pulled both querydsl-jpa
and querydsl-apt
from the repositories just fine. I'm not sure if the failing build is the problem here.
Mind that it always takes a few hours for Maven repositories to synchronise and get up to date. Please try again later today 😄
@jwgmeligmeyling well, alright then the build just looks suspicious but still the solution is to use 4.3.1