Skip to content

Fail to initialize onnxruntime with 1.21.0 on windows #23969

Description

@HerrDerb

After the update to com.microsoft.onnxruntime:onnxruntime:1.21.0 I do get an error when trying to load the runtime in java (21). Colleagues with a mac seems not to experience this issue.

java.lang.UnsatisfiedLinkError: ~\AppData\Local\Temp\onnxruntime-java3314415972495013183\onnxruntime.dll: A dynamic link library (DLL) initialization routine failed
	at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
	at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:331)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:197)
	at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:139)
	at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2418)
	at java.base/java.lang.Runtime.load0(Runtime.java:852)
	at java.base/java.lang.System.load(System.java:2025)
	at ai.onnxruntime.OnnxRuntime.load(OnnxRuntime.java:387)
	at ai.onnxruntime.OnnxRuntime.init(OnnxRuntime.java:166)
	at ai.onnxruntime.OrtEnvironment.<clinit>(OrtEnvironment.java:34)
        ....

while I do have the latest VC++ redistributables
Image

maybe related to #23957?

Metadata

Metadata

Assignees

No one assigned

    Labels

    api:Javaissues related to the Java APIplatform:windowsissues related to the Windows platform

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions