Openfire Spark is note opening

Database setup or configuration error: Please verify your database settings and check the logs/error.log file for detailed errEor messages.
java.lang.IllegalArgumentxError starting the server. Please check the log files for more information.

ceptino: 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: error in script file line: 1 C:\Program Files (x86)\Openfire\embedded-db\openfire unexpected token: Ò
	at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:700)
	at org.jivesoftware.openfire.XMPPServer.start(XMPPServer.java:423)
	at org.jivesoftware.openfire.XMPPServer.<init>(XMPPServer.java:163)
	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.newInstance(Unknown Source)
	at org.jivesoftware.openfire.starter.ServerStarter.start(ServerStarter.java:105)
	at org.jivesoftware.openfire.starter.ServerStarter.main(ServerStarter.java:56)
	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(LauncherEngine.java:65)
	at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:101)
	at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:26)
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: error in script file line: 1 C:\Program Files (x86)\Openfire\embedded-db\openfire unexpected token: Ò
	at org.jivesoftware.database.DbConnectionManager.getConnection(DbConnectionManager.java:156)
	at org.jivesoftware.openfire.XMPPServer.verifyDataSource(XMPPServer.java:690)
	... 16 more
Server halted

Just had this fall in my lap. I am new to Spark. The client side are unable to connect to the Spark server, when i open Openfire i receive the message above. Would like to know a good starting point on troubleshooting.

its possible the database is locked by another process. have you tried rebooting?
if so, try stopping the openfire service. then look for a file called openfire.lck. ie. C:\Program Files\Openfire\embedded-db\openfire.lck and deleted it.
try starting the openfire service again.

If that doesn’t work, have you made any changes to your system. java updates, firewall, av, etc?

1 Like

two things of interest.

  1. openfire service is stopped. it actually cannot start. When starting, it goes to the stopped status almost immediately.
  2. in C:\program files\openfire\embedded-db there are only 2 files in there, a script file and a .tmp. This lead me to believe there were files missing!

So i performed a restore from last week and what do you know? there were 5 items in there. Restoring those files allowed me to restart the service and now spark works!!!

Holy crap someone told me i needed to completely re-install it. Glad i didn’t jump to that before i understood more about this program. Thank you so much!

1 Like

It looks like the files used for the embedded database got corrupted somehow. Restoring them from a backup was probably your best choice. :+1: