Page 1 of 1

Indexing install on Linux - NoClassDefFoundError

Posted: Sun Apr 14, 2013 10:45 am
by somewhere_or_other
I'm trying to install the indexing application on my new laptop, running Kubuntu 12.04, and I'm getting the "NoClassDefFoundError" shown below. It doesn't look like it's relative to the Java packages that are installed on my system, but rather on what's included with the JRE in the indexing installer, though I could be wrong on that. Any ideas on how to get around this? I haven't found anything similar on the forums so far.

Thanks,
Lloyd Brown

Code: Select all

lbrown@mercury:~/Downloads$ ./Indexing_unix_3_17_3.sh
Unpacking JRE ...
Preparing JRE ...
Starting Installer ...
java.lang.NoClassDefFoundError: java.awt.Container
        at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(Unknown Source)
        at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(Unknown Source)
        at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(Unknown Source)
        at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
        at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
        at com.install4j.runtime.installer.Installer.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
        at com.install4j.runtime.launcher.Launcher.main(Unknown Source)
java.lang.NoClassDefFoundError: java.awt.Component
        at javax.swing.ImageIcon.<clinit>(Unknown Source)
        at com.install4j.runtime.installer.frontend.GUIHelper.loadIcon(Unknown Source)
        at com.install4j.runtime.installer.frontend.GUIHelper.<clinit>(Unknown Source)
        at com.install4j.runtime.installer.helper.InstallerUtil.reportException(Unknown Source)
        at com.install4j.runtime.installer.Installer.main(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
        at com.install4j.runtime.launcher.Launcher.main(Unknown Source)

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Sun Apr 14, 2013 11:11 am
by jdlessley
There is a discussion in the Installation Problem on Linux thread for installing Indexing on Linux.

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Sun Apr 14, 2013 12:09 pm
by somewhere_or_other
Yes. I read that thread. He briefly listed the same symptoms as what I'm seeing (message #5), then said that he'd re-installed (message #6), and had a different problem (#7). The proposed solution seemed to be oriented toward solving that second problem, not the first one. Thus why I sent it in again. I suppose I could combine with that thread, but since it seemed to be oriented toward that second problem, and this one is separate, I thought I'd start a new thread.

I haven't seen any other threads so far that included this particular error.

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Sun Apr 14, 2013 3:11 pm
by somewhere_or_other
Woo hoo! I may have found the solution. This page gave me the idea: http://stackoverflow.com/questions/1411 ... -container. I installed the "ia32-libs" package, and it installed another 136 dependent packages, and the installer seems to launch now. I don't know which of the packages caused it, but it kinda makes sense that the installer would need some sort of 32-bit libraries. This may only affect 64-bit (x86_64) machines, where the 32-bit compatibility libraries haven't been installed.

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Sun Mar 01, 2015 8:04 am
by erik.thysell
Thank you somewhere_or_other, that helped!

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Sat Mar 26, 2016 9:37 am
by craljedi
Stupid Java Error: java.lang.NoClassDefFoundError: java.awt.Container
I got this while trying to install the LDS Chruch Indexing for FamilySearch software on Xubuntu 13.10, turns out it is 64 bit Ubuntu problem:

java.lang.NoClassDefFoundError: java.awt.Container
at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.(Unknown Source)
at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.(Unknown Source)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Unknown Source)
at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source)
at com.install4j.runtime.installer.Installer.main(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.exe4j.runtime.LauncherEngine.launch(Unknown Source)
at com.install4j.runtime.launcher.Launcher.main(Unknown Source)

Although this topic seemed to help, ia32-libs is obsolete and the suggested replacements (lib32z1 lib32ncurses5 lib32bz2-1.0) do not have the "right stuff".

Seems like the installer wants its own version of Java that is pre-1.7. This version wants some (a lot) extra 32 bitty stuff:

sudo apt-get update

sudo apt-get install libgtk2.0-0:i386 libxtst6:i386

sudo apt-get install libxtst6:i386

sudo apt-get install libx11-dev:i386

sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
sudo apt-get install libxi6 libxtst6 libxrender1
./Indexing_unix.sh -J-Djava.awt.headless=true

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Tue Oct 27, 2020 6:23 am
by SameDay7
A usual workflow to solve NoClassDefFoundError is to decompile jar and check whether it actually contains java.awt.Container class.

Re: Indexing install on Linux - NoClassDefFoundError

Posted: Tue Oct 27, 2020 9:07 pm
by rmrichesjr
SameDay7 wrote:A usual workflow to solve NoClassDefFoundError is to decompile jar and check whether it actually contains java.awt.Container class.
On a Linux machine (per the original post), you should be able to run zipinfo to see what class files are contained in the jar file.