Open BPMN model in main method [message #599432] |
Fri, 21 September 2007 12:41 |
Eclipse User |
|
|
|
Originally posted by: anders.ottosson3.telia.com
Is there a way to open a bpmn-model in a standalone main method? Since
I'm a n00b at Eclipse BPMN/GMF/EMF I have tried the FAQ (from EMF)
examples with no luck, the result is always:
---
Exception in thread "main"
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1Diagnos ticWrappedException:
org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'version'
not found. (file:/C:/src/test/BPMN/credit_report.bpmn, 2, 175)...
---
The code I have tried with is:
....
ResourceSet resourceSet = new ResourceSetImpl();
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "bpmn",
new BpmnResourceFactoryImpl());
BpmnPackageImpl.eINSTANCE.eClass();
Resource resource = resourceSet.getResource(URI.createFileURI(fileName),
true);
try {
resource.load(null);
} catch (Exception e) {
e.printStackTrace();
}
....
I have added the following jars to the classpath:
org.eclipse.core.runtime_3.2.0.v20060603.jar
org.eclipse.emf.common_2.3.0.v200709042200.jar
org.eclipse.emf.ecore.change_2.3.0.v200709042200.jar
org.eclipse.emf.ecore.xmi_2.3.1.v200709042200.jar
org.eclipse.emf.ecore_2.3.1.v200709042200.jar
org.eclipse.stp.bpmn.diagram_1.0.0.061.jar
org.eclipse.stp.bpmn.edit_1.0.0.061.jar
org.eclipse.stp.bpmn_1.0.0.061.jar
Any help would be greatly appreciated!
Regards
Anders
|
|
|
Powered by
FUDForum. Page generated in 0.03588 seconds