设置
- 科达4.6
- 使用Java模板
我一直在尝试在一个事务中添加多达10个小型(1K(zip文件的附件。
使用StartedMockNodes测试时出错:
io.github.classgraph.ClassGraphException: Uncaught exception during scan
at io.github.classgraph.ClassGraphException.newClassGraphException(ClassGraphException.java:89) ~[classgraph-4.8.90.jar:4.8.90]
at io.github.classgraph.ClassGraph.scan(ClassGraph.java:1555) ~[classgraph-4.8.90.jar:4.8.90]
...
Caused by: java.lang.OutOfMemoryError: Java heap space
at nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.readAllBytesWithSpilloverToDisk(NestedJarHandler.java:815) ~[classgraph-4.8.90.jar:4.8.90]
at nonapi.io.github.classgraph.fastzipfilereader.PhysicalZipFile.<init>(PhysicalZipFile.java:161) ~[classgraph-4.8.90.jar:4.8.90]
at nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.downloadJarFromURL(NestedJarHandler.java:576) ~[classgraph-4.8.90.jar:4.8.90]
...
测试使用CordForm构建的本地节点并使用RPC连接时出错:
节点将突然停止。日志中没有错误。在故障节点的目录中,将有两个文件:
- hs_err_pid20400.log
- java_pid20400.hprof
日志文件具有与StartedMockNode故障类似的错误:
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.readAllBytesWithSpilloverToDisk(Ljava/io/InputStream;Ljava/lang/String;JLnonapi/io/github/classgraph/utils/LogNode;)Lnonapi/io/github/classgraph/fileslice/Slice;+65
j nonapi.io.github.classgraph.fastzipfilereader.PhysicalZipFile.<init>(Ljava/io/InputStream;JLjava/lang/String;Lnonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler;Lnonapi/io/github/classgraph/utils/LogNode;)V+25
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.downloadJarFromURL(Ljava/lang/String;Lnonapi/io/github/classgraph/utils/LogNode;)Lnonapi/io/github/classgraph/fastzipfilereader/PhysicalZipFile;+428
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler.access$000(Lnonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler;Ljava/lang/String;Lnonapi/io/github/classgraph/utils/LogNode;)Lnonapi/io/github/classgraph/fastzipfilereader/PhysicalZipFile;+3
j nonapi.io.github.classgraph.fastzipfilereader.NestedJarHandler$4.newInstance(Ljava/lang/String;Lnonapi/io/github/classgraph/utils/LogNode;)Ljava/util/Map$Entry;+124
澄清#1:错误发生在事务执行过程中。当最初使用CordaRPCOps.uploadAttachmentWithMetadata
将文件上载到节点时不会这样做(这很好(。
澄清#2:第一个失败的节点是构建事务的节点。如果尝试重新启动此节点,它将在重新启动时失败。需要重新启动几次才能重新启动和运行。然后,接收事务的任何节点都将失败。它们还需要多次重新启动才能再次运行。作为对Corda Flow框架的证明——在足够多的重启之后,交易最终将成功,附件将被传输。
澄清#3:我可以在执行事务之前将附件预先上传到所有节点,但故障仍然会发生。
StartedMockNodes:
找到这个
将以下内容添加到我的workFlows build.gradle文件中以停止错误:
test {
maxHeapSize = "4096m"
}
本地节点&RPC:
???-还没有找到解决方案