Skip to content

The specified procedure could not be found #3

@clifftsung

Description

@clifftsung

Thanks for making it available for java. But while testing on Windows 11 x64, the following errors were thrown:

[INFO] Running fcmaes.core.OptimizerTest
Exception in thread "Thread-12" Exception in thread "Thread-10" Exception in thread "Thread-6" Exception in thread "Thread-5" Exception in thread "Thread-7" Exception in thread "Thread-11" Exception in thread "Thread-9" Exception in thread "Thread-3" Exception in thread "Thread-8" Exception in thread "Thread-4" Exception in thread "Thread-1" Exception in thread "Thread-2" java.lang.NoClassDefFoundError: Could not initialize class fcmaes.core.Jni
	at fcmaes.core.Cmaes.minimize(Cmaes.java:30)
	at fcmaes.core.Optimizers$CMA.minimize(Optimizers.java:184)
	at fcmaes.core.Fitness.minimize(Fitness.java:239)
	at fcmaes.core.CoordRetry$Optimize.run(CoordRetry.java:147)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: C:\Users\zijie\AppData\Local\Temp\nativeutils16197232308100\fcmaeslib.dll: The specified procedure could not be found [in thread "Thread-5"]
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1957)
	at com.nativeutils.NativeUtils.loadLibraryFromJar(NativeUtils.java:115)
	at fcmaes.core.Jni.<clinit>(Jni.java:12)
	... 5 more
java.lang.NoClassDefFoundError: Could not initialize class fcmaes.core.Jni
	at fcmaes.core.Cmaes.minimize(Cmaes.java:30)
	at fcmaes.core.Optimizers$CMA.minimize(Optimizers.java:184)
	at fcmaes.core.Fitness.minimize(Fitness.java:239)
	at fcmaes.core.CoordRetry$Optimize.run(CoordRetry.java:147)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.ExceptionInInitializerError: Exception java.lang.UnsatisfiedLinkError: C:\Users\zijie\AppData\Local\Temp\nativeutils16197232308100\fcmaeslib.dll: The specified procedure could not be found [in thread "Thread-5"]
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:388)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:232)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:174)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2394)
	at java.base/java.lang.Runtime.load0(Runtime.java:755)
	at java.base/java.lang.System.load(System.java:1957)
	at com.nativeutils.NativeUtils.loadLibraryFromJar(NativeUtils.java:115)
	at fcmaes.core.Jni.<clinit>(Jni.java:12)
	... 5 more
...

DLL path was correctly set in PATH environment variable, and ProcMon utility showed that the java.exe process loaded the fcmaeslib.dll and its dependent DLLs successfully.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions