Can I surpress gremlin console's warnings?

How can I surpress these WARNING messages? I've tried gremlin -l but can't seem to get the syntax right because it seems to have no effect when I do gremlin -l ERROR
% gremlin
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/apache-tinkerpop-gremlin-console-3.6.2/lib/groovy-2.5.15-indy.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
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

\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
% gremlin
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/local/apache-tinkerpop-gremlin-console-3.6.2/lib/groovy-2.5.15-indy.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
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

\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
Solution:
I have found that export JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --illegal-access=deny" produces the following ``` % export JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --illegal-access=deny" % gremlin NOTE: Picked up JDK_JAVA_OPTIONS: --illegal-access=deny...
Jump to solution
2 Replies
Solution
danielcraig23
danielcraig239mo ago
I have found that export JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --illegal-access=deny" produces the following
% export JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --illegal-access=deny"
% gremlin
NOTE: Picked up JDK_JAVA_OPTIONS: --illegal-access=deny

\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin>
% export JDK_JAVA_OPTIONS="$JDK_JAVA_OPTIONS --illegal-access=deny"
% gremlin
NOTE: Picked up JDK_JAVA_OPTIONS: --illegal-access=deny

\,,,/
(o o)
-----oOOo-(3)-oOOo-----
plugin activated: tinkerpop.server
plugin activated: tinkerpop.utilities
plugin activated: tinkerpop.tinkergraph
gremlin>
spmallette
spmallette9mo ago
Those warnings come directly from the JVM at JDK11, so you can't really control them with logging infrastructure. There's some details about those warnings here: https://linuxpip.org/an-illegal-reflective-access-operation-has-occurred/ Note that in 3.7.0 the warnings are resolved as we were able to finally upgrade Groovy (the source of the issue) past 2.5.x.
Daan "Navi"
LinuxPip
How to fix “an illegal reflective access operation has occurred” – ...
In Java programming, the reflection API lets you examine the internal properties of a running Java program and manipulate them. The name of all its members can