-
Notifications
You must be signed in to change notification settings - Fork 744
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
ClassNotFoundException: org.bytedeco.javacpp.avutil$Pool_free_Pointer on 3.0.2-1.2 version #225
Comments
It works just fine here. I won't be able to fix a problem that I cannot reproduce, so you're going to need to provide more details about your environment. |
Environment: Version 2.8.1-1.1 works perfectly fine. |
Same issue, using maven with IntelliJ 14.1.3 on Windows 10 x64, JRE 1.8.0_91-b14 x64
Edit: Can confirm, downgrading to 2.8.1-1.1 is working here as well. |
It just looks like you guys have an old version of JavaCPP in the class path somewhere... |
Same here on Windows 10 x64 (using Java 1.8.0_92-b14, 64-bit). In my case there can't be any old versions of javaCPP hanging around as I'm on a freshly installed machine and have just started working with javaCPP. I even tried to set classpath explicitly on the command line:
Edit: Downgrading works for me, too. If you need more information, I'd be happy to provide that for you! |
Could you guys try again with JavaCPP 1.2.1? I've fixed a couple of things that are probably not related, but we never know. It's compatible with the presets built with JavaCPP 1.2 anyway. |
I too am having this issue on Windows 8.1 x64 and x86 with 1.2. I tried 1.2.1. There was no improvement. Also, from what I could tell while debugging, it does actually find the right .jar file that contains the native .dll files. |
I see what the issue is. The Zeranoe binaries don't have a build for 3.0.2 and the closest one included a new type that wasn't in 3.0.2. Building from source will fix this issue, but JavaCPP should be made not to crash on something like that... |
Or maybe not, it shouldn't just ignore errors about missing classes. Anyway, here a JAR file containing the missing classes: ffmpeg-3.0.2-1.2-fixed.zip |
I will test this, but does this extra type mean I'll need to use different ffmpeg-3.0.2-1.2.jar files between my Linux and Windows builds? Or will the Linux build not care that there an "extra" unused type? |
I found more details in this issue. I guess the only thing we can do is report the files to Microsoft so they get green-listed. |
The Linux binaries shouldn't care about the extra classes, no. |
It would appear that the Linux binaries have classes not present in the Windows binaries, so as it turns out, the jar file you posted will only work for Windows. It also contains the deprecation of AVStream.codec. The Linux version doesn't even know what AVCodecParameter is. I switched to the jar provided by Maven and this following exception went away for Linux. I hope we can find a way to get these synced back up. java.lang.UnsatisfiedLinkError: org.bytedeco.javacpp.avutil.AV_PIX_FMT_GBRAP12()I |
I see, we can't use builds from Zeranoe then... Here are some binaries built from source that work properly: https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp-presets/ffmpeg/3.0.2-1.2.1-SNAPSHOT/ |
I get a different kind of error with that build. I checked the path mentioned in the stack trace and I see jniavutil.dll and avutil-55.dll are in the same folder which I presume are the correct libraries. This happens with 32-bit and 64-bit. I don't know how relevant it is, but the property java.library.path does not include the temp folder. Exception in thread "main" java.lang.UnsatisfiedLinkError: no jniavutil in java.library.path |
@enternoescape I've fixed the builds to prevent the DLLs from missing dependencies: a1723f4 I've also deployed new SNAPSHOT binaries at the same place as before: |
The 1.2.1-SNAPSHOT fixed the Error putting member offsets for class org/bytedeco/javacpp/avutil$Pool_free_Pointer. issue for me |
@saudet Thanks. That snapshot looks good on Windows. I haven't had any surprises so far. |
@saudet New SNAPSHOT worked for me on Windows 10 for opening .mp4 files using FFmpegFrameGrabber.createDefault(String). Thank you for all that you do for this great library. -Rick |
Hey! I am getting this exception with the base 1.2 binaries when trying to grab a frame from a video: If I use this fixed ffmpeg.jar (https://github.com/bytedeco/javacpp-presets/files/290338/ffmpeg-3.0.2-1.2-fixed.zip) I can grab frames from the video but it will throw this exception when trying to record a frame in a video: I tried all the jars from this link too (https://oss.sonatype.org/content/repositories/snapshots/org/bytedeco/javacpp-presets/ffmpeg/3.0.2-1.2.1-SNAPSHOT/) none of them worked. |
@Shatterhand Check the messages on the console. It'll tell you what codec it's looking for and you can then add it. |
@saudet It didnt say anything about the codec, but I was reading a tscc video and was recording with the same codec: |
Hello, I'm using May16' (JavaCV 1.2) versions of javaCV and javaCPP, using Android Studio. Any idea to resolve this? Thanks! |
Actually I've put the uncompressed *.so files of ffmpeg-android-arm and opencv-android-arm in jniLibs/armeabi (as suggested http://www.devsplanet.com/question/35461019, is that bad?) , and I erased them from the gradle file. Now I don't have the UnsatisfiedLinkError anymore, I pass the FrameGrabber creation and start, but the grabber.grab() failed afterwards. |
I've released binaries for FFmpeg 3.1.2, properly built as explained above: |
hello,I'm using May16' (JavaCV 1.2) versions of javaCV and javaCPP,using eclipse Runing report an 'ClassNotFoundException' error,Caused by:org.bytedeco.javacpp.avutil$Pool_free_Pointer |
I use this fixed ffmpeg.jar (https://github.com/bytedeco/javacpp-presets/files/290338/ffmpeg-3.0.2-1.2-fixed.zip) report an error:java.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avutil |
@eguid Use the latest binaries here: |
@saudet It's very good, already in operation,thanks very much! |
Hi guys, I also meet with the similar problem as belows when I run an app (by using opencv/javacv *.so files). Environment: I spent too much on it and I did not figure it out. |
@paulyzheng1 You're using an old version of JavaCPP, JavaCV, or OpenCV somewhere. Make sure to use the latest versions of everything. |
@saudet ,thanks a lot. Today I make sure it again. When this problem happened, I almost use latest version files. And this app has a dependency library : OpenCV library 3.3.0 ; Should I use the latest version: OpenCV library 3.4.1 ? Thanks a lot. And I put these following .so files(/03/29/2018, javacv-platform-1.4.1-bin.zip) in /system/lib,/system/lib64: |
@paulyzheng1 That doesn't matter, that should work. If you've enabled ProGuard, that's most likely the issue here: https://github.com/bytedeco/javacv/wiki/Configuring-Proguard-for-JavaCV |
When trying to run code from tutorial on line
final AVFormatContext pFormatCtx = new AVFormatContext(null);
class not found exception is being thrown:
It is the same when using cachedir or not. With cacheDir there are only 2 dll in directory:
avutil-55.dll
jniavutil.dll
maven dependency:
or with 64bit:
The text was updated successfully, but these errors were encountered: