Connecting to Derby databases using the Autoloaded driver

Hi,

 

I have been connecting to a Derby database (as a local file) using KNIME version 2.9.4 and the derby Autoloaded driver.  I have been able to do this without any problems.  I installed the driver using File|Preferences|KNIME|Database Driver and added Derby version 10.11.1.1 driver (derby.jar, downloaded from http://db.apache.org/derby/releases/release-10.11.1.1.cgi) and then used a database URL in the Database Reader node of the form jdbc:derby:<path to my Derby database>.  Success! :-)

However, I have now upgraded to KNIME version 2.11.3 and am having problems.  

Using File|Preferences|KNIME|Databases I can add the Derby database file and the option to use Derby org.apache.derby.jdbc.AutoloadedDriver40 appears in the Database Reader node settings as previously.  And I can get the data from the database.  BUT closing KNIME and re-opening now gives me an error in the console:

ERROR     KNIMECorePlugin                    FATAL: error initializing KNIME repository - check plugin.xml and classpath

Investigation of the Knime.log file associated with the workspace gives this:-

2015-07-08 14:54:20,763 ERROR main KNIMECorePlugin : FATAL: error initializing KNIME repository - check plugin.xml and classpath
2015-07-08 14:54:20,763 DEBUG main KNIMECorePlugin : FATAL: error initializing KNIME repository - check plugin.xml and classpath
org.apache.derby.iapi.error.ShutdownException: 
    at org.apache.derby.iapi.services.context.ContextService.getFactory(Unknown Source)
    at org.apache.derby.jdbc.InternalDriver.<init>(Unknown Source)
    at org.apache.derby.jdbc.Driver20.<init>(Unknown Source)
    at org.apache.derby.jdbc.Driver30.<init>(Unknown Source)
    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.knime.core.node.port.database.DatabaseDriverLoader.readZip(DatabaseDriverLoader.java:230)
    at org.knime.core.node.port.database.DatabaseDriverLoader.loadDriver(DatabaseDriverLoader.java:214)
    at org.knime.core.node.port.database.DatabaseDriverLoader.loadDriver(DatabaseDriverLoader.java:194)
    at org.knime.workbench.core.KNIMECorePlugin.initDatabaseDriver(KNIMECorePlugin.java:260)
    at org.knime.workbench.core.KNIMECorePlugin.start(KNIMECorePlugin.java:246)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
    at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.knime.product.rcp.KNIMEApplicationWorkbenchAdvisor.preStartup(KNIMEApplicationWorkbenchAdvisor.java:116)
    at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1598)
    at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2609)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.knime.product.rcp.KNIMEApplication.start(KNIMEApplication.java:130)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

And any attempt to run the database reader node (or run the Fetch Metadata button) now produces the error:-

WARN      DBReaderDialogPane                 Error during fetching metadata from database, reason: java.io.IOException: Connection to database 'jdbc:derby:C:\Projects\Derek KB Drops\DKE2 Master 14622_1.0\db;' timed out

Removing the Derby driver from the list in File|Preferences|Knime|Databases removes the error.

The only way to connect to the database is to  (i) remove the driver.  (ii) close Knime. (iii)reopen Knime.  (iv)Re-add the driver.  (v)Run the workflow (WITHOUT CLOSING KNIME)

Anyone have any suggestions about how to get around this?

 

 

I'm getting a similar error on startup:

"ERROR KNIMECorePlugin                 FATAL: error initializing KNIME repository - check plugin.xml and classpath"

Which arises after having used the ucanaccess-3.0.7.jar to make a connection to a locally hosted MS Access Database without difficulties for maybe a couple of weeks.  Running Knime 3.2.2 (or 3.2.1 if you believe the splash graphic rather than the console's report!)

Any support from the community around what's going on here and how it can be fixed would be greatly appreciated!

Hi Ted,

can you please have a look in the KNIME log file and search for the exception to see what triggers it. To view the log file open KNIME and go to View->Open KNIME log.

Thanks

Tobias

So, I've found what appears to be the relevant section, attached below.  

From my (very limited) understanding, a NullPointerException would seem to be that I'm either missing some important files, or that the path describing where to find those files is incorrect... but not really sure what the next steps are.

Your help greatly appreciated!

Ted,

I was wondering if you found a solution to your error? I get the same, and am scratching my head as to what to do with it.

Thanks,

Dan.