-
Notifications
You must be signed in to change notification settings - Fork 0
Problem Resolving
This page is about several problems, which occured in development. The applied solutions / workarounds are stated.
Symptom: Nullpointer Exception when running MWE, e.g. in a method findGenModel.
Reason: An Ecore model cannot be found by the Standalone setup, e.g. since it is linked by platform:/plugin
and no special uri-mapping is defined.
Solution: Give the MWE2 Workflow more information, e.g. an uri-mapping
bean = org.eclipse.emf.mwe.utils.StandaloneSetup {
platformUri="${rootPath}"
scanClassPath = true
uriMap = {
from = "platform:/plugin/de.unistuttgart.iste.sqa.mpw.modeling.mpw/model/MiniProgrammingWorld.ecore"
to = "platform:/resource/de.unistuttgart.iste.sqa.mpw.modeling.mpw/model/MiniProgrammingWorld.ecore"
}
}
Symptom: Henshin states, that a platform:/resource model cannot be found.
Reason: It seems, that Henshin cannot deal with platform:/resource, if the model is not available in workspace, since it is integrated by an installed plugin.
Solution: In case of installed plugin dependency, use platform:/plugin
(in import package dialog, choose "from registry").
Symptom: Henshin is confused with a meta-model, which is set in an dependent Ecore other than in imported packages. Example: Hamster.ecore imports MPW.ecore with "platform:/resource" (aka. "../.."), but Henshin uses it from registry via NS-URI or "platform:/plugin". Reason: It seems, that Henshin can only recognize cross-references (like inheritance) between ecores correctly, if the same URI sytnax is applied. Solution: Ensure that in the Ecore file, the cross-references to the parent Ecore are equal to the Henshin one.
Since the local "mvn install" does not correctly deploy the mpw-framework to $MAVEN_HOME/p2/osgi, we can use a locally built mpw-framework in a concrete modeling environment another way:
- build the MPW framework with "mvn package"
- copy the path to the releng updatesite target/repository path
- enter it in the target enviroment as a target site:
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<repository location="file:///D:/Workspace/tipmin/mpw-modeling-framework/releng/de.unistuttgart.iste.sqa.mpw.updatesite/target/repository"/>
<unit id="de.unistuttgart.iste.sqa.mpw.feature.feature.group" version="0.0.0"/>
</location>