You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a process that transforms a model from its native format to OML. The process can run as a single step, or be divided up into two steps. In the latter case, the output of the first step is a single omlzip file, which is also the input to the second step. If I run the process as a single step, everything works as expected. However, if I run the process in two steps, and save the intermediate model as omlzip, and then try to load it during the second step, I get a NullPointerException.
The trace + context is as follows:
Starting transformation to IMCE OML
Building caches...
- Aspects... [done]
- Concepts... [done]
- ReifiedRelationships... [done]
- ConceptInstances... [done]
- ScalarDataPropertyValues... java.lang.NullPointerException
at gov.nasa.jpl.caesar.adapters.magicdraw.utilities.OMLSysMLEmbeddingHelper$8.accept(OMLSysMLEmbeddingHelper.java:343)
at gov.nasa.jpl.caesar.adapters.magicdraw.utilities.OMLSysMLEmbeddingHelper$8.accept(OMLSysMLEmbeddingHelper.java:340)
at java.lang.Iterable.forEach(Iterable.java:75)
at gov.nasa.jpl.caesar.adapters.magicdraw.utilities.OMLSysMLEmbeddingHelper.rebuildUMLModelCache(OMLSysMLEmbeddingHelper.java:360)
at gov.nasa.jpl.caesar.adapters.magicdraw.transformation.export.MDOML2IMCEOMLTransformationNew.toOML(MDOML2IMCEOMLTransformationNew.java:208)
at gov.nasa.jpl.caesar.adapters.magicdraw.transformation.export.MDOML2IMCEOMLTransformationNew.toOML(MDOML2IMCEOMLTransformationNew.java:151)
at gov.nasa.jpl.caesar.adapters.magicdraw.transformation.app.MDExporter.mdOml2Oml(MDExporter.java:352)
at gov.nasa.jpl.caesar.adapters.magicdraw.transformation.app.MDExporter.execute(MDExporter.java:319)
at gov.nasa.jpl.caesar.adapters.magicdraw.transformation.app.MDExporter.main(MDExporter.java:608)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.nomagic.magicdraw.MainMethodLauncher.launch(MainMethodLauncher.java:26)
at com.nomagic.magicdraw.ApplicationGateway.start(ApplicationGateway.java:46)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:380)
at com.nomagic.osgi.launcher.FrameworkLauncher$DefaultApplication.run(FrameworkLauncher.java:226)
at com.nomagic.osgi.launcher.FrameworkLauncher.runFrameworkApplication(FrameworkLauncher.java:176)
at com.nomagic.osgi.launcher.FrameworkLauncher.run(FrameworkLauncher.java:118)
at com.nomagic.osgi.launcher.FrameworkLauncher.run(FrameworkLauncher.java:92)
at com.nomagic.osgi.launcher.ProductionFrameworkLauncher.run(ProductionFrameworkLauncher.java:70)
at com.nomagic.osgi.launcher.ProductionFrameworkLauncher.main(ProductionFrameworkLauncher.java:57
The NullPointerException is triggered in the following code fragment:
print(" - ScalarDataPropertyValues... ")
umlModel.singletonScalarDataPropertyValues.forEach[sdpv |
val ci = sdpv.singletonInstance
val sdpName = sdpv.scalarDataProperty.name() // Line 343 in the generated java file
...
]
From this, the logical conclusion is that sdpv.scalarDataProperty is null. sdpv itself cannot be null, since line 342 executed fine.
An OMLZip file for inspection can be provided upon request.
The text was updated successfully, but these errors were encountered:
Hi,
I have a process that transforms a model from its native format to OML. The process can run as a single step, or be divided up into two steps. In the latter case, the output of the first step is a single omlzip file, which is also the input to the second step. If I run the process as a single step, everything works as expected. However, if I run the process in two steps, and save the intermediate model as omlzip, and then try to load it during the second step, I get a
NullPointerException
.The trace + context is as follows:
The
NullPointerException
is triggered in the following code fragment:From this, the logical conclusion is that
sdpv.scalarDataProperty
is null.sdpv
itself cannot be null, since line 342 executed fine.An OMLZip file for inspection can be provided upon request.
The text was updated successfully, but these errors were encountered: