【Dakota】02 GUI无法新建Model File(.bmf)

问题描述

新建Dakota Project后,在项目上右键 New > Model File(.bmf),GUI没有任何反应。

出错原因

打开 Window > Show View > Error Log,再次新建基本模型文件(.bmf),Error Log 显示Unhandled event loop exception错误。
在这里插入图片描述

双击错误,错误描述如下:

java.lang.ExceptionInInitializerError
	at gov.sandia.bb.commons.node.NodeGroup.<init>(NodeGroup.java:40)
	at gov.sandia.bmf.BMF.<init>(BMF.java:42)
	at gov.sandia.bmf.ui.dialogs.BmfDialog.<init>(BmfDialog.java:104)
	at gov.sandia.bmf.ui.dialogs.BmfDialog.<init>(BmfDialog.java:91)
	at gov.sandia.bmf.ui.commands.NewModelHandler.execute(NewModelHandler.java:32)
	at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283)
	at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97)
	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.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319)
	at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253)
	at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173)
	at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156)
	at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488)
	at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487)
	at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213)
	at org.eclipse.e4.ui.workbench.renderers.swt.HandledContributionItem.executeItem(HandledContributionItem.java:438)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.handleWidgetSelection(AbstractContributionItem.java:449)
	at org.eclipse.e4.ui.workbench.renderers.swt.AbstractContributionItem.lambda$2(AbstractContributionItem.java:475)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4209)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1037)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4026)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3626)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156)
	at gov.sandia.dart.application.AbstractDARTApplication.startHeadedClient(AbstractDARTApplication.java:240)
	at gov.sandia.dart.application.AbstractDARTApplication.doStart(AbstractDARTApplication.java:194)
	at gov.sandia.dart.application.AbstractDARTApplication.start(AbstractDARTApplication.java:171)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	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.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
Caused by: java.util.MissingResourceException: Can't find bundle for base name MessagesBundle, locale zh_CN
	at java.base/java.util.ResourceBundle.throwMissingResourceException(Unknown Source)
	at java.base/java.util.ResourceBundle.getBundleImpl(Unknown Source)
	at java.base/java.util.ResourceBundle.getBundleImpl(Unknown Source)
	at java.base/java.util.ResourceBundle.getBundleImpl(Unknown Source)
	at java.base/java.util.ResourceBundle.getBundle(Unknown Source)
	at gov.sandia.bb.commons.I18N.<clinit>(I18N.java:34)
	... 50 more

重点是Caused by: java.util.MissingResourceException: Can't find bundle for base name MessagesBundle, locale zh_CN这句话,这意味着GUI找不到中文包,实际上GUI并没有包含中文包,因此自然找不到。

解决办法1

在发邮件给Dakota团队dakota-users@software.sandia.gov反映这一问题后,回信如下:

Hello naive,
This is a known issue in the Dakota GUI for languages that we do not yet support. However, you can override your computer’s native country/language code by editing the DakotaUI.ini file in the “gui” directory of your install, and adding the following two lines to the bottom of the file:

-Duser.country=US
-Duser.language=en

This should prevent the error from occurring again in the GUI. Please let us know if you experience any further issues.
Thanks
Elliott

在 DakotaUI.ini文件末尾添加这两行即可解决。
在这里插入图片描述

解决办法2

在相应目录下新建中文包,这里以原有的英文包作为代替品。

  1. 在GUI安装目录下搜索messages,打开两个MessagesBundle_en.properties文件所在位置
    在这里插入图片描述
    在这里插入图片描述
  2. 以记事本打开这两个文件后,在原来的目录下另存为MessagesBundle_zh_CN.properties,如图所示。
    在这里插入图片描述
    在这里插入图片描述
  3. 重启DakotaUI.exe,即可正常使用。
    在这里插入图片描述

参考资料

Dakota官网
GUI手册

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

卢家波

如果对你有帮助,请我喝杯茶吧

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值