【达梦数据库】Windows达梦管理工具打开失败:An error has occurred_ See the log file

今天安装好达梦数据库之后,发现DM管理工具打开报错,如下截图
【达梦数据库】Windows达梦管理工具打开失败:An error has occurred_ See the log file_第1张图片
找到上面所说的目录的日志文件,打开后是如下内容:

!SESSION 2023-03-17 22:23:46.552 -----------------------------------------------
eclipse.buildId=M20110210-1200
java.version=1.8.0_332
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=zh_CN
Framework arguments:  -product com.dameng.manager.product
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product com.dameng.manager.product -data workspace/manager

!ENTRY org.eclipse.osgi 2 0 2023-03-17 22:23:47.349
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2023-03-17 22:23:47.349
!MESSAGE Bundle org.eclipse.core.filesystem.win32.x86_1.1.201.R36x_v20100727-0745 [53] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2023-03-17 22:23:47.349
!MESSAGE Bundle org.eclipse.core.resources.win32.x86_3.5.100.v20100505-1345 [56] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2023-03-17 22:23:47.349
!MESSAGE Bundle org.eclipse.equinox.security.win32.x86_1.0.200.v20100503 [82] was not resolved.

!ENTRY org.eclipse.osgi 4 0 2023-03-17 22:23:47.349
!MESSAGE Application error
!STACK 1
java.lang.IllegalStateException: The platform metadata area could not be written: D:\Software\dmdbms\tool\workspace\manager\.metadata.  By default the platform writes its content
under the current working directory when the platform is launched.  Use the -data parameter to
specify a different content area for the platform.
	at org.eclipse.core.internal.runtime.DataArea.assertLocationInitialized(DataArea.java:61)
	at org.eclipse.core.internal.runtime.DataArea.getStateLocation(DataArea.java:125)
	at org.eclipse.core.internal.preferences.InstancePreferences.getBaseLocation(InstancePreferences.java:44)
	at org.eclipse.core.internal.preferences.InstancePreferences.initializeChildren(InstancePreferences.java:199)
	at org.eclipse.core.internal.preferences.InstancePreferences.(InstancePreferences.java:59)
	at org.eclipse.core.internal.preferences.InstancePreferences.internalCreate(InstancePreferences.java:209)
	at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:289)
	at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:277)
	at org.eclipse.core.internal.preferences.PreferencesService.createNode(PreferencesService.java:390)
	at org.eclipse.core.internal.preferences.RootPreferences.getChild(RootPreferences.java:63)
	at org.eclipse.core.internal.preferences.RootPreferences.getNode(RootPreferences.java:96)
	at org.eclipse.core.internal.preferences.RootPreferences.node(RootPreferences.java:85)
	at org.eclipse.core.internal.preferences.AbstractScope.getNode(AbstractScope.java:38)
	at org.eclipse.core.runtime.preferences.InstanceScope.getNode(InstanceScope.java:71)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.getStorePreferences(ScopedPreferenceStore.java:241)
	at org.eclipse.ui.preferences.ScopedPreferenceStore.(ScopedPreferenceStore.java:133)
	at org.eclipse.ui.plugin.AbstractUIPlugin.getPreferenceStore(AbstractUIPlugin.java:284)
	at org.eclipse.ui.internal.UISynchronizer.(UISynchronizer.java:88)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2456)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at com.dameng.manager.ManagerApplication.start(ManagerApplication.java:30)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

看了哈日志,大概是“无法写入平台元数据区域”,具体啥原因也不知道。

查了下原因,网上说说是电脑之前因某些操作把 “My Documents” 文件夹改到了D盘下,而安装程序会假设它位于C盘并且尝试在那里打开工作区。这个不晓得对不对,反正我电脑没有改过,但还是报错。

解决思路:给启动程序加入 “-data”属性,指定合理的工作区路径;

直接修改DM管理工具启动程序对应的ini配置文件即可,如DM管理工具对应的“manager.exe”,需修改“manager.ini”。这个文件在安装目录下的tool目录。
【达梦数据库】Windows达梦管理工具打开失败:An error has occurred_ See the log file_第2张图片
原文件如下:

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
com.dameng.manager.product
-showSplash
manager.bmp
-data
workspace/manager
-vm
../jdk/bin
-vmargs
-DDM_HOME=../
-Djava.library.path=../bin
-Ddameng.log.file=log4j.xml
-Ddameng.isql.explorer.root=workspace/local/isql
-Ddameng.dts.explorer.root=workspace/local/dts
-Duse_bak2=true
-Dgrant_vti_role=false
-Dapp.name=manager.exe
-Dosgi.nl=zh_CN
-Xms256m
-Xmx2048m

注意看-data字段,原来的文件里面是workspace/manager,这里是一个相对路径,DM管理工具打开时无法识别路径,造成打开失败。

所以,直接更改为一个绝对路径即可。更改后的内容为(示例):

-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.2.R36x_v20101222
-product
com.dameng.manager.product
-showSplash
manager.bmp
-data
C:/Users/Lucky_W/.eclipse/workspace/manager
-vm
../jdk/bin
-vmargs
-DDM_HOME=../
-Djava.library.path=../bin
-Ddameng.log.file=log4j.xml
-Ddameng.isql.explorer.root=workspace/local/isql
-Ddameng.dts.explorer.root=workspace/local/dts
-Duse_bak2=true
-Dgrant_vti_role=false
-Dapp.name=manager.exe
-Dosgi.nl=zh_CN
-Xms256m
-Xmx2048m

保存即可。

如果更改后无法保存,是因为DM程序把文件夹权限重设了,文件修改完无法保存,直接在其他路径修改后覆盖即可。

修改保存后,在打开达梦管理工具,就能正常打开啦!
【达梦数据库】Windows达梦管理工具打开失败:An error has occurred_ See the log file_第3张图片

你可能感兴趣的:(Issue,数据库,java,达梦数据库,达梦,sql)