无法在ubuntu 18.04上启动dbeaver

时间:2019-06-23 19:13:53

标签: java ubuntu-18.04 dbeaver

上级:我在ubuntu 18.04上安装了dbeaver。不幸的是,我不记得我是如何安装的,但我认为我遵循了here的说明。我还记得我在安装最新的Java版本时遇到问题。这里是命令窗口的一些输出:

$ java -version
java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+130)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+130, mixed mode)

问题:我无法运行Dbeaver。从终端启动dbeaver时,我得到以下信息:

$ dbeaver
2019-06-23 21:51:30.368 - Create display

,然后出现一系列错误,

(DBeaver:15178): GLib-CRITICAL **: 21:51:30.414: g_base64_encode_step: assertion 'in != NULL' failed

(DBeaver:15178): GLib-CRITICAL **: 21:51:30.414: g_base64_encode_step: assertion 'in != NULL' failed

,列表不断增加。然后在无尽的输出列表的末尾:

2019-06-23 21:51:30.643 - > Start org.jkiss.dbeaver.core [6.1.0.201906091949]
2019-06-23 21:51:30.648 - DBeaver 6.1.0.201906091949 is starting
2019-06-23 21:51:30.649 - OS: Linux 4.15.0-47-generic (amd64)
2019-06-23 21:51:30.649 - Java version: 9-ea by Oracle Corporation (64bit)
2019-06-23 21:51:30.649 - Install path: '/usr/share/dbeaver'
2019-06-23 21:51:30.649 - Instance path: 'file:/home/myname/.dbeaver4/'
2019-06-23 21:51:30.650 - Memory available 80Mb/1024Mb
2019-06-23 21:51:30.667 - Starting RMI server at 59084
2019-06-23 21:51:30.755 - Run workbench
2019-06-23 21:51:30.769 - > Start org.eclipse.e4.ui.workbench.swt [0.14.500.v20190214-0851]
2019-06-23 21:51:30.771 - > Start org.eclipse.e4.core.services [2.1.400.v20181215-2145]
2019-06-23 21:51:30.774 - > Start org.eclipse.e4.core.contexts [1.8.0.v20190214-1713]
2019-06-23 21:51:30.789 - > Start org.eclipse.e4.ui.services [1.3.400.v20190212-2214]

然后:

2019-06-23 21:51:30.828 - Internal error in workbench lifecycle
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:422)
    at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:333)
    at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:202)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultHeadlessContext(E4Application.java:497)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:511)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:211)
    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:589)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.jkiss.dbeaver.core.application.DBeaverApplication.start(DBeaverApplication.java:201)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-ea/Native Method)
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-ea/NativeMethodAccessorImpl.java:62)
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-ea/DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(java.base@9-ea/Method.java:533)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1449)
Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalInject(InjectorImpl.java:139)
    at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:411)
    ... 23 more
Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.7.100.v20180817-1215
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:460)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:422)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:414)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:153)
    at java.lang.ClassLoader.loadClass(java.base@9-ea/ClassLoader.java:419)
    ... 25 more

最终它在激烈的斗争中放弃了:

2019-06-23 21:51:30.834 - DBeaver is stopping
2019-06-23 21:51:30.835 - Stop RMI server
2019-06-23 21:51:30.863 - < Stop org.jkiss.dbeaver.ext.mssql.ui [1.0.9.201906091949]
2019-06-23 21:51:30.863 - < Stop org.jkiss.dbeaver.ext.mssql [1.0.104.201906091949]
2019-06-23 21:51:30.863 - < Stop org.jkiss.dbeaver.ext.oracle [2.1.95.201906091949]
2019-06-23 21:51:30.863 - < Stop org.jkiss.dbeaver.ext.ui.tipoftheday [1.0.16.201906091949]

该怎么办?如何让dbeaver运行?

2 个答案:

答案 0 :(得分:2)

这是Java 9+的eclipse issue,已在较新的Eclipse版本中修复。我怀疑您下载的dbeaver版本可能使用了仍然存在问题的旧版本。要么:

  • 尝试安装Java 8而不是Java 9。
  • 或安装更新的Eclipse,并在其上方安装dbeaver插件

答案 1 :(得分:0)

突然更新后,我的 dbeaver 无法在 Windows 中打开,为了修复它,我转到以下位置 C:\Users\NikhilKamani\AppData\Roaming\DBeaverData\workspace6

并删除元数据文件夹并再次启动 dbeaver 并且它工作了

注意:如果您删除元数据,则在尝试访问数据库时必须再次添加驱动程序。