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

Error loading ortools native library #1360

Open
nornagon opened this issue Jun 26, 2023 · 0 comments
Open

Error loading ortools native library #1360

nornagon opened this issue Jun 26, 2023 · 0 comments

Comments

@nornagon
Copy link

When trying to load the native dylibs for use with ortools, I get the following error:

java.lang.NullPointerException: Resource ortools-darwin/ was not found in ClassLoader ammonite.runtime.SpecialClassLoader@2f7c2f4f
  java.util.Objects.requireNonNull(Objects.java:259)
  com.google.ortools.Loader.getNativeResourceURI(Loader.java:40)
  com.google.ortools.Loader.loadNativeLibraries(Loader.java:118)
  ammonite.$file.solve$.<clinit>(solve.sc:4)

Here's Loader.java from ortools: https://github.com/google/or-tools/blob/5425dedcfbb22cb74c636c1374a9b5ad684b1eb5/ortools/java/com/google/ortools/Loader.java#L37

Repro:

import $ivy.`com.google.ortools:ortools-java:9.6.2534`, com.google.ortools._

Loader.loadNativeLibraries();

Unfortunately I don't have the ClassLoader-fu to figure out why ortools can't find its resource URIs :( but it seems to work fine in a regular SBT project!

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

1 participant