2

我正在尝试使用ObjectAidUML 图工具。

当我尝试在 spring boot 项目
( ⌘ + N -> ObjectAid Class Diagram ) 中为我的包创建 UML 图时,当我点击完成时,没有任何反应,
窗口保持原样,但在日志中,出现异常。

看到这张图片

每次单击“完成”时都会出现以下异常。:-

java.lang.NoClassDefFoundError: Could not initialize class com.thoughtworks.xstream.converters.collections.PropertiesConverter
at com.thoughtworks.xstream.XStream.setupConverters(XStream.java:647)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:445)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:385)
at com.thoughtworks.xstream.XStream.<init>(XStream.java:342)
at com.objectaid.uml.model.persistence.DiagramXStream.<init>(DiagramXStream.java:30)
at com.objectaid.uml.model.diagram.DiagramFactory.createXStream(DiagramFactory.java:99)
at com.objectaid.uml.model.diagram.DiagramFactory.getStream(DiagramFactory.java:89)
at com.objectaid.uml.model.diagram.DiagramFactory.marshal(DiagramFactory.java:268)
at com.objectaid.uml.model.diagram.DiagramFactory.marshalComplete(DiagramFactory.java:297)
at com.objectaid.uml.editor.NewDiagramWizard.createNewFile(NewDiagramWizard.java:99)
at com.objectaid.uml.editor.NewDiagramWizard.performFinish(NewDiagramWizard.java:59)
at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:832)
at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:472)
at org.eclipse.jface.dialogs.Dialog.lambda$0(Dialog.java:619)
at org.eclipse.swt.events.SelectionListener$1.widgetSelected(SelectionListener.java:84)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:252)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4441)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4227)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3837)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.handlers.WizardHandler$New.executeHandler(WizardHandler.java:263)
at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:283)
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(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
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.ui.internal.handlers.LegacyHandlerService.executeCommand(LegacyHandlerService.java:389)
at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:142)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:414)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4441)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4227)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3837)
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 org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152)
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(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:654)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
at org.eclipse.equinox.launcher.Main.run(Main.java:1462)

我在 mac 上,按照官方页面的安装说明进行操作:https ://www.objectaid.com/install-objectaid

日食版本

面向企业 Java 和 Web 开发人员的 Eclipse IDE(包括孵化组件)

版本:2021-06 (4.20.0) 内部版本号:20210612-2011

4

1 回答 1

1

似乎不再维护 ObjectAid。我在 JDK17 上运行时遇到此错误。

有一个解决方法:

  1. 下载xstream 1.4.18 jar
  2. 找到com.objectaid.uml_1.2.4.jar文件并打开它(使用您选择的 zip 工具)
  3. 删除xstream-1.3.1.jarlib 目录中的文件。将 xstream-1.4.18.jar 添加到 lib 目录。
  4. 打开文件 META-INF/MANIFEST.MF 并将行替换lib/xstream-1.3.1.jarlib/xstream-1.4.18.jar.
  5. 添加到eclipse.ini以下 vmargs:--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED

重启 Eclipse-clean以确保清除 OSGI 缓存。

于 2022-01-20T11:07:21.043 回答