Openfire Mac OS X Starting problems

I have installed Openfire 3.10.3 on a Mac OS X 10.9.5.

When I start the server from the commandline I get the following error:

Exception in thread “main” java.lang.UnsupportedClassVersionError: org/jivesoftware/openfire/starter/ServerStarter : Unsupported major.minor version 51.0

Looking at various postings it seems to be a problem with the Java version installed and the version of Java used to compile Openfire (I did not build Openfire). I have Java version 8 update 66 installed.

I am not too sure how to proceed - Any suggestions. By the way this ‘problem’ has been raised by somebody else on this forum : Openfire 3.10.2 and OS X Mavericks 10.9.5 5 months ago but this has not been answered.

major.minor version 51.0 is Java 7 and actually this looks like you are trying to run Openfire with Java 6 or lower.

What does java -version give you? Does it really use Java 8u66?

The result when I execute ‘java -version’ from the commandline is:

java version “1.8.0_25”

Java™ SE Runtime Environment (build 1.8.0_25-b17)

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

When I go to the Update tab of the Java Control Panel it says Java 8 update 66

I have managed to progress and am able to start Openfire from the command-line. However I am still unable to start Openfire from the Openfire Preference Pane.

Here is what I did after a bit more googling:

executed: /usr/libexec/java_home -verbose

which showed me that Java 6 was installed unlike just doing java -version

executed:

sudo rm -rf /System/Library/Java/JavaVirtualMachines/1.6.0.jdk

sudo rm -rf /Library/Java/JavaVirtualMachines/1.6.0*.jdk (wasn’t necessary as such a folder didn’t exist).

Tried starting Openfire again from the command-line but now it complained about JAVA_HOME

so I executed: sudo ln -sf /Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents CurrentJDK

which after a reboot resulted in Openfire starting fine from the commandline.

Now I have the following problem when doing the setup:

HTTP ERROR 500

Problem accessing /setup/setup-profile-settings.jsp. Reason:

Server Error

Caused by:

java.lang.NullPointerException at org.jivesoftware.openfire.admin.setup.setup_002dprofile_002dsettings_jsp._jspService(setup_002dprofile_002dsettings_jsp.java:81)