Could not find a GenModel for EPackage ‘http://www.eclipse.org/xtext/common/JavaVMTypes’

20. September, 2012

If you added

import "http://www.eclipse.org/xtext/common/JavaVMTypes" as jvmTypes

to your DSL and now you get this error:

java.lang.RuntimeException: Could not find a GenModel for EPackage 'http://www.eclipse.org/xtext/common/JavaVMTypes'
If the missing GenModel has been generated via EcoreGeneratorFragment make sure to run it first in the workflow.
If you have a *.genmodel-file, make sure to register it via StandaloneSetup.registerGenModelFile(String)
	at org.eclipse.xtext.generator.GenModelAccess.getGenModelResource(GenModelAccess.java:119)
	at org.eclipse.xtext.generator.ecore.EcoreGeneratorFragment.findEPackagesInGenPackages(EcoreGeneratorFragment.java:347)

then add this line

registerGenModelFile = "platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel"

to the “bean” block in your MWE2 workflow. It should then look like this:

Workflow {
    bean = StandaloneSetup {
        scanClassPath = true
        platformUri = "${runtimeProject}/.."
		registerGenModelFile = "platform:/resource/org.eclipse.xtext.common.types/model/JavaVMTypes.genmodel"
    }

How To Ask Questions The Smart Way

20. September, 2012

When you write software, you get bug reports and pleas for help. When you use software, you sometimes (or even often) stumble over problems and need help.

Since processes of this type involve more than a single person, friction occurs. To reduce this friction, read this document: “How To Ask Questions The Smart Way

It’s a good read for both sides. It will help you understand why some questions irritate you and it will help you understand why you didn’t receive any help when you had a problem.