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

Could not initialize class org.bytedeco.javacpp.opencv_core$Mat #1

Closed
medloh opened this issue May 2, 2014 · 5 comments
Closed

Could not initialize class org.bytedeco.javacpp.opencv_core$Mat #1

medloh opened this issue May 2, 2014 · 5 comments
Labels

Comments

@medloh
Copy link

medloh commented May 2, 2014

I see, there is something wrong with the Loader. Calling this before
everything works around this issue:
Loader.load(org.bytedeco.javacpp.opencv_core.class);

But I'll be checking how to fix this. If you have a GitHub account, can
you copy/paste that as an issue here?
https://github.com/bytedeco/javacpp/issues
Thanks!

Samuel

  • hide quoted text -

On 05/02/2014 01:01 AM, Darrel Riekhof wrote:

Thanks for the help. Not sure what "Demo" class you're talking about,
but I found a "BlobDemo" class in the /samples directory. I was able to
get it to run in Eclipse with only javacv.jar in the classpath.

So I tried doing this in my project, removing all the other jars besides
javacv.jar. I got the same error I was getting.

So then I went back to BlobDem and tried adding this line which is
causing the error:

 public static void main(String[] args)  { 
     System.out.println("STARTING...\n"); 

-----> FaceRecognizer recognizer = createLBPHFaceRecognizer(); // Line 22
demo();
System.out.println("ALL DONE");
}

And I get the same error.

Exception in thread "main" java.lang.NoClassDefFoundError: Could not
initialize class org.bytedeco.javacpp.opencv_core$Mat
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.load0(Unknown Source)
at java.lang.System.load(Unknown Source)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:513)
at org.bytedeco.javacpp.Loader.load(Loader.java:399)
at org.bytedeco.javacpp.Loader.load(Loader.java:353)
at org.bytedeco.javacpp.opencv_contrib.(opencv_contrib.java:21)
at BlobDemo.main(BlobDemo.java:22)
Error loading class org/bytedeco/javacpp/opencv_core$Mat.
Error loading class org/bytedeco/javacpp/opencv_core$Mat.

saudet added a commit that referenced this issue May 3, 2014
@saudet saudet added the bug label May 3, 2014
@saudet
Copy link
Member

saudet commented May 3, 2014

Binary snapshot released here:
https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp/0.8-1-SNAPSHOT/
Thanks for reporting!

@pscollins
Copy link

This link 404's.

@saudet
Copy link
Member

saudet commented Jul 21, 2014

@pscollins
Copy link

Thanks for your reply. Is there a maven-friendly version? I only see the .8 versions here.

@saudet
Copy link
Member

saudet commented Aug 4, 2014

Version 0.9 is out and fixes this issue. Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants