I have written a java code using JavaCV+Opencv. Initially I had put wrong path in "Path" variable, where my system(Server) is 64bit & i had given path of 32bit dlls. Now I have updated path to correct 64bit dlls. But now when I run my java application i get following error.
STARTING THE APPLICATION
Exception in thread "main" java.lang.ExceptionInInitializerError
at HelloJavaCV.mainMethod(HelloJavaCV.java:28)
at FacialUser.main(FacialUser.java:18)
Caused by: java.lang.IllegalStateException: Can't overwrite cause
at java.lang.Throwable.initCause(Throwable.java:320)
at com.googlecode.javacpp.Loader.load(Loader.java:581)
at com.googlecode.javacpp.Loader.load(Loader.java:532)
at com.googlecode.javacv.cpp.opencv_highgui.<clinit>(opencv_highgui.java
:79)
... 2 more
When I was doing the same changes on my desktop i had encountered same issue, which was gone when i restarted the system. But however I dont want to restart current server system if possible. Please let me know if and how can i resolve the issue.
Thanks in advance.
I found out later, issue was, my server system(64bit) was missing Microsoft Visual C++ 2010 redistributable. OpenCv requires VC 9/10/11 to work properly. When I installed the required Mircrosoft Visual C++ version my issue resolved.
Hope this helps someone in future ;)