{"action":"created","issue":{"url":"https://api.github.com/repos/bytedeco/javacv/issues/832","repository_url":"https://api.github.com/repos/bytedeco/javacv","labels_url":"https://api.github.com/repos/bytedeco/javacv/issues/832/labels{/name}","comments_url":"https://api.github.com/repos/bytedeco/javacv/issues/832/comments","events_url":"https://api.github.com/repos/bytedeco/javacv/issues/832/events","html_url":"https://github.com/bytedeco/javacv/issues/832","id":274679672,"number":832,"title":"java.lang.NoClassDefFoundError running javacpp on Linux","user":{"login":"chammond75","id":5068756,"avatar_url":"https://avatars3.githubusercontent.com/u/5068756?v=4","gravatar_id":"","url":"https://api.github.com/users/chammond75","html_url":"https://github.com/chammond75","followers_url":"https://api.github.com/users/chammond75/followers","following_url":"https://api.github.com/users/chammond75/following{/other_user}","gists_url":"https://api.github.com/users/chammond75/gists{/gist_id}","starred_url":"https://api.github.com/users/chammond75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chammond75/subscriptions","organizations_url":"https://api.github.com/users/chammond75/orgs","repos_url":"https://api.github.com/users/chammond75/repos","events_url":"https://api.github.com/users/chammond75/events{/privacy}","received_events_url":"https://api.github.com/users/chammond75/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":13,"created_at":"2017-11-16T22:02:59Z","updated_at":"2017-11-18T00:20:23Z","closed_at":null,"author_association":"NONE","body":"Sorry for the multiple posts but I'm really trying to get some help resolving this issue. I'm trying to use the FFmpegFrameGrabber class on an Alpine Linux system in order to do some frame grabs from videos (hls and mp4 format). I continue to run into the following error:\r\n\r\nError loading class org/bytedeco/javacpp/Loader.\r\njava.lang.NoClassDefFoundError: Could not initialize class org.bytedeco.javacpp.avcodec\r\nat java.lang.Class.forName0(Native Method) ~[?:1.8.0_131]\r\nat java.lang.Class.forName(Class.java:348) ~[?:1.8.0_131]\r\nat org.bytedeco.javacpp.Loader.load(Loader.java:739) ~[javacpp-1.3.3.jar:1.3.3]\r\nat org.bytedeco.javacpp.Loader.load(Loader.java:684) ~[javacpp-1.3.3.jar:1.3.3]\r\nat org.bytedeco.javacpp.avformat$AVFormatContext.<clinit>(avformat.java:2819) ~[ffmpeg-3.2.1-1.3.jar:1.3.3]\r\nat org.bytedeco.javacv.FFmpegFrameGrabber.startUnsafe(FFmpegFrameGrabber.java:509) ~[javacv-1.3.3.jar:1.3.3]\r\nat org.bytedeco.javacv.FFmpegFrameGrabber.start(FFmpegFrameGrabber.java:503) ~[javacv-1.3.3.jar:1.3.3]\r\n<rest of the stack is in my code and there is no Caused By>\r\n\r\nHere's my linux version: Linux version 4.9.27-14.31.amzn1.x86_64 (mockbuild@gobi-build-60006) (gcc version 4.8.3 20140911 (Red Hat 4.8.3-9) (GCC) ) #1 SMP Wed May 10 01:58:40 UTC 2017\r\n\r\nHere's my gradle dependencies:\r\n\r\n    compile group: 'org.bytedeco', name: 'javacv-platform', version: '1.3.3'\r\n    compile group: 'org.bytedeco.javacpp-presets', name: 'opencv-platform', version: '3.2.0-1.3'\r\n    compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.2.0-1.3', classifier:'linux-x86_64'\r\n    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg-platform', version: '3.2.1-1.3'\r\n    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3'\r\n    compile group: 'org.bytedeco.javacpp-presets', name: 'ffmpeg', version: '3.2.1-1.3', classifier:'linux-x86_64'\r\n\r\nThis Linux box is running inside of a Docker image. I've tried building ffmpeg directly as part of the construction of the docker image (as seen here: https://hub.docker.com/r/opencoconut/ffmpeg/~/dockerfile/). That did not work.\r\n\r\nI tried opening up all the *linux-x86_64* jars and copying all the .so's to my /lib directory. That did not work.\r\n\r\nI'm a n00b at ffmpeg. I have my code working just fine on my Mac laptop that I use for development. I was hoping the linux box would similarly \"just work\". Please if anyone @saudet or anyone else has any clues I really need to get this figured out. Any additional info that I can provide please just let me know. Or any additional debug steps I can take just let me know. Thank you.\r\n\r\nEDIT: Here's my ffmepg setup on the box itself. I just realized that this may be old:\r\n\r\nfmpeg version 3.2.1 Copyright (c) 2000-2016 the FFmpeg developers\r\n  built with gcc 6.3.0 (Alpine 6.3.0)\r\n  configuration: --enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libass --enable-libwebp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug\r\n  libavutil      55. 34.100 / 55. 34.100\r\n  libavcodec     57. 64.101 / 57. 64.101\r\n  libavformat    57. 56.100 / 57. 56.100\r\n  libavdevice    57.  1.100 / 57.  1.100\r\n  libavfilter     6. 65.100 /  6. 65.100\r\n  libavresample   3.  1.  0 /  3.  1.  0\r\n  libswscale      4.  2.100 /  4.  2.100\r\n  libswresample   2.  3.100 /  2.  3.100\r\n  libpostproc    54.  1.100 / 54.  1.100\r\n\r\nEDIT 2: fwiw I updated ffmpeg on the box. Still no luck\r\n\r\nffmpeg version 3.4 Copyright (c) 2000-2017 the FFmpeg developers\r\nbuilt with gcc 6.3.0 (Alpine 6.3.0)\r\nconfiguration: --enable-version3 --enable-gpl --enable-nonfree --enable-small --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libvpx --enable-libtheora --enable-libvorbis --enable-libopus --enable-libass --enable-libwebp --enable-postproc --enable-avresample --enable-libfreetype --enable-openssl --disable-debug\r\nlibavutil      55. 78.100 / 55. 78.100\r\nlibavcodec     57.107.100 / 57.107.100\r\nlibavformat    57. 83.100 / 57. 83.100\r\nlibavdevice    57. 10.100 / 57. 10.100\r\nlibavfilter     6.107.100 /  6.107.100\r\nlibavresample   3.  7.  0 /  3.  7.  0\r\nlibswscale      4.  8.100 /  4.  8.100\r\nlibswresample   2.  9.100 /  2.  9.100\r\nlibpostproc    54.  7.100 / 54.  7.100"},"comment":{"url":"https://api.github.com/repos/bytedeco/javacv/issues/comments/345400534","html_url":"https://github.com/bytedeco/javacv/issues/832#issuecomment-345400534","issue_url":"https://api.github.com/repos/bytedeco/javacv/issues/832","id":345400534,"user":{"login":"chammond75","id":5068756,"avatar_url":"https://avatars3.githubusercontent.com/u/5068756?v=4","gravatar_id":"","url":"https://api.github.com/users/chammond75","html_url":"https://github.com/chammond75","followers_url":"https://api.github.com/users/chammond75/followers","following_url":"https://api.github.com/users/chammond75/following{/other_user}","gists_url":"https://api.github.com/users/chammond75/gists{/gist_id}","starred_url":"https://api.github.com/users/chammond75/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chammond75/subscriptions","organizations_url":"https://api.github.com/users/chammond75/orgs","repos_url":"https://api.github.com/users/chammond75/repos","events_url":"https://api.github.com/users/chammond75/events{/privacy}","received_events_url":"https://api.github.com/users/chammond75/received_events","type":"User","site_admin":false},"created_at":"2017-11-18T00:20:23Z","updated_at":"2017-11-18T00:20:23Z","author_association":"NONE","body":"@saudet I'm trying to understand how YOUR library is working. I have a working understanding of shared objects on Linux. But I'm asking you to explain how you expect things to work. I honestly don't know how to get the JDK to tell me anything more than I've provided for you. Can you please tell me how to do that? What more do you expect to see? Why, when I try to get the Cause of the exception is it null/empty? What are you expecting the exception from the native code to tell you? Can you please cut/paste examples of other NoClassDefFoundErrors loading avcodec that you've seen? That might at least give me a place to start looking.\r\n\r\nLook, I know this is painful and that I'm taxing you with all these questions. But can you see how frustrating this is from my perspective. The person who, presumably, knows that most about this code and this setup is not being terribly responsive. I want to collaborate with you. I want to provide you with whatever information I can to help us debug this together. Pointing me back at the internet to learn about shared objects is not productive. How can we move forward here?"}}
{"actor":{"display_login":"chammond75"}}