-
Notifications
You must be signed in to change notification settings - Fork 583
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.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil Windows 10 #106
Comments
I attach text of pom.xml - THX |
Could you try again with JavaCV 1.2? |
Unfortunately the same thing happens with versions 1.1 and 1.2 of JavaCV and JavaCpp .Is working correctly on version 1.0 and Windows 7 . In the rest of cases is not finding at runtime the proper class. |
Today I tried the new version 1.2.1 on win 10 and still not working getting the same error 👍 java.lang.NoClassDefFoundError I can replicate this problem in a smaller program and attach a runnable jar of it, or war... |
On Windows, you're probably hitting issue bytedeco/javacpp-presets#225 right? |
Is more like this issue : bytedeco/javacv#429 |
Which is a duplicate of bytedeco/javacpp-presets#225 |
ok thank you very much ! I will investigate further more . |
I have encoutered this. Finally, it works after when i upgrade the native lib. |
@tingfengainiaini |
@wypstone hi, download the newest javacv native library in https://github.com/bytedeco/javacv, now version is javacv-1.2-bin.zip (169 MB). Update the native dynamic librarys you need in your project. |
Right, this should be fixed. Details at bytedeco/javacpp-presets#225 |
Thank you all guys. I found my centos glibc the highest 2.12, and ldd 1.2'so showing me "version `GLIBC_2.14' not found".(at least 2.14) |
@wypstone , Hi, your solution works which saves my time, thanks for your share. But how do you find the error "version `GLIBC_2.14' not found" or how do you know that at least glibc 2.14 is needed for javaCV 1.1? I am interested at it. 能分享一下是怎么发现这个问题需要升级glibc来解决的吗? |
Hi all, I'm still having this problem:
here are my gradle dependencies
I'm running on Linux through a docker image. I'm not sure what the exact settings are on that image (am new to this company and am running on their infrastructure). It's critical that I get this resolved. How do I go about figuring out if there's a native library that needs updating and if so which one it is? EDIT: Same code works just fine on Mac OS X @saudet is there additional info that I can give you that would help resolve this issue? I'm currently working on downloading the docker image to get more information. But this is basically an AWS basic Linux Docker image. So if I need to run extra commands to install ffmpeg on there or something like that please let me know. |
I've just faced the same error in my Android project. |
I continue to run up against the following error (again for context this is running in a Docker image on AWS): java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avcodec I notice that this is slightly different than the error that I posted earlier. In that error I could not initialize “avutil” and here it’s “avcodec” that cannot be initialized. I am running Alpine Linux 3.6 in a docker image. During the creation of that docker image I actually compile ffmpeg 3.2.1. I didn’t know if that was necessary or not but I did it out of desperation. Here are the relevant entries from my build.gradle file:
I admit that I’m completely new to ffmpeg and a bit of a Linux luddite. I wish I had better insight into what was happening at the native level so that I could debug this easier. Most of what I see in the forums is that people are missing the right jars that contain the necessary .so files. But that typically manifests itself as a link error if I’m not mistaken. Is it possible that I’m missing the right jars as well? Locally in my build they all look like they are there. Lastly here’s my code: FFmpegFramGrabber grabber = new FFmpegFrameGrabber(new BufferedInputStream(url.openStream()))); And, of course, the problem happens at the invocation of the start() method. If anyone has any solutions that would be GREATLY appreciated. |
Hi Chammond75, Did you find a solution for your problem? I'm experiencing the same. Kristof. |
In my particular case I was finally able to address my problem by increasing my max heap and max stack size in the JVM. I went to a 3Gb max heap (-Xmx) and 1m max stack (-Xss). In addition I also unpacked the native libraries and ran ldd on them (since i’m using Linux) to make sure that all of their dependencies were properly met on the system on which I was running. I switched my base docker image to centos 7. I also made sure to update to jdk 8 update 151. Again the trick for me ended up being the heap thing. There were some out of memory errors that were occurring but not getting logged to the console (until I ran on a local Linux VM). There’s also a snapshot version 1.3.4-SNAPSHOT that tries to address a stack overflow exception that was leading to no class def. I haven’t tried the snapshot yet. Let me know if any of this is helpful. If not I’ll try to recollect other things I tried in the road to getting this work. Good luck. |
Hi Chammond, I followed your advice and for me switching to Centos 7 fixed it! Thanks a lot! Greetings, |
I got the same error. The error is ,the maven dependency artifactId is javacv-platform,not javacv! |
This error occurs when trying to use FFmpegFrameGrabberclass , find below stack trace and pom.xml - Maven
Please help me repair this problem. The same problem appears in Linux , only operational system is Win 7 works fine. Thanks in advance !
Using this method:
Error stack trace:
The text was updated successfully, but these errors were encountered: