-
Notifications
You must be signed in to change notification settings - Fork 7
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
java.lang.ExceptionInInitializerError #13
Comments
Hi @pjw-cmd it looks like the shared library either wasn't compiled or isn't found in the class hierarchy. When What is your output when you run |
PS D:\code\slsqp4j> D:\Environments\gradle-6.0\bin\gradle.bat clean build --warning-mode all
FAILURE: Build failed with an exception.
BUILD FAILED in 1s |
Ok seems like it's a gradle incompatibility. You may need to downgrade to gradle 6 for the time being until I have the time to update to gradle 7 |
Thank you very much for your answer but I switched a lot of versions and still had this problem.Here is the output from my console.
FAILURE: Build failed with an exception.
BUILD FAILED in 0s |
Hi, I have successfully compiled the libslsqp.so file and successfully called the SLSQP function on this machine. But when I packaged the program, it ran on another machine with the following problems. java.lang.UnsatisfiedLinkError: C:\Users\pjw\AppData\Local\Temp\libslsqp5107231964654805323.so: Can't find dependent libraries at java.lang.ClassLoader$NativeLibrary.load(Native Method) So this code is compiled to generate the libslsqp.so file, does it still need another environment to run on another machine?Looking forward to your reply.Thank you. |
Thank you very much for your contribution. I am in the Java environment of Windows. In the process of running the test, the following problem should be solved. The following is my console output.
java.lang.ExceptionInInitializerError
at com.skew.slsqp4j.Slsqp.minimizeWithScalarConstraints(Slsqp.java:479)
at com.skew.slsqp4j.Slsqp.minimize(Slsqp.java:335)
at com.gildata.ai.dataframe.function.RiskParity.get_RP_weight(RiskParity.java:76)
at com.gildata.ai.dataframe.function.RiskParity.risk_parity(RiskParity.java:41)
at com.gildata.ai.dataframe.function.RiskParityTest.test1(RiskParityTest.java:62)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.lang.NullPointerException: Cannot invoke "java.io.InputStream.read(byte[])" because "is" is null
at com.skew.slsqp4j.util.NativeUtils.loadLib(NativeUtils.java:110)
at com.skew.slsqp4j.util.NativeUtils.(NativeUtils.java:132)
... 29 more
The text was updated successfully, but these errors were encountered: