5

I'm trying to use ObjectAid tool for UML diagram.

When I tried to create UML diagram for my package, in spring boot project
(⌘ + N -> ObjectAid Class Diagram ) , and when I hit finish, nothing happens, the
window remains as it is, but in log, an exception appears.

 see this image

The below exception appears each time I click on 'finish'.:-

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)

I am on mac, followed installation instructions from official page: https://www.objectaid.com/install-objectaid

Eclipse version:

Eclipse IDE for Enterprise Java and Web Developers (includes Incubating components)

Version: 2021-06 (4.20.0) Build id: 20210612-2011

ROHIT KUMAR
  • 71
  • 1
  • 6

2 Answers2

8

It seems that ObjectAid is no longer maintained. I got this error running on JDK17.

There is a workaround:

  1. Download xstream 1.4.18 jar
  2. Locate the com.objectaid.uml_1.2.4.jar file and open it (with the zip tool of your choice)
  3. Delete the xstream-1.3.1.jar file inside the lib directory. Add the xstream-1.4.18.jar to the lib directory.
  4. Open the file META-INF/MANIFEST.MF and replace line lib/xstream-1.3.1.jar with lib/xstream-1.4.18.jar.
  5. Add to your eclipse.ini the following 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

Restart Eclipse with -clean to ensure the OSGI cache is purged.

exo_cw
  • 1,710
  • 1
  • 14
  • 11
  • 1
    Having done all of the above, on Eclipse 2022.06, JDK 17.0.1, this did NOT work, and I get this in the log : `!ENTRY org.eclipse.ui 4 0 2022-07-06 14:45:57.596 !MESSAGE Unhandled event loop exception !STACK 0 java.lang.NullPointerException: Cannot invoke "com.thoughtworks.xstream.io.naming.NameCoder.encodeNode(String)" because "this.nameCoder" is null` – Daric Jul 06 '22 at 13:01
  • 1
    The installation goes correctly but still blocked when i want to click finish button that has no effect. At Eclipse start I have the following message : Diagram with version 1.2.4 is invalid for previous existing ucls files. I use Eclipse 4.23 R on Windows 64 bits with JDK17. May be I missed a thing modifying eclipse.ini if you could post a full ini file example. Also what do you mean by Restart with -clean ? – froggy Jul 25 '22 at 15:58
  • Does anyone has any way to know what happened? I was able to find these pages https://ecorp.sos.ga.gov/BusinessSearch/BusinessInformation?businessId=1591528&businessType=Domestic%20Limited%20Liability%20Company&fromSearch=True https://opencorporates.com/companies/us_ga/11007056 which says the company is "Status Admin. Dissolved" as of 09/30/2021 There is an agent name mentioned, "Felix Mayer", is anyone in US able to contact this agent and inquiry what happened? People (like me) still have paid licenses which I can't install anymore on new computers... – Cristiano Costantini Oct 05 '22 at 14:44
  • Sad news, I think the author of ObjectAid was killed in a accident https://www.mdjonline.com/neighbor_newspapers/northside_sandy_springs/news/sandy-springs-police-arrest-suspect-accused-of-killing-bicyclist-in-hit-and-run-case/article_ad23098e-889b-11ea-8b6b-c7acd8377384.html :-( – Cristiano Costantini Oct 06 '22 at 06:50
  • It is essential to double check the vmargs. Only after adding the missing `--add-opens=java.base/java.text=ALL-UNNAMED` and `--add-opens=java.desktop/java.awt.font=ALL-UNNAMED` arguments, I was able to make the wizard to actually create the diagram on hitting the finish button. Also i did not repackage the plugin to zip but left it expanded and referenced it as 'local' directory when adding it as install repository to eclipse. – Martin Peter May 04 '23 at 11:35
0

Working with Eclipse 2022-09 and Java 17, I faced similar issues as described initially. For that I just followed the points 1 .- 4., but worked on an "installation archive" of ObjectAID.

Instead of editing the eclipse.ini, I simply uninstalled the 'old' ObjectAID and re-installed it from that edited "installation archive". That worked!

4b0
  • 21,981
  • 30
  • 95
  • 142
CDerksen
  • 46
  • 3