Code Monkey home page Code Monkey logo

Comments (10)

javadoge avatar javadoge commented on July 22, 2024

1710839425103
maven配置:

    <dependency>
        <groupId>com.microsoft.onnxruntime</groupId>
        <artifactId>onnxruntime</artifactId>
        <version>${onnx.version}</version>
        <scope>runtime</scope>
    </dependency>
   <dependency>
        <groupId>ai.djl.onnxruntime</groupId>
        <artifactId>onnxruntime-engine</artifactId>
        <exclusions>
            <exclusion>
                <groupId>com.microsoft.onnxruntime</groupId>
                <artifactId>onnxruntime</artifactId>
            </exclusion>
        </exclusions>
    </dependency>

from djl.

javadoge avatar javadoge commented on July 22, 2024

1710840308824
这是windows system32 onnxruntime.dll 依赖关系,跟这个有关系么

from djl.

frankfliu avatar frankfliu commented on July 22, 2024

UnsatisfiedLinkError most likely you don't have DLL that onnxruntime is depends on. Can you try to install install Visual C++ 2019 Redistributable Packages and reboot

from djl.

javadoge avatar javadoge commented on July 22, 2024

1710894535075
我把之前的Visual C++都删了,安装了下2019这个版本,电脑也重启了,还是不行

from djl.

javadoge avatar javadoge commented on July 22, 2024

1710896938179
即便 重新下载一个 onnxruntime ,加载指定的onnxruntime.dll文件,也不行呢,看DLL依赖也没报错。原因大概率是windows环境问题,但是好难排查

from djl.

frankfliu avatar frankfliu commented on July 22, 2024

You can try to install VS, and use dumpbin.exe to check dependencies

from djl.

javadoge avatar javadoge commented on July 22, 2024

dumpbin

1710918937679

 Dump of file C:\Windows\System32\onnxruntime.dll

 File Type: DLL

 Image has the following dependencies:

api-ms-win-core-file-l1-1-0.dll
api-ms-win-core-errorhandling-l1-1-0.dll
api-ms-win-core-string-l1-1-0.dll
api-ms-win-core-processenvironment-l1-1-0.dll
api-ms-win-crt-string-l1-1-0.dll
api-ms-win-crt-locale-l1-1-0.dll
api-ms-win-crt-private-l1-1-0.dll
api-ms-win-core-synch-l1-2-0.dll
api-ms-win-core-synch-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-0.dll
api-ms-win-core-localization-l1-2-0.dll
api-ms-win-core-profile-l1-1-0.dll
api-ms-win-core-sysinfo-l1-2-0.dll
api-ms-win-core-util-l1-1-0.dll
api-ms-win-core-heap-l2-1-0.dll
api-ms-win-core-handle-l1-1-0.dll
api-ms-win-core-libraryloader-l1-2-0.dll
api-ms-win-core-rtlsupport-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-1.dll
api-ms-win-core-sysinfo-l1-1-0.dll
api-ms-win-core-interlocked-l1-1-0.dll
api-ms-win-core-debug-l1-1-0.dll
api-ms-win-core-fibers-l1-1-0.dll
api-ms-win-crt-runtime-l1-1-0.dll
api-ms-win-core-path-l1-1-0.dll
api-ms-win-core-heap-l1-1-0.dll
api-ms-win-core-memory-l1-1-0.dll
api-ms-win-core-processtopology-obsolete-l1-1-0.dll
api-ms-win-core-processthreads-l1-1-3.dll
api-ms-win-core-file-l1-2-0.dll
api-ms-win-eventing-provider-l1-1-0.dll
api-ms-win-crt-math-l1-1-0.dll
api-ms-win-core-libraryloader-l1-2-1.dll

Image has the following delay load dependencies:

d3d12.dll
dxgi.dll
DirectML.dll
OLEAUT32.dll
api-ms-win-core-com-l1-1-0.dll

 Summary

   15000 .data
    1000 .didat
   2B000 .pdata
  10F000 .rdata
    9000 .reloc
    1000 .rsrc
  5F5000 .text
    1000 _RDATA

from djl.

frankfliu avatar frankfliu commented on July 22, 2024

There are two dll in the jar file. ai/onnxruntime/native/win-x64/onnxruntime4j_jni.dll and ai/onnxruntime/native/win-x64/onnxruntime.dll, can you check both dependencies?

And also why you copy onnxruntime.dll to system32 directory? It supposed to be extracted to temp folder at runtime.

dumpbin /dependents onnxruntime4j_jni.dll

from djl.

Craigacp avatar Craigacp commented on July 22, 2024

That kind of UnsatisfiedLinkError is typically because an older version of the ONNX Runtime native library was loaded from somewhere else on your classpath, as it's after the JNI binding has loaded. It means there's a mismatch between the native library and the ONNX Runtime class files.

from djl.

frankfliu avatar frankfliu commented on July 22, 2024

feel free to re-open this issue if still have questions.

from djl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.