Hi Petter,
when you execute the transformation you use the static metamodel,
i.e., the generated classes. When I look at your Henshin file, it
looks like you imported the Ecore file directly, which basically
means that you use dynamic EMF. You have to make sure that use
either use static or dynamic EMF, but not mixing them (see also
the Henshin FAQ). I assume that you want to use generated model
classes, so that means you need to go with the static metamodel.
Then you can go with one of these options:
1) in the Java code, load first the instance model. After that you
load the module with the additional parameter "true". This will
try to replace the dynamic metamodel references in the Henshin
model by the static ones used by your instance model.
See also
http://download.eclipse.org/modeling/emft/henshin/javadoc/nightly/org/eclipse/emf/henshin/model/resource/HenshinResourceSet.html#getModule(org.eclipse.emf.common.util.URI,
boolean)
or:
2) Create the Henshin file from scratch again, but this time do
not import the ecore file directly, but use Import From Registry
and select your metamodel from the global EMF registry. This
requires though that you are editing your transformation in a
workspace where your metamodel plugins are running already.
I hope this helps. Please not that this is not a Henshin issue but
due to the way how EMF handles static and dynamic versions of the
same metamodels.
Cheers,
Christian