exclamation-circle [Solved] XMI Export Failing on Mac OS X10.10.5

4 years 10 months ago - 4 years 10 months ago #3681 by dwpoulin
I created a simple class diagram (see attached) with one class and one string attribute and I'm trying to export to XMI. I'm selecting compatibility OMG UML2.4.1 with extension .xmi.

I just downloaded the latest from the site: Modelio 3.4.0 - MacOS X.

But in the error logs I'm seeing this exception:
2015-10-04 15:52:22,102 ERROR org.modelio.xmi  - null
java.lang.NullPointerException: null
	at org.modelio.xmi.util.ModelioPrimitiveTypeMapper.setEcorePredefinedType(ModelioPrimitiveTypeMapper.java:113)
	at org.modelio.xmi.model.objing.OAttribute.setType(OAttribute.java:386)
	at org.modelio.xmi.model.objing.OAttribute.setProperties(OAttribute.java:136)
	at org.modelio.xmi.generation.ExportModel.finishElementCreation(ExportModel.java:137)
	at org.modelio.xmi.generation.ExportModel.export(ExportModel.java:76)
	at org.modelio.xmi.generation.XMIExportBehavior.visitAttribute(XMIExportBehavior.java:289)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitAttribute(OwnershipMetamodelVisitor.java:403)
	at org.modelio.metamodel.impl.uml.statik.AttributeImpl.accept(AttributeImpl.java:242)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitClassifier(OwnershipMetamodelVisitor.java:526)
	at org.modelio.metamodel.visitors.DefaultModelVisitor.visitGeneralClass(DefaultModelVisitor.java:1388)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitGeneralClass(OwnershipMetamodelVisitor.java:891)
	at org.modelio.metamodel.visitors.DefaultModelVisitor.visitClass(DefaultModelVisitor.java:1040)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitClass(OwnershipMetamodelVisitor.java:503)
	at org.modelio.metamodel.impl.uml.statik.ClassImpl.accept(ClassImpl.java:117)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitModelTree(OwnershipMetamodelVisitor.java:1162)
	at org.modelio.metamodel.visitors.DefaultModelVisitor.visitNameSpace(DefaultModelVisitor.java:1628)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitNameSpace(OwnershipMetamodelVisitor.java:1170)
	at org.modelio.metamodel.visitors.DefaultModelVisitor.visitPackage(DefaultModelVisitor.java:1742)
	at org.modelio.xmi.generation.OwnershipMetamodelVisitor.visitPackage(OwnershipMetamodelVisitor.java:1329)
	at org.modelio.metamodel.impl.uml.statik.PackageImpl.accept(PackageImpl.java:202)
	at org.modelio.xmi.generation.ExportServices.createEcoreModel(ExportServices.java:237)
	at org.modelio.xmi.gui.ExportThread.run(ExportThread.java:67)
	at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Attachments:

Please Log in or Create an account to join the conversation.

4 years 10 months ago #3682 by dwpoulin
I just downloaded the previous version for Mac (Modelio 3.3.1 - MacOS X) and that version was able to successfully export to XMI without the error being thrown.

Please Log in or Create an account to join the conversation.

4 years 10 months ago #3684 by ebr
You are right, an issue has already been submitted if you want to follow its resolution here is a the link forge.modelio.org/issues/256

Please Log in or Create an account to join the conversation.

4 years 10 months ago #3697 by chintan
Hi,
I ran into same issue of XMI export not working with Modelio 3.4.0 on Mac OS X 10.10.4. Unfortunately I realized this after I spent couple days defining my model(classes and class diagram).
I installed Modelio 3.3. However the Modelio 3.4 project will not import into Modelio 3.3 which I was not expecting to, but tried anyways.

Can anyone suggest a better option. I am thinking:
1. Manually create model in Modelio 3.3 again. Maybe 1 day work
2. See if I can apply the patch/fix that was done by Etienne Brosse a week back(thought its marked 50% complete). Not sure how much work I have to do.
3. Any other suggestions....

Thanks.

Please Log in or Create an account to join the conversation.

4 years 10 months ago #3699 by ebr
Hi,

Unfortunatly your best option right now would be to recreate your model under Modelio3.3.

This issue has been solved (50% complete) and the fix will be delivered (100% complete) in the next version.

Best,

EBR

Please Log in or Create an account to join the conversation.

4 years 9 months ago - 4 years 9 months ago #3736 by apocheau
Hello, so first of all this bug is not only related to Max OS X build.

I propose two ways to get ride of this bug.
The second will be proposed as a bugfix in the issue .

1- New DataType
You can create a new DataType String and replace all of your strings in your model by this new one. Doing this you will be able to export your XMI.
But now you need to edit the generated XMI to replace the custom String by the official one:
At the end of the XMI file, look for the id of your custom String:
<packagedElement xmi:type="uml:DataType" xmi:id="_vEgq1oL2EeWxscEJhs2ANw" name="String"/>
Search for all the occurances of this id in your file and edit the lines:
<ownedAttribute xmi:type="uml:Property" xmi:id="_vEgq0IL2EeWxscEJhs2ANw" name="name" visibility="public" type="_vEgq1oL2EeWxscEJhs2ANw" isUnique="false"/>
become:
<ownedAttribute xmi:type="uml:Property" xmi:id="_vEgq0IL2EeWxscEJhs2ANw" name="name" visibility="public" isUnique="false">
  <type xmi:type="uml:PrimitiveType" href="http://www.omg.org/spec/UML/20110701/PrimitiveTypes.xmi#String"/>
</ownedAttribute>

Now you can use your XMI as usual.

2- Edit the source code
As detailed in the wiki , get a working developpement environnment (JDK, Eclipse, ...), download the sources, configure the workspace in ecplise and edit the file "xmi.src.org.modelio.xmi.generation.GenerationProperties.java".

Line 117, in GenerationProperties() add:
if(ecoreUMLTypes == null){
  ecoreUMLTypes = new EcoreUMLTypes();
}

Now you are good to build your "fixed" version of Modelio 3.4 and export your XMI without the need to edit the exported XMI.

Please Log in or Create an account to join the conversation.

Moderators: tmaaabcde
Time to create page: 0.047 seconds
^ Back to Top