Corrupt HSQLDB?

We had a power outage on one of our dev servers. On coming back up, openfire refuses to start. It’s using the internal HSQLDB. The error messages include:

2007.09.04 21:20:05 org.jivesoftware.database.ConnectionPool.<init>(ConnectionPool.jav a:111) Failed to create new connections on startup. Attempt 2 of 3

com.mysql.jdbc.CommunicationsException: Communications link failure due to underlying exception:

  • BEGIN NESTED EXCEPTION **

java.net.SocketException

MESSAGE: java.net.ConnectException: Connection refused

Followed by this a little further…

2007.09.04 21:20:15 org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnect ionProvider.java:68) Warning: DbConnectionDefaultPool.getConnection() was called before the internal pool has been initialized.

2007.09.04 21:20:15 org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager. java:95) WARNING: ConnectionManager.getConnection() failed to obtain a connection.

2007.09.04 21:20:15 org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:282)

java.lang.NullPointerException

at org.jivesoftware.util.JiveProperties.loadProperties(JiveProperties.java:272)

at org.jivesoftware.util.JiveProperties.init(JiveProperties.java:70)

at org.jivesoftware.util.JiveProperties.<init>(JiveProperties.java:5 2)

at org.jivesoftware.util.JiveProperties.getInstance(JiveProperties.java:46)

at org.jivesoftware.util.JiveGlobals.getProperty(JiveGlobals.java:524)

at org.jivesoftware.openfire.XMPPServer.initialize(XMPPServer.java:286)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:383)

at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:148)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:93)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:49)

2007.09.04 21:20:15 org.jivesoftware.database.DefaultConnectionProvider.getConnection(DefaultConnect ionProvider.java:68) Warning: DbConnectionDefaultPool.getConnection() was called before the internal pool has been initialized.

2007.09.04 21:20:15 org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager. java:95) WARNING: ConnectionManager.getConnection() failed to obtain a connection.

2007.09.04 21:20:15 org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:670) Database could not be accessed

java.lang.NullPointerException

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:660)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:391)

at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:148)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:93)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:49)

2007.09.04 21:20:15 org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:421)

java.lang.IllegalArgumentException: java.lang.NullPointerException

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:671)

at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:391)

at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:148)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

at java.lang.reflect.Constructor.newInstance(Unknown Source)

at java.lang.Class.newInstance0(Unknown Source)

at java.lang.Class.newInstance(Unknown Source)

at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:93)

at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:49)

Caused by: java.lang.NullPointerException

at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:660)

… 10 more

Any idea how to debug this?

Hi,

are you using Linux or Windows?

Is it possible that OPENFIRE_HOME is not found / set correctly and thus Openfire fails to find the database.

You may have a bin/extra/ directory with embedded-db-viewer.sh (or bin\extra\embedded-db-viewer.bat) which should allow to view the internal database.

I don’t think that the database is corrupted. You should have 200 MB free space in the embedded-db directory, as HSQLDB needs space for it’s checkpoint if your openfire.log file is large.

LG