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

java.lang.UnsatisfiedLinkError: org.opencv.videoio.VideoCapture.VideoCapture_2(I)J #34

Closed
arungoyal opened this issue Jun 20, 2018 · 6 comments

Comments

@arungoyal
Copy link

Hi

I am facing below issue while running a sample code, just accessing VideoCapture instance.
java.lang.UnsatisfiedLinkError: org.opencv.videoio.VideoCapture.VideoCapture_2(I)J

I am working on Ubuntu and have open CV 3.4 installed properly.
I already set all class paths in environment variables as below :

OPENCV_HOME="/home/.../softwares/opencv-3.2.0/"
OPENCV_LIB="/home/.../softwares/opencv-3.2.0/build/lib"
OPENCV_JAR="/home/.../softwares/opencv-3.2.0/build/bin/opencv-320.jar"

I followed all the step for adding library in eclipse, whether it is by adding user library or by adding jar files. I followed for JNI.

I tried a lot.

Let me know what is issue or what i am missing .

Thanks
Arun

@vonnieda
Copy link
Member

Hi @arungoyal, can you please post the full error + stack trace?

@arungoyal
Copy link
Author

arungoyal commented Jun 21, 2018

Hi

Exception in thread "main" java.lang.UnsatisfiedLinkError: org.opencv.videoio.VideoCapture.VideoCapture_2(I)J
at org.opencv.videoio.VideoCapture.VideoCapture_2(Native Method)
at org.opencv.videoio.VideoCapture.(VideoCapture.java:54)
at com.example.demo.Hello.main(Hello.java:16)

above is the full stack trace
I attached a sample java class as well.
Hello.txt

Please let me know whats wrong with configuration.
Opencv is installed on system, i have checked using some commands on terminal
I am using eclipse and and tried on intellij IDEA as well, facing same issue.

Thanks
Arun

@vonnieda
Copy link
Member

vonnieda commented Aug 5, 2018

I've just released version 3.4.2-0, please try this and see if it resolves the issue.

@arungoyal
Copy link
Author

Hi @vonnieda

Thanks for replying. I'll check and let you know.

@vonnieda
Copy link
Member

Closing due to no response. Please reopen if you are still seeing this issue.

@stagging18
Copy link

Hi All,
I am facing the same issue with opencv_320.
While i am running the same code with eclipse it is working fine.
But while creating a fat jar of my project and running it from command line i am getting the below exception.

Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: org.opencv.videoio.VideoCapture.VideoCapture_3()J
at org.opencv.videoio.VideoCapture.VideoCapture_3(Native Method)
at org.opencv.videoio.VideoCapture.(VideoCapture.java:68)
at com.iot.video.app.kafka.collector.VideoEventGenerator.generateEvent(VideoEventGenerator.java:97)

Note: I have placed the DLL file inside my windows/system 32 directory.

Regards,
Rajesh

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

3 participants