rahulshirsathe / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

java.lang.IllegalStateException: Cause already initialized on Linux with opencv2.4.6.1 #390

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I am using opencv to write an spring application for face detection on linux 
server. I am trying to invoke the page to detect the face after giving an image 
input. I have not installed using a tar file. I am just using the 
javacv-linux-x86_64, openvcv_linux_2.4.6.1, javacv-0.6, javacpp-0.6 jars.

java.lang.IllegalStateException: Cause already initialized
    at java.lang.Throwable.initCause (Throwable.java:275)
    at com.googlecode.javacpp.Loader.load (Loader.java:581)
    at com.googlecode.javacpp.Loader.load (Loader.java:532)
    at com.googlecode.javacv.cpp.opencv_core.<clinit>(opencv_core.java:134)
    at java.lang.J9VMInternals.initializeImpl (Native Method)

Environment: 64 bit Linux OS, JDK 1.6(64bit)

Can you please suggest how to solve this issue.

Original issue reported on code.google.com by d.laksh...@gmail.com on 4 Dec 2013 at 5:37

GoogleCodeExporter commented 8 years ago
Could you retry that with the latest revision of JavaCPP from the repository?
    http://javacpp.googlecode.com/archive/a9bcf01c04868c1f1036cf0f2d6a90e9d1265300.zip
That will throw a more meaningful error message so we can figure out what is 
missing here, thanks!

Original comment by samuel.a...@gmail.com on 15 Dec 2013 at 6:47

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I tried placing the javacpp jar as given above in the WEB-INF lib. 
Below is the error stack trace

********************************************************************************
*
Exception Created: org.apache.cxf.interceptor.Fault:jniopencv_core (Not foind 
in java.library.path)
            at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver on Message (AbstractFaultChainInitiatorObserver.java:116)
...
...
...
Caused by: java.lang.UnsatisfiedLinkError: jniopencv_core (Not Found in 
java.library.path)
        at java.ling.ClassLoader.loadLibraryWithPath (ClassLoader.java)
...
...
Caused by: java.lang.UnsatisfiedLinkError : 
/tmp/java/javacpp1387453966549922000/libjniopencv_core.so 
(/lib64/libc.so.6:version 'GLIBC_2.14' not found (required by 
/tmp/javacpp1387453966549922000 /libjniopencv_core.so))
    at java.lang.ClassLoader.loadLibraryWithPath (ClassLoader.java:1015)
    at java.lang.System.load (System.java:460)

*******************************************************************************
Caused by: java.lang.NoClassDefFoundError: 
com.googlecode.javacv.cpp.opencv_core$IplImage (initialization failure)
    at java.lang.J9VMInternals.initialize
...
...
Reported by: com.ibm.websphere.servlet.error.ServeltErrorReport:
    java.lang.RuntimeException: org.apache.cxf.interceptor.Fault: com.googlecode.javacv.cpp.opencv_core$IplImage( initialization failure )
...
...
Caused by: java.lang.NoClassDefFoundError: 
com.googlecode.javacv.cpp.opencv_core$IplImage (initialization failure)
    at java.lang.J9VMInternals.initialize

Original comment by d.laksh...@gmail.com on 26 Dec 2013 at 5:21

GoogleCodeExporter commented 8 years ago
I see, so this is issue #308. We can fix that by rebuilding OpenCV and JavaCV 
inside this older environment to support older versions of glibc. BTW, if you 
can provide builds, that would be great! Let me know, thanks

Original comment by samuel.a...@gmail.com on 27 Dec 2013 at 1:18

GoogleCodeExporter commented 8 years ago
Issue 394 has been merged into this issue.

Original comment by samuel.a...@gmail.com on 27 Dec 2013 at 2:51