phyloref / jphyloref

MIT License
0 stars 0 forks source link

Illegal reflective access in com.google.inject.internal.cglib.core.$ReflectUtils$2 #83

Closed iimog closed 3 years ago

iimog commented 3 years ago

Running jphyloref always produces this warning on my system:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/path/to/jphyloref/target/jphyloref-1.0.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
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

This also happens when running with no parameters to just produce the help message. Currently, jphyloref seems to still work but the message All illegal access operations will be denied in a future release indicates that this might become a problem. The issue seems to be in one of your dependencies so your might not be able to resolve this yourself. But maybe it is possible to update or report the issue to the original project.

Full output:
$ java -jar target/jphyloref-1.0.0.jar                       
JPhyloRef/1.0.0 OWLAPI/4.2.7
Synopsis: jphyloref  

Where command is one of:
 - help: Provides help on all jphyloref commands
 - test: Test the phyloreferences in the provided ontology to determine if they resolved correctly.
    - i, input: The input ontology to read in RDF/XML or JSON-LD (can also be provided without the '-i').
    - j, jsonld: Treat the input file as a JSON-LD file. Files with a '.json' or '.jsonld' extension will automatically be treated as a JSON-LD file.
 - webserver: Set up a webserver to allow reasoning of phyloreferences over HTTP.
    - h, host: The hostname to listen to HTTP connections on (default: 'localhost')
    - p, port: The TCP port to listen to HTTP connections on (default: 34214)
 - resolve: Resolve phyloreferences in the input ontology and report on their resolution in JSON.
    - i, input: The input ontology to read in RDF/XML or JSON-LD (can also be provided without the '-i').
    - j, jsonld: Treat the input file as a JSON-LD file. Files with a '.json' or '.jsonld' extension will automatically be treated as a JSON-LD file.
    - e, errors-as-json: By default, errors during reasoning are reported to STDERR. Setting this flag collects all errors and includes them as part of the JSON output. This makes it easier to run JPhyloRef as a backend to a web server.

We also accept some global options, including:
 --reasoner : sets the reasoner name, which should be one of:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$2 (file:/path/to/jphyloref/target/jphyloref-1.0.0.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$2
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
    'jfact': JFact/1.2.0.1
    'null': No reasoner used
    'elk': null/0.0.0.0

gaurav commented 3 years ago

Good point! That dependency isn't very useful to us at the moment and doesn't seem to be in active development for OWLAPI 4.x, so it's probably easiest to just remove it entirely (PR #85). This removes the warning you report.

gaurav commented 3 years ago

Fixed in PR #85, closing.