Warm tip: This article is reproduced from stackoverflow.com, please click
corda java

An illegal reflective access operation has occurred when runnodes

发布于 2020-04-23 13:09:57

I'm trying to run my corda nodes but I'm facing a strange issue, the nodes are getting started correctly as you can see in the logs

C:\Repositorio\cordapp-template-kotlin\build\nodes>runnodes --log-to-console --logging-level=DEBUG
Starting nodes in C:\Repositorio\cordapp-template-kotlin\build\nodes
Starting corda.jar in C:\Repositorio\cordapp-template-kotlin\build\nodes\Notary on debug port 5005
Starting corda.jar in C:\Repositorio\cordapp-template-kotlin\build\nodes\PartyA on debug port 5006
Starting corda-webserver.jar in C:\Repositorio\cordapp-template-kotlin\build\nodes\PartyA on debug port 5007
Starting corda.jar in C:\Repositorio\cordapp-template-kotlin\build\nodes\PartyB on debug port 5008
Starting corda-webserver.jar in C:\Repositorio\cordapp-template-kotlin\build\nodes\PartyB on debug port 5009
Started 5 processes
Finished starting nodes

Howerver when it opens the 5 consoles to actually run the Web services and the nodes as well, is where it happens.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by Capsule (file:/C:/Repositorio/cordapp-template-kotlin/build/nodes/PartyB/corda.jar) to field com.sun.jmx.mbeanserver.JmxMBeanServer.mbsInterceptor
WARNING: Please consider reporting this to the maintainers of Capsule
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
Listening for transport dt_socket at address: 5008
[quasar] ERROR: java/lang/Thread
java.lang.IllegalArgumentException
        at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.checkFileAndClose(MethodDatabase.java:344)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.checkClass(MethodDatabase.java:324)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.getOrLoadClassEntry(MethodDatabase.java:183)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.isMethodSuspendable0(MethodDatabase.java:194)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.isMethodSuspendable(MethodDatabase.java:161)
        at co.paralleluniverse.fibers.instrument.InstrumentMethod.isSuspendableCall(InstrumentMethod.java:231)
        at co.paralleluniverse.fibers.instrument.LabelSuspendableCallSitesClassVisitor$1.visitMethodInsn(LabelSuspendableCallSitesClassVisitor.java:64)
        at co.paralleluniverse.asm.ClassReader.a(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.b(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.accept(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.accept(Unknown Source)
        at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:123)
        at co.paralleluniverse.fibers.instrument.QuasarInstrumentor.instrumentClass(QuasarInstrumentor.java:94)
        at co.paralleluniverse.fibers.instrument.JavaAgent$Transformer.transform(JavaAgent.java:209)
        at java.instrument/java.lang.instrument.ClassFileTransformer.transform(Unknown Source)
        at java.instrument/sun.instrument.TransformerManager.transform(Unknown Source)
        at java.instrument/sun.instrument.InstrumentationImpl.transform(Unknown Source)
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
        at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
        at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
        at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
[quasar] ERROR: java/lang/Thread
java.lang.IllegalArgumentException
        at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
        at co.paralleluniverse.asm.ClassReader.<init>(Unknown Source)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.checkFileAndClose(MethodDatabase.java:344)
        at co.paralleluniverse.fibers.instrument.MethodDatabase.checkClass(MethodDatabase.java:324)

printscreen of the consoles:
printscreen of the consoles

Has anyone faced the same issue? I don't have a clue how to debug it.

Questioner
Guilherme Flores
Viewed
26
Joel 2018-06-14 03:01

You're running Java 10. Corda is only supported on versions 8u131+ of the Oracle JDK 8 JVM.

You can see the required Java version here: https://docs.corda.net/getting-set-up.html.