dbeaver icon indicating copy to clipboard operation
dbeaver copied to clipboard

Error with MariaDB ODBC driver with Windows Authentication

Open brazune opened this issue 3 years ago • 1 comments

System information:

  • Operating system (distribution) and version: Windows Server 2016
  • DBeaver version: 21.1.0.202106012023
  • Additional extensions

Connection specification:

  • Database name and version: SingleStore 7.3.11 (wire compatible with MariaDB/MySQL)
  • Driver name: MariaDB ODBC 3.1 Driver 64-bit
  • Do you use tunnels or proxies (SSH, SOCKS, etc)? No

Describe the problem you're observing:

MariaDB ODBC Driver configured and tested with integrated authentication:

image

image

All default options.

Connection created in DBeaver, using ODBC, all default options:

image

Test Connection returns:

image

Exception Stack Trace:

java.lang.NullPointerException
	at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:453)
	at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.lambda$0(JDBCDataSource.java:176)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.openConnection(JDBCDataSource.java:195)
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.openConnection(GenericDataSource.java:135)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCExecutionContext.connect(JDBCExecutionContext.java:101)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.initializeMainContext(JDBCRemoteInstance.java:100)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCRemoteInstance.<init>(JDBCRemoteInstance.java:59)
	at org.jkiss.dbeaver.model.impl.jdbc.JDBCDataSource.initializeRemoteInstance(JDBCDataSource.java:109)
	at org.jkiss.dbeaver.ext.generic.model.GenericDataSource.<init>(GenericDataSource.java:107)
	at org.jkiss.dbeaver.ext.generic.model.meta.GenericMetaModel.createDataSourceImpl(GenericMetaModel.java:90)
	at org.jkiss.dbeaver.ext.generic.GenericDataSourceProvider.openDataSource(GenericDataSourceProvider.java:106)
	at org.jkiss.dbeaver.registry.DataSourceDescriptor.connect(DataSourceDescriptor.java:914)
	at org.jkiss.dbeaver.runtime.jobs.ConnectJob.run(ConnectJob.java:70)
	at org.jkiss.dbeaver.runtime.jobs.ConnectionTestJob.run(ConnectionTestJob.java:103)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:105)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
eclipse.buildId=unknown
java.version=11.0.11
java.vendor=AdoptOpenJDK
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en
Command-line arguments:  -os win32 -ws win32 -arch x86_64

Thanks!

JB

brazune avatar Jun 07 '21 17:06 brazune

Thank you for the report. ODBC driver is outdated. Could you please change it on JDBC or use a commercial one?

kseniiaguzeeva avatar Jun 16 '21 12:06 kseniiaguzeeva

Good day, is there any workaround for this, while we wait for the fix to make it to a release? :)

esanumIT avatar Oct 20 '22 09:10 esanumIT

@esanumIT Unfortunately the only workaround right now is to use a commercial ODBC driver. It is the only way until the newer community one is written.

Matvey16 avatar Nov 03 '22 10:11 Matvey16

Just force the driver class name to: sun.jdbc.odbc.JdbcOdbcDriver

image

Here source code of driver: https://github.com/eagle518/jdk-source-code/blob/master/jdk5.0_src/j2se/src/share/classes/sun/jdbc/odbc/JdbcOdbcDriver.java

meriturva avatar Jun 07 '23 13:06 meriturva

Hello @brazune

Could you please try to use the modern ODBC driver available in PRO products? https://dbeaver.com/download/ Does the issue still persist there?

LonwoLonwo avatar Oct 31 '23 13:10 LonwoLonwo

It's been a while since no update here. If the issue is still actual please let me know and provide additional information.

E1izabeth avatar Dec 12 '23 12:12 E1izabeth