首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在为java.lang.NoSuchMethodError自定义快照设置JUnits时获取SnapLogic

在为java.lang.NoSuchMethodError自定义快照设置JUnits时获取SnapLogic
EN

Stack Overflow用户
提问于 2017-11-24 13:40:39
回答 1查看 113关注 0票数 0

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

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

代码语言:javascript
复制
$ mvn org.apache.maven.plugins:maven-archetype-plugin:2.4:generate -DarchetypeCatalog=http://maven.clouddev.snaplogic.com:8080/nexus/content/repositories/master/

但是,当我构建这个项目时,我会得到以下在JUnit中失败的错误:

代码语言:javascript
复制
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
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-11-27 22:13:21

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

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

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/47474526

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档