Modelio icon indicating copy to clipboard operation
Modelio copied to clipboard

NullPointerException on XMI export of Plant example

Open bhavikm opened this issue 7 months ago • 1 comments

Hi,

I'm using Modelio 5.4 on Windows 11.

I've succesfully loaded the SysML example 'The Plant'. I'm trying to export different packages into XMI (ideally 2.1.1) but keep getting an NullPointerException:

Image

I've tried various different options on the XMI export dialog and different 'packages' under the UML explorer.

The log message for when I try to export the 'Users' package as shown on the screenshot above:

2025-04-29 17:58:46,419 ERROR org.modelio.app.xmi              null
java.lang.NullPointerException: null
	at org.modelio.xmi.util.ScopeChecker.contains(ScopeChecker.java:354)
	at org.modelio.xmi.util.ScopeChecker$ScopeSelector.visitStereotype(ScopeChecker.java:1066)
	at org.modelio.metamodel.impl.uml.infrastructure.StereotypeImpl.accept(StereotypeImpl.java:323)
	at org.modelio.metamodel.impl.uml.infrastructure.ElementImpl.accept(ElementImpl.java:143)
	at org.modelio.xmi.util.ScopeChecker$ScopeSelector.launchVisit(ScopeChecker.java:376)
	at org.modelio.xmi.util.ScopeChecker.contains(ScopeChecker.java:349)
	at org.modelio.xmi.util.ProfileUtils.isInScope(ProfileUtils.java:1335)
	at org.modelio.xmi.model.objing.profile.PExportStereotype.setInheritance(PExportStereotype.java:124)
	at org.modelio.xmi.model.objing.profile.PExportStereotype.setProperties(PExportStereotype.java:74)
	at org.modelio.xmi.model.objing.profile.PExportStereotype.visit(PExportStereotype.java:170)
	at org.modelio.xmi.generation.ProfileExportVisitorImpl.visit(ProfileExportVisitorImpl.java:89)
	at org.modelio.xmi.model.objing.profile.PExportStereotype.accept(PExportStereotype.java:63)
	at org.modelio.xmi.generation.ProfileExportVisitorImpl.visit(ProfileExportVisitorImpl.java:69)
	at org.modelio.xmi.model.objing.profile.PExportProfile.accept(PExportProfile.java:51)
	at org.modelio.xmi.generation.ProfileExportVisitorImpl.visit(ProfileExportVisitorImpl.java:61)
	at org.modelio.xmi.generation.GenerationProperties.getSysMLProfile(GenerationProperties.java:281)
	at org.modelio.xmi.generation.ExportServices.profileDefinition(ExportServices.java:417)
	at org.modelio.xmi.generation.ExportServices.createEcoreModel(ExportServices.java:169)
	at org.modelio.xmi.gui.ExportThread.run(ExportThread.java:57)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)

Any help appreciated!

Thanks

bhavikm avatar Apr 29 '25 08:04 bhavikm

Thanks for the feedback. We will take a look at it.

etiennebrosse avatar May 05 '25 18:05 etiennebrosse