java.lang.NoSuchMethodError:com.github.dockerjava.api.command.ExecStartCmd.start in quarkus测试
我正在关注这个quarkus研讨会:并且得到了这个错误 测试容器可能有一些问题,我无法解决。我能够用docker映像运行应用程序,但只有测试失败,出现以下错误 测试日志:java.lang.NoSuchMethodError:com.github.dockerjava.api.command.ExecStartCmd.start in quarkus测试,java,quarkus,testcontainers,Java,Quarkus,Testcontainers,我正在关注这个quarkus研讨会:并且得到了这个错误 测试容器可能有一些问题,我无法解决。我能够用docker映像运行应用程序,但只有测试失败,出现以下错误 测试日志: [INFO] ------------------------------------------------------- [INFO] T E S T S [INFO] ------------------------------------------------------- [INFO] Running io.qu
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running io.quarkus.workshop.superheroes.fight.FightResourceTest
ℹ︎ Checking the system...
✔ Docker version should be at least 1.6.0
✔ Docker environment should have more than 2GB free disk space
[ERROR] Tests run: 7, Failures: 0, Errors: 1, Skipped: 6, Time elapsed: 14.333 s <<< FAILURE! - in io.quarkus.workshop.superheroes.fight.FightResourceTest
[ERROR] shouldGetInitialItems Time elapsed: 0.015 s <<< ERROR!
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
Caused by: java.lang.reflect.InvocationTargetException
Caused by: java.lang.NoSuchMethodError: com.github.dockerjava.api.command.ExecStartCmd.start()Lcom/github/dockerjava/api/async/ResultCallbackTemplate;
[INFO]
[INFO] Results:
[INFO]
[ERROR] Errors:
[ERROR] FightResourceTest.shouldGetInitialItems » Runtime java.lang.reflect.Invocation...
[INFO]
[ERROR] Tests run: 7, Failures: 0, Errors: 1, Skipped: 6
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 17.837 s
[INFO] Finished at: 2020-05-24T12:55:52+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project rest-fight: There are test failures.
[ERROR]
[ERROR] Please refer to /home/dhruv/Programs/javaPrograms/quarkus-super-heroes-workshop/super-heroes/rest-fight/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project rest-fight: There are test failures.
Please refer to /home/dhruv/Programs/javaPrograms/quarkus-super-heroes-workshop/super-heroes/rest-fight/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
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:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
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 jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:566)
at org.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
[信息]-------------------------------------------------------
[信息]
[信息]-------------------------------------------------------
[信息]运行io.quarkus.workshop.Superheros.fight.FightResourceTest
ℹ︎ 正在检查系统。。。
✔ Docker版本应至少为1.6.0
✔ Docker环境应具有超过2GB的可用磁盘空间
[错误]测试运行:7,失败:0,错误:1,跳过:6,经过的时间:14.333 s它来自Quarkus父BOM,将Quarkus.platform.version更改为最新版本。现在是1.12.2
在您的情况下,父quarkus-universe-bom-1.4.2.Final.pom文件具有旧版本的testcontainers
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.12.4</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.12.4</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.12.4</version>
</dependency>
<dependency>
org.testcontainers
测试容器
1.12.4
org.testcontainers
朱尼特朱庇特
1.12.4
org.testcontainers
postgresql
1.12.4
在你的pom文件中,它是最新的版本
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.14.1</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.14.1</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<version>1.14.1</version>
<scope>compile</scope>
</dependency>
org.testcontainers
朱尼特朱庇特
1.14.1
org.testcontainers
postgresql
1.14.1
org.testcontainers
卡夫卡
1.14.1
编译
它来自Quarkus父BOM,请将Quarkus.platform.version更改为最新版本。现在是1.12.2
在您的情况下,父quarkus-universe-bom-1.4.2.Final.pom文件具有旧版本的testcontainers
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers</artifactId>
<version>1.12.4</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.12.4</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.12.4</version>
</dependency>
<dependency>
org.testcontainers
测试容器
1.12.4
org.testcontainers
朱尼特朱庇特
1.12.4
org.testcontainers
postgresql
1.12.4
在你的pom文件中,它是最新的版本
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.14.1</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>postgresql</artifactId>
<version>1.14.1</version>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<version>1.14.1</version>
<scope>compile</scope>
</dependency>
org.testcontainers
朱尼特朱庇特
1.14.1
org.testcontainers
postgresql
1.14.1
org.testcontainers
卡夫卡
1.14.1
编译