[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.technology.gmt] [MOFScript] directly java execution
|
- From: carceen@xxxxxxxxx (Carlos Cetina)
- Date: Thu, 1 Jun 2006 00:49:19 +0000 (UTC)
- Newsgroups: eclipse.technology.gmt
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
Hi,
I am trying to execute mofscript's templates directly from java code.
This is the code i have been using:
ExecutionManager mofscriptEngine= ExecutionManager.getExecutionManager();
mofscriptEngine.loadSourceMetaModel(metaModelPath);
mofscriptEngine.loadSourceModel(new File(modelPath));
mofscriptEngine.loadTransformationModel(new File(m2tFilePath));
try {
mofscriptEngine.executeTransformation();
} catch (MofScriptExecutionException e) {
// TODO Auto-generated catch block
System.out.println("MofscriptERROR: " + e.getMessage());
}
But i got this 2 errors:
After invoke the loadSourcemodel method i get in the console:
## Loading source model -
MeetingsRoom.pervml...java.lang.ClassCastException:
org.eclipse.emf.ecore.util.EObjectContainmentEList
(375 - Msec)
And after invoke the loadTransformationModel i got and exception:
Exception in thread "main"
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1$DiagnosticWrappedException:
org.xml.sax.SAXParseException: Content is not allowed in prolog.
Any idea about the errors?
Thanks