Openfire version 3.7.0 broken, won't start

Hi,

I downloaded 3.7.0 in tar.gz form and it refuses to start on my machine complaining on missing class in nohup.out:

Exception in thread “main” java.lang.NoClassDefFoundError: com/install4j/runtime/Launcher

Caused by: java.lang.ClassNotFoundException: com.install4j.runtime.Launcher

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: com.install4j.runtime.Launcher. Program will exit.

3.6.0 is running on my machine without problems - I even downloaded new copy to make sure I did not tamper with startup scripts in any way before.

Any ideas?

Well, i didn’t had such problem after upgrading to 3.7.0 from tar.gz package on my Arch linux box (32 bit).

This was 64-bit Ubuntu (11.04).

Are you also using 64-bit Java? I think it has to be Oracle’s Java (not OpenJDK) and 32-bit. You were saying that 3.6.0 was working for you. Was it on the same machine with the same OS and Java version?

Yes, I have latest 64-bit Sun Java and yes, it’s the same machine:

$ java -version

java version “1.6.0_26”

Java™ SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot™ 64-Bit Server VM (build 20.1-b02, mixed mode)

Well, i don’t have a 64-bit linux box to test on…

Is there any way I could help you with that?

Buy me a new PC with a CPU supporting native 64-bit virtualization (: Seriously, i just need a confirmation from at least one more user about such error to file it in the tracker. In any case i won’t be able to fix it, and probably this won’t be fixed for a long time as we don’t have Openfire developers.

Well it does seem to work properly on clean installation of Ubuntu (same version, 64-bit).

Any ideas what I could check to find the root cause?

So, you are doing an upgrade of your 3.6.0 to 3.7.0? How do you do this exactly? Personally i first stop Openfire, then copy the old installation (backup), then delete all folderers, extract new content from tar.gz and then copy from a backup: /embedded-db, /conf and also /resources/security. You can also copy plugins, but i rather install them from Admin Console.

No, it was clean installation (of openfire) on both machines.

Are you sure both machines has the same java?

I just try to run Openfire 3.7.0 and I’ve got the same problem…

Exception in thread “main” java.lang.NoClassDefFoundError: com/install4j/runtime/Launcher

Caused by: java.lang.ClassNotFoundException: com.install4j.runtime.Launcher

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: com.install4j.runtime.Launcher. Program will exit.

java version “1.6.0_26”

Java™ SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot™ 64-Bit Server VM (build 20.1-b02, mixed mode)

Yes, they are the same - nonworking machine first:

$ java -version

java version “1.6.0_26”

Java™ SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot™ 64-Bit Server VM (build 20.1-b02, mixed mode)

working machine:

$ java -version

java version “1.6.0_26”

Java™ SE Runtime Environment (build 1.6.0_26-b03)

Java HotSpot™ 64-Bit Server VM (build 20.1-b02, mixed mode)

The only difference I was able to find is missing JDK on machine where openfire works?!

I can only try in 32-bit virtual Ubuntu 11.04 machine. No matter how many times i uninstall OpenJDK and install Sun’s JRE, java -version still shows that i’m using OpenJDK. So i’m not sure which is actually in use. But it works. I have downloaded tar.gz version of 3.7.0 and started in terminal /bin/openfire start I’m then able to connect to localhost:9090 in my browser and start a web setup.

Also on the home page of Admin Console it says that i’m using OpenJDK 1.6.0_22.

I was finally able to uninstall OpenJDK and reinstalled Sun’s JRE 1.6.0_26. Now it shows this version both in terminal and Admin Console. Openfire works fine with that version.

Java (and other apps with alternatives) can be managed with update-alternatives script, ie:

$ update-alternatives --display java

This command shows that it now points to java-6-sun. Anyway, i have done everything with Synaptic Package Manager.