dbeaver
dbeaver copied to clipboard
ODBC can't work with jdbc-odbc-bridge-jre7
Description
Hi I create a ODBC connection ,use the dirver jdbc-odbc-bridge-jre7.jar and jdbcodbc.dll downloaded from github dbeaver. When I test the connection ,I receive "NullPointerException" error . And I find Dirver Class is not found in "Edit Driver 'odbc'" dialog, when I click the "Find Class".
DBeaver Version
CE 21.3.4
Operating System
WIN 10
Database and driver
1.odbc 2. driver : jdbc-odbc-bridge-jre7 from https://github.com/dbeaver/jdbc-odbc-bridge-jre7
Steps to reproduce
No response
Additional context
No response
Hello @netmole,
Could you please send me the log files? You can find instructions here: https://dbeaver.com/docs/wiki/Log-files/. Thank you.
Sorry ,I don't know how to send you the log file.
When I click the "Find Class",I find in the log file "dbeaver-debug.log ":
2022-09-08 23:33:53.159 - DBeaver 22.2.0.202209051344 is starting 2022-09-08 23:33:53.159 - OS: Windows 10 10.0 (amd64) 2022-09-08 23:33:53.159 - Java version: 11.0.12 by Eclipse Foundation (64bit) 2022-09-08 23:33:53.159 - Install path: 'C:\Users\xxxxxx\Documents\tools\dbeaver' 2022-09-08 23:33:53.159 - Instance path: 'file:/C:/Users/xxxxxx/AppData/Roaming/DBeaverData/workspace6/' 2022-09-08 23:33:53.159 - Memory available 64Mb/1024Mb
Start Core File Systems [org.eclipse.core.filesystem 1.9.400.v20220419-0658] Start Core Resource Management [org.eclipse.core.resources 3.17.0.v20220517-0751] 2022-09-08 23:33:53.313 - Create display Start 小组支持核心 [org.eclipse.team.core 3.9.400.v20220511-1440] 2022-09-08 23:33:53.413 - Initializing DBeaver 22.2.0 2022-09-08 23:33:53.413 - Host plugin: org.jkiss.dbeaver.ui.app.standalone 22.2.0.202209051344 2022-09-08 23:33:53.413 - Initialize desktop platform... 2022-09-08 23:33:53.544 - BounceCastle bundle found. Use JCE provider BC 2022-09-08 23:33:53.591 - Initialize base platform... Start DBeaver UI Navigator [org.jkiss.dbeaver.ui.navigator 1.0.89.202209051344] Start Expression Language [org.eclipse.core.expressions 3.8.100.v20210910-0640] 2022-09-08 23:33:53.613 - Platform initialized (200ms) Start DBeaver UI Editors - Base [org.jkiss.dbeaver.ui.editors.base 1.0.89.202209051344] 2022-09-08 23:33:53.613 - Starting RMI server at 53434 2022-09-08 23:33:53.776 - Run workbench Start Eclipse e4 工作台 SWT [org.eclipse.e4.ui.workbench.swt 0.16.500.v20220506-1520] Start Eclipse Application Services [org.eclipse.e4.core.services 2.3.200.v20220513-1235] Start Eclipse UI Application Services [org.eclipse.e4.ui.services 1.5.0.v20210115-1333] Start EMF XML/XMI Persistence [org.eclipse.emf.ecore.xmi 2.16.0.v20190528-0725] Start Eclipse CSS SWT Theme Support [org.eclipse.e4.ui.css.swt.theme 0.13.100.v20220310-1056] Start Eclipse e4 工作台加载项 [org.eclipse.e4.ui.workbench.addons.swt 1.4.400.v20211102-0453] Start Eclipse e4 工作台 SWT 呈现器 [org.eclipse.e4.ui.workbench.renderers.swt 0.15.500.v20220511-1638] Start Eclipse Bindings Support [org.eclipse.e4.ui.bindings 0.13.100.v20210722-1426] Start Eclipse Dependency Injection Extensions [org.eclipse.e4.core.di.extensions 0.17.100.v20210910-0640] Start Eclipse CSS SWT Support [org.eclipse.e4.ui.css.swt 0.14.500.v20220511-1639] Start DBeaver UI [org.jkiss.dbeaver.ui 5.1.104.202209051344] Warning: NLS unused message: BlockedJobsDialog_UserInterfaceTreeElement in: org.eclipse.ui.internal.progress.messages 2022-09-08 23:33:55.133 - Configure workbench window Start 帮助系统核心 [org.eclipse.help 3.9.100.v20210721-0601] 2022-09-08 23:33:55.209 - Create actions 2022-09-08 23:33:55.217 - Disable Eclipse action set 'org.eclipse.ui.edit.text.actionSet.annotationNavigation' 2022-09-08 23:33:55.217 - Disable Eclipse action set 'org.eclipse.ui.WorkingSetActionSet' 2022-09-08 23:33:55.217 - Disable Eclipse action set 'org.eclipse.ui.actionSet.openFiles' 2022-09-08 23:33:55.604 - Initialize workbench window 2022-09-08 23:33:55.604 - Finish initialization Start DBeaver UI Editors - Data [org.jkiss.dbeaver.ui.editors.data 1.0.89.202209051344] Start Equinox Java Authentication and Authorization Service (JAAS) [org.eclipse.equinox.security 1.3.900.v20220108-1321] Start 因特网连接管理 UI [org.eclipse.ui.net 1.4.0.v20210426-0838] Start Internet Connection Management [org.eclipse.core.net 1.3.1200.v20220312-1450] Start 缺省文本编辑器 [org.eclipse.ui.editors 3.14.300.v20210913-0815] Start 文本编辑器框架 [org.eclipse.ui.workbench.texteditor 3.16.500.v20220331-0848] Start DBeaver SQL Model [org.jkiss.dbeaver.model.sql 1.0.79.202209051344] Warning: NLS unused message: pref_page_sql_editor_group_misc in: org.jkiss.dbeaver.ui.editors.sql.internal.SQLEditorMessages Start DBeaver UI Editors - SQL [org.jkiss.dbeaver.ui.editors.sql 1.0.89.202209051344] 2022-09-08 23:33:56.420 - Loading user drivers configuration from 'C:\Users\xxxxxx\AppData\Roaming\DBeaverData\workspace6.metadata.plugins\org.jkiss.dbeaver.core\drivers.xml' 2022-09-08 23:33:56.436 - Total database drivers: 100 (100) Start DBeaver Sample Database [org.jkiss.dbeaver.ext.sample.database 1.0.126.202209051344] Start DBeaver 每日一帖 [org.jkiss.dbeaver.ext.ui.tipoftheday 1.0.95.202209051344] Start Draw2d [org.eclipse.draw2dl 3.12.100.20220823131424] Start GEF3 GEF (MVC) [org.eclipse.gef3 3.12.100.20220823131424] Start DBeaver ERD UI [org.jkiss.dbeaver.erd.ui 3.0.49.202209051344] Start DBeaver ERD Model [org.jkiss.dbeaver.erd.model 1.0.49.202209051344] Start DBeaver UI Editors - Connections [org.jkiss.dbeaver.ui.editors.connection 1.0.80.202209051344] Start DBeaver Generic Plug-in [org.jkiss.dbeaver.ext.generic 2.3.175.202209051344] 2022-09-08 23:35:21.504 - java.util.zip.ZipException: zip END header not found java.util.zip.ZipException: zip END header not found at java.base/java.util.zip.ZipFile$Source.zerror(Unknown Source) at java.base/java.util.zip.ZipFile$Source.findEND(Unknown Source) at java.base/java.util.zip.ZipFile$Source.initCEN(Unknown Source) at java.base/java.util.zip.ZipFile$Source.
(Unknown Source) at java.base/java.util.zip.ZipFile$Source.get(Unknown Source) at java.base/java.util.zip.ZipFile$CleanableResource. (Unknown Source) at java.base/java.util.zip.ZipFile$CleanableResource.get(Unknown Source) at java.base/java.util.zip.ZipFile. (Unknown Source) at java.base/java.util.zip.ZipFile. (Unknown Source) at java.base/java.util.jar.JarFile. (Unknown Source) at java.base/java.util.jar.JarFile. (Unknown Source) at java.base/java.util.jar.JarFile. (Unknown Source) at org.jkiss.dbeaver.registry.driver.DriverClassFindJob.findDriverClasses(DriverClassFindJob.java:93) at org.jkiss.dbeaver.registry.driver.DriverClassFindJob.findDriverClasses(DriverClassFindJob.java:86) at org.jkiss.dbeaver.registry.driver.DriverClassFindJob.run(DriverClassFindJob.java:64) at org.jkiss.dbeaver.ui.UIUtils.lambda$16(UIUtils.java:1730) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) 2022-09-08 23:35:25.895 - java.util.zip.ZipException: zip END header not found java.util.zip.ZipException: zip END header not found at java.base/java.util.zip.ZipFile$Source.zerror(Unknown Source) at java.base/java.util.zip.ZipFile$Source.findEND(Unknown Source) at java.base/java.util.zip.ZipFile$Source.initCEN(Unknown Source) at java.base/java.util.zip.ZipFile$Source. (Unknown Source) at java.base/java.util.zip.ZipFile$Source.get(Unknown Source) at java.base/java.util.zip.ZipFile$CleanableResource. (Unknown Source) at java.base/java.util.zip.ZipFile$CleanableResource.get(Unknown Source) at java.base/java.util.zip.ZipFile. (Unknown Source) at java.base/java.util.zip.ZipFile. (Unknown Source) at java.base/java.util.jar.JarFile. (Unknown Source) at java.base/java.util.jar.JarFile. (Unknown Source) at java.base/java.util.jar.JarFile. (Unknown Source) at org.jkiss.dbeaver.registry.driver.DriverClassFindJob.findDriverClasses(DriverClassFindJob.java:93) at org.jkiss.dbeaver.registry.driver.DriverClassFindJob.findDriverClasses(DriverClassFindJob.java:86) at org.jkiss.dbeaver.registry.driver.DriverClassFindJob.run(DriverClassFindJob.java:64) at org.jkiss.dbeaver.ui.UIUtils.lambda$16(UIUtils.java:1730) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122) 2022-09-08 23:36:18.552 - DBeaver is stopping 2022-09-08 23:36:18.552 - Stop RMI server 2022-09-08 23:36:18.552 - RMI controller has been stopped 2022-09-08 23:36:18.653 - DBeaver shutdown completed
add: I download the dirver jdbc-odbc-bridge-jre7 from https://github.com/dbeaver/jdbc-odbc-bridge-jre7;
#12761
Any update on this issue?
Some context, with The Legacy ODBC driver was removed in DBeaver Community Edition 23.1, this issue becomes more urgent. Refer to the link https://github.com/dbeaver/dbeaver/wiki/Deprecated-legacy-ODBC-driver for details.
I have to roll back to DBeaver Community Edition 22.0.5 in order to avoid this ODBC issue. I would appreciate if there is any alternative solution for me to keep ODBC Connection in DBeaver CE 23.1 version and onwards. Thanks.
The legacy driver was deprecated and eventually removed for a reason.
It can still be used in later community edition versions. Instructions are described here: https://github.com/dbeaver/dbeaver/wiki/Deprecated-legacy-ODBC-driver#2-download-legacy-odbc-from-github https://github.com/dbeaver/jdbc-odbc-bridge-jre7#using-the-driver-in-dbeaver
In any other cases, we recommend using our own ODBC driver available in PRO products: https://github.com/dbeaver/dbeaver/wiki/ODBC-JDBC-Driver
The statement is not true "It can still be used in later community edition versions. Instructions are described here". The instruction doesn't work for DBeaver CE v23.1. I would love to find out why it doesn't work, and how to make it work. Please share more detail on how to make it work? I tried and it doesn't work. Thanks for your help.
The legacy driver was deprecated and eventually removed for a reason.
It can still be used in later community edition versions. Instructions are described here: https://github.com/dbeaver/dbeaver/wiki/Deprecated-legacy-ODBC-driver#2-download-legacy-odbc-from-github https://github.com/dbeaver/jdbc-odbc-bridge-jre7#using-the-driver-in-dbeaver
In any other cases, we recommend using our own ODBC driver available in PRO products: https://github.com/dbeaver/dbeaver/wiki/ODBC-JDBC-Driver
Sorry, I don't know what exactly is not working for you.
It might be an ODBC driver, JDBC driver, environment, or runtime issues. Can you please clarify what's wrong?
I'm having the same problem as OP. I downloaded the ODBC legacy driver from git. When I try and add it, I don't get a driver class when I click the Find Class button. If I finish adding it, anyway, without the class, and try and connect by DB to it, I get an error that no suitable driver was found.
Eventually it works for me, but there are more than one thing I did before it works, hence I am not sure which are the important steps contributing to the working state.
First, follow https://github.com/dbeaver/dbeaver/issues/12761#issuecomment-1580875252, just force the driver class name to: sun.jdbc.odbc.JdbcOdbcDriver.
Second, restart DBeaver, and try connecting to your ODBC database.
Please let us know if these two steps work for you.
I'm having the same problem as OP. I downloaded the ODBC legacy driver from git. When I try and add it, I don't get a driver class when I click the Find Class button. If I finish adding it, anyway, without the class, and try and connect by DB to it, I get an error that no suitable driver was found.
Eventually it works for me, but there are more than one thing I did before it works, hence I am not sure which are the important steps contributing to the working state.
First, follow #12761 (comment), just force the driver class name to: sun.jdbc.odbc.JdbcOdbcDriver.
Second, restart DBeaver, and try connecting to your ODBC database.
Please let us know if these two steps work for you.
Tried all of that, no luck here.
The error message I'm seeing is
Cannot invoke "sun.jdbc.odbc.JdbcOdbc.getTracer()" because "sun.jdbc.odbc.JdbcOdbcDriver.OdbcApi" is null