Thursday, November 14, 2013

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
        ./ -J-Djava.awt.headless=true

Seemed to do the trick.

Thursday, July 25, 2013

Archiva startup error

We started seeing this problem in Archiva:
SQL Exception: An SQL data change is not permitted for a read-only connection, user or database.
The problem ended up being Apache was started as root and so the derby lock file (db.lck) was owned by root. When it was restarted as the proper user it could not update the lock file and so opened the database as read-only.


Change the owner of the lock file to the one that owns the process.  NOTE: The lock file was not where I assumed it was but was mentioned in the log file with this error:

org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Failed to start database '/usr/local/maven/db/archiva/users', see the next exception for details.)
I never did find the promised exception with detail, just lots of these errors.

Friday, May 3, 2013

Clojure: What is my IP address?

I needed to get the IP address of the current host and came across an article Detect your host IP with Clojure which had some good ideas. Unfortunately, this code does not take into account some of issues like network interfaces that are not up. My box is a Windows 7 64-bit box with VirtualBox installed as well as sometimes being docked and sometimes working wirelessly. Using that code as a base, I wrote this code: This code returns a seq of vectors of IP address and the interface name. It only returns interfaces that are up and are not the loopback.