powered by Jive Software

PostgreSQL doesn't work with Java 5

Hi,

I wanted to update an Openfire server from 3.6.2 to 3.6.3 with the help of the deb archive. The server is a debian stable (etch/4.0) system with Java 5 installed. The update was successully but I didn’t see any Openfire process. After debugging some time I figured out several problems.

  • If there is a problem with java there is not even a log entry.

When starting openfire manually I got the following output:

/usr/lib/jvm/java-1.5.0-sun/bin/java -server -DopenfireHome=/usr/share/openfire -Dopenfire.lib.dir=/usr/share/openfire/lib -classpath /usr/share/openfire/lib/startup.jar -jar /usr/share/openfire/lib/startup.jar

Exception in thread “main” java.lang.UnsupportedClassVersionError: Bad version number in .class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.logicalcobwebs.proxool.ConnectionPool.setDefinition(ConnectionPool.java:740 )
at org.logicalcobwebs.proxool.ConnectionPool.(ConnectionPool.java:115)
at org.logicalcobwebs.proxool.ConnectionPoolManager.createConnectionPool(Connectio nPoolManager.java:93)
at org.logicalcobwebs.proxool.ProxoolFacade.registerConnectionPool(ProxoolFacade.j ava:109)
at org.logicalcobwebs.proxool.ProxoolFacade.registerConnectionPool(ProxoolFacade.j ava:97)
at org.logicalcobwebs.proxool.ProxoolDriver.connect(ProxoolDriver.java:77)
at java.sql.DriverManager.getConnection(DriverManager.java:525)
at java.sql.DriverManager.getConnection(DriverManager.java:140)
at org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnec tionProvider.java:75)
at org.jivesoftware.database.DbConnectionManager.setConnectionProvider(DbConnectio nManager.java:494)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:79)
at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:335)
at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:73)
at org.jivesoftware.util.JiveProperties$JivePropertyHolder.(JiveProperties .java:40)
at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:52)
at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:532)
at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:298)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:415)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:161)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:106)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)

  • According to jarcheck the postgreql support is compiled for java 6 only.

Then I looked on the website and couldn’t find the system requirements. I don’t know exactly where but after some time I found a clue that openfire should be compatible with Java 5 and 6.

Can anyone confirm or disprove this?

Regards,

Scrubb

Hi,

This change is bad:

http://www.igniterealtime.org/fisheye/changelog/svn-org/openfire/trunk/build/lib ?cs=10940

daryl

Hi,

I filed this in Jira:

http://www.igniterealtime.org/issues/browse/JM-1519

daryl

Hi,

yes, you’re right. There are specific builds on http://jdbc.postgresql.org/download.html. The jdbc4 version has to be replaced with jdbc3 to work with Java 1.5

Thanks for your help.

Regards

Scrubb