The Database is already in use by another

Hello,

I have just tried setting up openfire on Windows Small Business Server 2008. Everything seemed to go smoothly till I closed down the openfire app and then tried restarting it. Once I did that I get the following error.

2010.07.05 16:40:06 [org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:457)
]
java.lang.IllegalArgumentException: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@c69e02e3[file =C:\Program Files (x86)\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: C:\Program Files (x86)\Openfire\embedded-db\openfire.lck (Access is denied)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:710)
at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:427)
at org.jivesoftware.openfire.XMPPServer.(XMPPServer.java:161)
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:106)
at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:51)
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.exe4j.runtime.WinLauncher.main(Unknown Source)
Caused by: java.sql.SQLException: ConnectionManager.getConnection() failed to obtain a connection after 11 retries. The exception from the last attempt is as follows: java.sql.SQLException: The database is already in use by another process: org.hsqldb.persist.NIOLockFile@c69e02e3[file =C:\Program Files (x86)\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.io.FileNotFoundException: C:\Program Files (x86)\Openfire\embedded-db\openfire.lck (Access is denied)
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:698)
… 16 more
Error starting the server. Please check the log files for more information.
2010.07.05 16:40:06 Server halted
Server halted

If I uninstall and then reinstall open fire in the same directory I can get it to work again till I reboot or stop the server. I chose to use the embeded database option during the install. I cannot seem to figure out why it is doing this. Any help anyone can give me would be greatly appreciated.

Hi,

how do you stop and start Openfire usually?

If you can connect to the admin console then Openfire is running. Maybe it’s running as a service and thus there is no need to start it manually again. Starting it as a service and manually may lead to problems with file permissions.

LG

I have stopped it just using the window that comes up when you first launch it or when you double click the light bulb in the system tray. It seems to have the same issue when I restart the server as well. I cannot find an openfire service listed in the service.msc console either.