-
Notifications
You must be signed in to change notification settings - Fork 577
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
Add logging to the Loader process to allow debugging it #41
Comments
The specific exception I try to debug is: java.lang.UnsatisfiedLinkError: no jniopencv_imgcodecs in java.library.path
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1965)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1890)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1851)
at java.lang.Runtime.load0(Runtime.java:795)
at java.lang.System.load(System.java:1062)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:539)
at org.bytedeco.javacpp.Loader.load(Loader.java:415)
at org.bytedeco.javacpp.Loader.load(Loader.java:358)
at org.bytedeco.javacpp.opencv_imgcodecs.<clinit>(opencv_imgcodecs.java:13)
< application frames omitted > From what I see here it seems that the call to System.load actually creates this exception - but it is inside a try-catch block swallowing the exception. No nested exceptions are listed. So how come I get this trace? |
The Loader tries a lot of things to get things loaded, and a lot of exceptions get thrown around, so only what appears the most relevant one(s) are actually thrown, but it doesn't always get it right. Anyway, most of the time, the reason why it fails is because there are some missing system files from the underlying operating system, so use As for the actual request of this issue, there's no reason why it's not logging anything right now. Actually, I've added some logging to the Pointer class recently: 9ff6d93 |
Added in JavaCPP 1.1. Thanks for the suggestion! |
I try to use JavaCV in our project and it works fine for Windows and Android. But for the Jenkins CI (which runs in a Docker Image) the libraries are not found.
This problem is quite hard to track down as I do not have access to the CI infrastructure - and it this case it would be nice to just enable verbose logging for the Loader and get detailed information about what is tried and what goes wrong.
Are there specific reasons that there is no logging in the Loader at the moment?
The text was updated successfully, but these errors were encountered: