#173 SQL Exception: Failed to start database 'database'

Quantum (119)
Joelle Lam

I opened a connection my derby database and then restarted twice in a row. Some reason I get an SQL Excpetion that says the database failed to start when I tried to open the database on the second restart. It seems like Quantum is not release a lock or closing the database correctly.

I will attach a snapshot of the image and a portion of the log.


  • Joelle Lam

    Joelle Lam - 2009-08-27

    SQL Exception

  • Joelle Lam

    Joelle Lam - 2009-08-27

    !ENTRY com.aptana.ide.core 4 0 2009-08-27 16:27:05.462
    !MESSAGE (Build [ERROR] An error occurred while shutting down the database
    !STACK 0
    java.sql.SQLException: No suitable driver
    at java.sql.DriverManager.getConnection(DriverManager.java:545)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at com.aptana.ide.core.db.AptanaDB.shutdown(AptanaDB.java:320)
    at com.aptana.ide.core.AptanaCorePlugin.stop(AptanaCorePlugin.java:89)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:840)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:833)
    at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:474)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:546)
    at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1098)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:593)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:261)
    at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:216)
    at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:266)
    at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:685)
    at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:583)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:409)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

  • Joelle Lam

    Joelle Lam - 2009-08-27
    • labels: --> Quantum
  • Julen Parra

    Julen Parra - 2009-08-28

    Well, there are several things here. First, as for shutdown of Derby, Quantum has an option to shutdown Derby when disconnecting (in Properties of the Bookmark, then Options). The option is not selected by default, so you have to select it. But anyway that action is not invoked when simply closing the whole Eclipse, because that will free Derby anyway, even if the db.lck file is not deleted. However, the behavior could be changed and Derby shuedowned when Eclipse exist too, if that helps any.

    Second issue, when Aptana starts, it opens a connection to the Derby database aptanaDB. That connection is open when Quantum tries to open a second one. Derby, in embedded mode, allows just one concurrent connection, so that might be part of your problem too. I don't know if you are working form inside Aptana or not.

    I wasn't able to duplicate your error, in any case, and the exception you sent me seems not to be caused by Quantum code, so it's perhaps another exception from the log. Try establishing a sequence of actions that leads to the error.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks