Openfile/Spark will not start

Hello, I have inherited this problem and since I have never used/setup Spark, I’m lost. Can anyone help with the below message I receive when Openfire Server starts. The erro log states the same thing, but I have copied it to the bottom of this post as well. Thanks.

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed error messages.
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@be910c22[file =G:\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 : G:\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@be910c22[file =G:\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 : G:\Program Files\Openfire\embedded-db\openfire.lck
at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager .java:124)
at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:E96rror startign8 the server. Please check the log files for more information
).

… 16 more
Server halted

Server error log

2009.08.10 12:10:35 [org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.jav a:507)
] Error loading plugin: G:\Program Files\Openfire\plugins\red5-plugin
java.lang.NoClassDefFoundError: org/jivesoftware/spark/plugin/Plugin
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java :385)
at org.jivesoftware.openfire.container.PluginManager.access$300(PluginManager.java :47)
at org.jivesoftware.openfire.container.PluginManager$PluginMonitor.run(PluginManag er.java:1032)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask$Sync.innerRunAndReset(Unknown Source)
at java.util.concurrent.FutureTask.runAndReset(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101 (Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodi c(Unknown Source)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknow n Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Try stopping Openfire (make sure no openfire processes are running). Then go to C:\Program Files\Openfire\embedded-db\ and delete openfire.lck file (DO NOT delete the wrong file like openfire.script, openfire.properties or openfire.log). Then try to launch it again.

This issue could be hard to investigate as i see connection manager and red5 plugins are running also and i have no experience with them.

your error says the database is already in use by another process. It could be that openfire is running at machine startup. Check for running processes. Also try a reboot if openfire is misbehaving.

All is well again. I just reinstalled openfire server and edited the openfire.xml file as directed in the LDAP instructions, finished the configuration to match our enviornment. The clients started communicating again.

Thanks for the help and suggestions. I learned something about a product I had not even heard of until my IT Director asked me to look into the problem. Again, thanks for the help.