I'm having problems loading an OpenCV library on a Linux server. I'm trying to deploy an application with Java components to this environment. I first installed OpenCV using Ubuntu on Windows, then copied the OpenCV .so files into a folder of the Java classpath so they can be found. The structure of the .so files look like this:
If I then try to load the library using System.loadLibrary(NATIVE_LIBRARY_NAME);, it gives the following error:
CRITICAL - M2EE: java.lang.UnsatisfiedLinkError:
/home/vcap/app/data/tmp/project-userlib___415031196935836591/libopencv_java342.so:
/home/vcap/app/model/resources/libopencv_ml.so.3.4: file too short
I think this has something to do with copying the linked .so files to Windows and then deploy them back to Linux, so the link of the libraries is somehow lost, but I have no idea how to do this the proper way.
Hope anyone can help me.
Regards,
Ward
Make sure the file(soft link) is not broken!