空手道0.9.1-线程"main"中的异常java.lang.StackOverflowError [英] Karate 0.9.1 - Exception in thread "main" java.lang.StackOverflowError
问题描述
当我尝试运行* .feature文件或使用右键单击"(IntelliJ Idea)的单个方案时,我总是收到一个异常:
When I'm trying to run *.feature file or a single scenario with "right-click" (IntelliJ Idea), I've always received an exception:
Exception in thread "main" java.lang.StackOverflowError
at java.util.HashMap.<init>(HashMap.java:457)
at java.util.LinkedHashMap.<init>(LinkedHashMap.java:347)
at java.util.HashSet.<init>(HashSet.java:162)
at java.util.LinkedHashSet.<init>(LinkedHashSet.java:154)
at jdk.nashorn.internal.runtime.ScriptObject$KeyIterator.init(ScriptObject.java:2467)
at jdk.nashorn.internal.runtime.ScriptObject$ScriptObjectIterator.hasNext(ScriptObject.java:2441)
at jdk.nashorn.api.scripting.ScriptObjectMirror$13.call(ScriptObjectMirror.java:368)
at jdk.nashorn.api.scripting.ScriptObjectMirror$13.call(ScriptObjectMirror.java:363)
at jdk.nashorn.api.scripting.ScriptObjectMirror.inGlobal(ScriptObjectMirror.java:858)
at jdk.nashorn.api.scripting.ScriptObjectMirror.entrySet(ScriptObjectMirror.java:363)
at net.minidev.json.reader.JsonWriter$7.writeJSONString(JsonWriter.java:135)
at net.minidev.json.reader.JsonWriter$7.writeJSONString(JsonWriter.java:128)
at com.intuit.karate.JsonUtils$NashornObjectJsonWriter.writeJSONString(JsonUtils.java:77)
at com.intuit.karate.JsonUtils$NashornObjectJsonWriter.writeJSONString(JsonUtils.java:67)
...
如果我使用TestRunner.java运行相同的方案,则效果很好.看起来该问题出在IJ Cucumber插件中. 也许有人对此问题有解决方案或解决方法.
Same scenario works fine if I run with TestRunner.java. Looks like that problem is in IJ cucumber plugin. Maybe someone has a solution or workaround for this issue.
我正在使用空手道0.9.1,黄瓜作为Java插件:v183.4284.148,Idea 2018.3.3
I'm using karate 0.9.1, cucumber for Java plugin: v183.4284.148, Idea 2018.3.3
推荐答案
没有人报告此事-从堆栈跟踪看来,您正在使用的JSON正在打印到控制台-有一些循环引用,也许您正在使用对象引用的Map.但是,是的,我无法解释为什么它在跑步者中可以正常工作.
No one has reported this - and from the stack-trace it looks like some JSON that you are using is being printed to the console - has some circular references, maybe you are using a Map of object references. But yes I can't explain why this works fine in the runner.
您可以按照此处的说明提交示例项目吗,我们可以尝试在IntelliJ中打开它: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
Can you follow the instructions here and submit a sample project, we can try open it in IntelliJ: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue
这是一个循环引用,但是我们已经将其修复为将来很安全.
this was a cyclic reference, but we have fixed it to be safe in future.
这篇关于空手道0.9.1-线程"main"中的异常java.lang.StackOverflowError的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!