数据库可视化管理工具dbeaver试用及问题处理。
本文记录了在内网离线安装数据库可视化管理工具dbeaver的过程和相关问题处理方法。
一、下载dbeaver
https://dbeaver.io/download/
笔者测试时Windows平台最新版本为:dbeaver-ce-24.1.1-x86_64-setup.exe
二、安装方法
一路“下一步”即可
三、问题处理
1、问题现象
安装完成后运行,提示出错,如下
2、问题日志
根据提示检查出错日志,提示“swt-win32-4965r11.dll: 找不到指定的程序”和“Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32-4965r11.dll
Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32.dll
Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt.dll”
详细日志如下:
!SESSION 2024-07-01 11:42:14.483 ----------------------------------------------- eclipse.buildId=unknown java.version=17.0.6 java.vendor=Eclipse Adoptium BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh Framework arguments: -eclipse.keyring C:\Users\Administrator\AppData\Roaming\DBeaverData\secure\secure_storage Command-line arguments: -os win32 -ws win32 -arch x86_64 !ENTRY org.eclipse.osgi 4 0 2024-07-01 11:42:16.273 !MESSAGE An error occurred while automatically activating bundle org.eclipse.ui.ide (167). !STACK 0 org.osgi.framework.BundleException: Exception in org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.start() of bundle org.eclipse.ui.ide. at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:854) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:775) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1057) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:387) at org.eclipse.osgi.container.Module.doStart(Module.java:639) at org.eclipse.osgi.container.Module.start(Module.java:498) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:528) at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:620) at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:348) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41) at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:516) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:434) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:174) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.getRecentWorkspaces(DBeaverApplication.java:374) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.setIDEWorkspace(DBeaverApplication.java:350) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:190) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.jkiss.dbeaver.launcher.DBeaverLauncher.invokeFramework(DBeaverLauncher.java:648) at org.jkiss.dbeaver.launcher.DBeaverLauncher.basicRun(DBeaverLauncher.java:608) at org.jkiss.dbeaver.launcher.DBeaverLauncher.run(DBeaverLauncher.java:1459) Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: C:\Users\Administrator\AppData\Local\DBeaver\swt-win32-4965r11.dll: 找不到指定的程序。 no swt-win32 in java.library.path: C:\Users\Administrator\AppData\Local\DBeaver;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin/server;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\Program Files\Java\jre1.8.0_51\\bin;c:\Program Files\Java\jre1.8.0_51\\jre\bin;;C:\Users\Administrator\AppData\Local\DBeaver;;. no swt in java.library.path: C:\Users\Administrator\AppData\Local\DBeaver;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin/server;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\Program Files\Java\jre1.8.0_51\\bin;c:\Program Files\Java\jre1.8.0_51\\jre\bin;;C:\Users\Administrator\AppData\Local\DBeaver;;. Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32-4965r11.dll Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32.dll Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt.dll at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254) at org.eclipse.swt.internal.C.(C.java:19) at org.eclipse.swt.internal.win32.STARTUPINFO.(STARTUPINFO.java:42) at org.eclipse.swt.widgets.Display.(Display.java:149) at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.createProblemsViews(IDEWorkbenchPlugin.java:390) at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.start(IDEWorkbenchPlugin.java:347) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:833) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:825) ... 30 more Root exception: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: C:\Users\Administrator\AppData\Local\DBeaver\swt-win32-4965r11.dll: 找不到指定的程序。 no swt-win32 in java.library.path: C:\Users\Administrator\AppData\Local\DBeaver;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin/server;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\Program Files\Java\jre1.8.0_51\\bin;c:\Program Files\Java\jre1.8.0_51\\jre\bin;;C:\Users\Administrator\AppData\Local\DBeaver;;. no swt in java.library.path: C:\Users\Administrator\AppData\Local\DBeaver;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin/server;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\Program Files\Java\jre1.8.0_51\\bin;c:\Program Files\Java\jre1.8.0_51\\jre\bin;;C:\Users\Administrator\AppData\Local\DBeaver;;. Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32-4965r11.dll Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32.dll Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt.dll at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254) at org.eclipse.swt.internal.C.(C.java:19) at org.eclipse.swt.internal.win32.STARTUPINFO.(STARTUPINFO.java:42) at org.eclipse.swt.widgets.Display.(Display.java:149) at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.createProblemsViews(IDEWorkbenchPlugin.java:390) at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.start(IDEWorkbenchPlugin.java:347) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:833) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:825) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:775) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1057) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:387) at org.eclipse.osgi.container.Module.doStart(Module.java:639) at org.eclipse.osgi.container.Module.start(Module.java:498) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:528) at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:620) at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:348) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41) at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:516) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:434) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:174) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.getRecentWorkspaces(DBeaverApplication.java:374) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.setIDEWorkspace(DBeaverApplication.java:350) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:190) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.jkiss.dbeaver.launcher.DBeaverLauncher.invokeFramework(DBeaverLauncher.java:648) at org.jkiss.dbeaver.launcher.DBeaverLauncher.basicRun(DBeaverLauncher.java:608) at org.jkiss.dbeaver.launcher.DBeaverLauncher.run(DBeaverLauncher.java:1459) !ENTRY org.eclipse.osgi 4 0 2024-07-01 11:42:16.288 !MESSAGE Application error !STACK 1 java.lang.NoClassDefFoundError: org/eclipse/ui/internal/ide/ChooseWorkspaceData at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.getRecentWorkspaces(DBeaverApplication.java:374) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.setIDEWorkspace(DBeaverApplication.java:350) at org.jkiss.dbeaver.ui.app.standalone.DBeaverApplication.start(DBeaverApplication.java:190) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:208) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:143) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:109) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:439) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:271) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at org.jkiss.dbeaver.launcher.DBeaverLauncher.invokeFramework(DBeaverLauncher.java:648) at org.jkiss.dbeaver.launcher.DBeaverLauncher.basicRun(DBeaverLauncher.java:608) at org.jkiss.dbeaver.launcher.DBeaverLauncher.run(DBeaverLauncher.java:1459) Caused by: java.lang.ClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.ui.ide (167). at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:134) at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:620) at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:348) at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:414) at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:41) at org.eclipse.osgi.internal.loader.BundleLoader.findClass0(BundleLoader.java:516) at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:434) at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:174) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 15 more Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.start() of bundle org.eclipse.ui.ide. at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:854) at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:775) at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:1057) at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:387) at org.eclipse.osgi.container.Module.doStart(Module.java:639) at org.eclipse.osgi.container.Module.start(Module.java:498) at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:528) at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:122) ... 23 more Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: C:\Users\Administrator\AppData\Local\DBeaver\swt-win32-4965r11.dll: 找不到指定的程序。 no swt-win32 in java.library.path: C:\Users\Administrator\AppData\Local\DBeaver;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin/server;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\Program Files\Java\jre1.8.0_51\\bin;c:\Program Files\Java\jre1.8.0_51\\jre\bin;;C:\Users\Administrator\AppData\Local\DBeaver;;. no swt in java.library.path: C:\Users\Administrator\AppData\Local\DBeaver;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin/server;C:/Users/Administrator/AppData/Local/DBeaver/jre/bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;c:\Program Files\Java\jre1.8.0_51\\bin;c:\Program Files\Java\jre1.8.0_51\\jre\bin;;C:\Users\Administrator\AppData\Local\DBeaver;;. Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32-4965r11.dll Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt-win32.dll Can't load library: C:\Users\Administrator\.swt\lib\win32\x86_64\swt.dll at org.eclipse.swt.internal.Library.loadLibrary(Library.java:345) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:254) at org.eclipse.swt.internal.C.(C.java:19) at org.eclipse.swt.internal.win32.STARTUPINFO.(STARTUPINFO.java:42) at org.eclipse.swt.widgets.Display.(Display.java:149) at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.createProblemsViews(IDEWorkbenchPlugin.java:390) at org.eclipse.ui.internal.ide.IDEWorkbenchPlugin.start(IDEWorkbenchPlugin.java:347) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:833) at org.eclipse.osgi.internal.framework.BundleContextImpl$2.run(BundleContextImpl.java:1) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:825) ... 30 more
3、问题分析
排查发现:swt-win32-4965r11.dll在程序目录下有,swt-win32.dll和swt.dll则整个主机上都没有。在正常运行dbeaver的主机上搜索,也没有swt-win32.dll和swt.dll。
检查运行环境,当前主机为WindowsServer2012R2主机,怀疑是该程序对服务器操作系统环境支持不足。
更换到Windows10平台上安装运行,问题解决。(Windows10平台系统中没有swt-win32.dll和swt.dll,程序运行正常)。
三、连接Mysql数据库
1、选择连接Mysql数据库
2、输入数据库URL
3、提示需下载Mysql驱动
由于是内网环境,出现报错
4、从Mysql官网下载JDBC驱动
如下:
5、选择操作系统为“Platform Independent”
6、从下方直链直接下载
7、当前版本mysql-connector-j-8.4.0.zip
8、解压驱动
将压缩包解压放到dbeaver目录下
9、在内网终端上点编辑驱动页面
10、删除现有的全部驱动
11、添加驱动jar包
12、测试连接数据库
连接正常。