Error when trying to use custom built JDBC driver

Note: please leave bug reports and feature requests on

Error when trying to use custom built JDBC driver

Postby raem » Tue Jun 02, 2015 1:28 pm

Hello there,

I am trying to use DBeaver with a custom build JDBC driver for a new BI database. I added the custom jars in the driver list, DBeaver found the driver in the JAR but whenever I try to open a connection to the database I have the following error:
org.jkiss.dbeaver.model.exec.DBCException: Bad Url: jdbc:stormbase:DB-IP:DB-port (where DB-IP and DB-PORT correspond to my server ;) )

I have configured the JDBC URL correctly (I think):
jdbc:stormbase:{host}:{port}

The driver works fine if I use SQuirrel or if I use it in JAVA directly.

I though it was possible to add new driver into DBeaver. Did I miss a step?

Thanks a lot for your feedback.
raem
 
Posts: 5
Joined: Tue Jun 02, 2015 1:23 pm

Re: Error when trying to use custom built JDBC driver

Postby Serge » Tue Jun 02, 2015 3:28 pm

Hi,

JDBC driver (java.sql.Driver) has function acceptsURL. If this functions returns false then DBeaver throws this error. So it seems to be an error in the driver.
Although DBeaver tries to be as tolerant as possible in such cases. Maybe this error should be converted to a warning..
I'll add a workaround in the next version (will be released on this week).
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Error when trying to use custom built JDBC driver

Postby raem » Tue Jun 02, 2015 3:46 pm

Awesome ! Thank you so much :mrgreen:
raem
 
Posts: 5
Joined: Tue Jun 02, 2015 1:23 pm

Re: Error when trying to use custom built JDBC driver

Postby raem » Wed Jun 03, 2015 5:00 pm

Hi Serge,

I've downloaded your latest build and now DBeaver is not blocking the connection to my database (I still see the !MESSAGE Bad URL in the log thought).

I can see my DB accepting the connection when I connect with DBeaver but whenever I try to run a query I have the following error:
java.lang.NullPointerException
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.setMaxRows(JDBCStatementImpl.java:547)
at org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.setLimit(JDBCStatementImpl.java:231)
at org.jkiss.dbeaver.model.DBUtils.prepareStatement(DBUtils.java:821)
at org.jkiss.dbeaver.model.DBUtils.prepareStatement(DBUtils.java:772)
at org.jkiss.dbeaver.runtime.sql.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:302)
at org.jkiss.dbeaver.runtime.sql.SQLQueryJob.extractData(SQLQueryJob.java:667)
at org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:1247)
at org.jkiss.dbeaver.ui.controls.resultset.ResultSetDataPumpJob.run(ResultSetDataPumpJob.java:131)
at org.jkiss.dbeaver.runtime.AbstractJob.run(AbstractJob.java:99)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Any chance you could help me with that?

Thanks again
R.
raem
 
Posts: 5
Joined: Tue Jun 02, 2015 1:23 pm

Re: Error when trying to use custom built JDBC driver

Postby Serge » Wed Jun 03, 2015 9:20 pm

You driver seems to be very poorly formed. It doesn't conform JDBC API.
I think that in this particular case it returns null statements from function createStatement().
I'll try to add yet another workaround but I can't be sure that it will work correctly in other cases.
Serge
 
Posts: 1526
Joined: Sat Feb 26, 2011 8:24 pm
Location: SPb

Re: Error when trying to use custom built JDBC driver

Postby raem » Thu Jun 04, 2015 1:41 pm

Hi Serge,

Thank you so much for pointing us in the right direction. I know this JDBC driver is quite poor. :oops:

We will make some modification in the driver and let you know.

Again: thank you.
raem
 
Posts: 5
Joined: Tue Jun 02, 2015 1:23 pm

Re: Error when trying to use custom built JDBC driver

Postby raem » Thu Jun 04, 2015 1:53 pm

Hi again,

We did the modification on our driver, it now works OK.

Many thanks. Again.
raem
 
Posts: 5
Joined: Tue Jun 02, 2015 1:23 pm

Re: Error when trying to use custom built JDBC driver

Postby Khosla123 » Tue Nov 03, 2015 9:56 am

Hi,

I'm trying to connect to a Netezza instance, the connection works perfectly fine but it doesn't retrieve the Tables from each of the schema's.

I get the following error.

Could you help?

org.jkiss.dbeaver.DBException: Can't load driver class 'org.netezza.Driver'
at org.jkiss.dbeaver.registry.driver.DriverDescriptor.loadDriver(DriverDescriptor.java:818)
at org.jkiss.dbeaver.registry.driver.DriverDescriptor.loadDriver(DriverDescriptor.java:788)
at org.jkiss.dbeaver.registry.driver.DriverDescriptor.getDriverInstance(DriverDescriptor.java:482)
at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSourceProvider.getConnectionProperties(JDBCDataSourceProvider.java:55)
at org.jkiss.dbeaver.ui.controls.ConnectionPropertiesControl.loadDriverProperties(ConnectionPropertiesControl.java:139)
at org.jkiss.dbeaver.ui.controls.ConnectionPropertiesControl.makeProperties(ConnectionPropertiesControl.java:66)
at org.jkiss.dbeaver.ui.dialogs.connection.DriverPropertiesDialogPage.refreshDriverProperties(DriverPropertiesDialogPage.java:91)
at org.jkiss.dbeaver.ui.dialogs.connection.DriverPropertiesDialogPage$1.run(DriverPropertiesDialogPage.java:70)
at org.jkiss.dbeaver.core.DBeaverUI$1.runInUIThread(DBeaverUI.java:136)
at org.jkiss.dbeaver.ui.AbstractUIJob.runInUIThread(AbstractUIJob.java:42)
at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4024)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:827)
at org.eclipse.jface.window.Window.open(Window.java:803)
at org.jkiss.dbeaver.core.application.ApplicationWorkbenchWindowAdvisor$1.run(ApplicationWorkbenchWindowAdvisor.java:103)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4024)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3700)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.jkiss.dbeaver.core.application.DBeaverApplication.start(DBeaverApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608)
at org.eclipse.equinox.launcher.Main.run(Main.java:1515)
Caused by: java.lang.ClassNotFoundException: org.netezza.Driver
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.jkiss.dbeaver.registry.driver.DriverDescriptor.loadDriver(DriverDescriptor.java:814)
... 42 more
Khosla123
 
Posts: 1
Joined: Tue Nov 03, 2015 9:54 am


Return to Support



Who is online

Users browsing this forum: No registered users and 17 guests