tordanik / OSM2World

converter that creates three-dimensional models of the world from OpenStreetMap data
http://osm2world.org/
GNU Lesser General Public License v3.0
542 stars 122 forks source link

WARNING: An illegal reflective access operation has occurred #139

Closed hellocatfood closed 1 year ago

hellocatfood commented 5 years ago

I compiled the code using ant and tried to run the software by running java -jar build/OSM2World.jar --gui. I got the following error even when trying to run it without the gui:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.jogamp.common.os.NativeLibrary$3 (file:/home/hellocatfood/Desktop/OSM2World/build/lib/jogl/gluegen-rt.jar) to method java.lang.ClassLoader.findLibrary(java.lang.String)
WARNING: Please consider reporting this to the maintainers of com.jogamp.common.os.NativeLibrary$3
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
Inconsistency detected by ld.so: dl-lookup.c: 112: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

I'm using ubuntu 18.10

WarnerV commented 5 years ago

Just wanted to highlight: I got the same message, but only on openjdk-11-jre. After switching to openjdk-8-jre the issue disappeared.

amoyag00 commented 5 years ago

Sadly I am using openjkd-8-jre and I still got that error. I got it working by following the instructions provided by Autar in this SO post https://stackoverflow.com/questions/10995894/worldwind-runnable-jar-no-gluegen-rt-in-java-library-path Hope it helps!

I'm using Ubuntu 16.04 and the version I run was the 0.1.9

maifeeulasad commented 3 years ago

Actually downgrading to java-8 worked for me and installing some gtk3 modules :

sudo apt install libcanberra-gtk-module libcanberra-gtk3-module
sudo apt-get install openjdk-8-jdk 

And here is the configuration for IntelliJ : solution to osm2world - WARNING: An illegal reflective access operation has occurred Please see this ss to : solution to osm2world - WARNING: An illegal reflective access operation has occurred, specific version

Kchour commented 3 years ago

If you have multiple Java versions installed on your machine, you can switch between them via (switching to java-8 helped):

$ sudo update-alternatives --config java

This link explains more. Just wanted to leave this here in case it helps anyone.

tordanik commented 1 year ago

As of fbe6b37, OSM2World is now using a JOGL 2.4.0 release candidate. This makes current builds compatible with modern JDK versions and should take care of the need to downgrade to java-8 to run OSM2World.