gpt4 book ai didi

java - 为 SnapLogic 自定义快照设置 JUnit 时出现 java.lang.NoSuchMethodError

转载 作者:行者123 更新时间:2023-12-02 02:28:34 25 4
gpt4 key购买 nike

我想在 SnapLogic 中创建自己的快照。

我通过运行以下命令下载了示例项目:

$ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/master/

但是,当我构建此项目时,我收到以下错误,该错误在 JUnit 中失败:

C:\Java\jdk1.8.0_141\bin\java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:53596,suspend=y,server=n -ea -Didea.test.cyclic.buffer.size=1048576 -Dfile.encoding=UTF-8 -classpath C:\Users\kqvx285\AppData\Local\Temp\classpath.jar com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 -junit4 com.snaplogic.snaps.TwoInputsTwoOutputsTest
Connected to the target VM, address: '127.0.0.1:53596', transport: 'socket'

java.lang.NoSuchMethodError: com.snaplogic.snap.api.OutputViewsImpl.add(Lcom/snaplogic/snap/view/OutputView;)

V

at com.snaplogic.snap.test.harness.TestResultImpl.addOutputView(TestResultImpl.java:116)
at com.snaplogic.snap.test.harness.TestSetupImpl.addOutputView(TestSetupImpl.java:393)
at com.snaplogic.snap.test.harness.SnapExecutor.createOutputViewFor(SnapExecutor.java:845)
at com.snaplogic.snap.test.harness.SnapExecutor.evaluate(SnapExecutor.java:426)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

Disconnected from the target VM, address: '127.0.0.1:53596', transport: 'socket'

Process finished with exit code -1

最佳答案

这可能与过时的依赖项有关。您可以尝试删除本地 Maven 存储库中的 com/snaplogic 文件夹,然后重建吗?

例如rm -rf ~/.m2/repository/com/snaplogic/

关于java - 为 SnapLogic 自定义快照设置 JUnit 时出现 java.lang.NoSuchMethodError,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47474526/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com