Open fire Halts at startup

The oper fire system will fail on startup with the following error:

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.

How do I fix this?

Detailed Error log follows:

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@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck

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@f7cf94a6[file =C:\Program Files\Openfire\embedded-db\openfire.lck, exists=true, locked=false, valid=false, fl =null]: java.lang.Exception: java.io.IOException: The process cannot access the file because another process has locked a portion of the file : C:\Program Files\Openfire\embedded-db\openfire.lck

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.

Server halted

the error states that the database is already in use. are you sure you are not running openfire as a service and trying to start the GUI app too. You cannot run openfire-service.exe and openfire.exe at the same time. Meaning if you have installed the service you cannot ever use the application in the program menu without stopping the service first.