Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnsatisfiedLinkError: Could not load J2V8 library. Reasons: no j2v8_linux_x86_64 in java.library.path #10

Closed
trumpetx opened this issue Feb 7, 2017 · 10 comments

Comments

@trumpetx
Copy link

trumpetx commented Feb 7, 2017

Executing from a VM, unzipped package, CentOS 6

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /home/rss/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException: J2V8 native library not loaded
	at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195)
	at com.eclipsesource.v8.V8.createV8Runtime(V8.java:149)
	at com.eclipsesource.v8.V8.createV8Runtime(V8.java:125)
	at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:58)
	at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:45)
	at JvmMon.<clinit>(JvmMon.java:12)
Caused by: java.lang.UnsatisfiedLinkError: Could not load J2V8 library. Reasons:
	no j2v8_linux_x86_64 in java.library.path
	/home/rss/libj2v8_linux_x86_64.so: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /home/rss/libj2v8_linux_x86_64.so)

	at com.eclipsesource.v8.LibraryLoader.loadLibrary(LibraryLoader.java:75)
	at com.eclipsesource.v8.V8.load(V8.java:71)
	at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145)
	... 4 more
@ajermakovics
Copy link
Owner

Looks like this might be an open issue eclipsesource/J2V8#188

@jncharon
Copy link

jncharon commented Feb 7, 2017

Hi,

I have the same error here on windows 10 64 :
UnsatisfiedLinkError: Could not load J2V8 library. Reasons: no j2v8_win32_x86_64 in java.library.path

It's weird as the lib in in my build.gradle

@CorrectHorseBatteryStapple

same on jvm-mon-0.2, windows 7, java 1.8.0_111. Really looking forward to use this interesting tool from command line

jvm-mon.bat

Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException: J2V8 native library not loaded
        at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195)
        at com.eclipsesource.v8.V8.createV8Runtime(V8.java:149)
        at com.eclipsesource.v8.V8.createV8Runtime(V8.java:125)
        at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:58)
        at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:45)
        at JvmMon.<clinit>(JvmMon.java:18)
Caused by: java.lang.UnsatisfiedLinkError: Could not load J2V8 library. Reasons:
        no j2v8_win32_x86_64 in java.library.path

        at com.eclipsesource.v8.LibraryLoader.loadLibrary(LibraryLoader.java:75)
        at com.eclipsesource.v8.V8.load(V8.java:71)
        at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145)
        ... 4 more

@ajermakovics
Copy link
Owner

At the moment in only runs on Linux an MacOS, #1
There is a windows version of J2v8 library so it should work but haven't tried it yet

@sanbor
Copy link

sanbor commented Feb 22, 2017

On Ubuntu 16.04 I was getting this warning, but the issue was that I didn't have set JAVA_HOME.

user@ubuntuuser ~/Downloads/jvm-mon-0.2
 % ./bin/jvm-mon        
$JAVA_HOME/lib/tools.jar not found
OpenJDK 64-Bit Server VM warning: You have loaded library /home/user/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.NoClassDefFoundError: sun/jvmstat/monitor/MonitorException
	at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:165)
	at JvmMon.update(JvmMon.java:50)
	at JvmMon.<init>(JvmMon.java:45)
	at JvmMon.main(JvmMon.java:27)
Caused by: java.lang.ClassNotFoundException: sun.jvmstat.monitor.MonitorException
	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 4 more
user@ubuntuuser ~/Downloads/jvm-mon-0.2
 % export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
user@ubuntuuser ~/Downloads/jvm-mon-0.2
 % ./bin/jvm-mon                               
OpenJDK 64-Bit Server VM warning: You have loaded library /home/user/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.

... jvm-mon opens ...

Maybe the script should check if $JAVA_HOME is set and exit if not.

@ajermakovics
Copy link
Owner

Maybe the script should check if $JAVA_HOME is set and exit if not.

Probably a good idea

@winston01
Copy link

Definitely.

@ajermakovics
Copy link
Owner

The new script in version 0.3 does the check and automatically sets JAVA_HOME on Mac (if not set already).

@cupdike
Copy link

cupdike commented Aug 22, 2017

I also got this error trying to run as another user. The app seems to need write permissions on the install directories/files. If that's correct, would suggest adding a test for this in the startup script.

@ramprasathdgl
Copy link

I too got this error running as a different user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants