Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Modeling (top-level project) » Open BPMN model in main method
Open BPMN model in main method [message #599432] Fri, 21 September 2007 12:41
Eclipse UserFriend
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
Previous Topic:[EMF Resource] to generate a comment at end of xml file using resource.save
Next Topic:'EStructuralFeature' is not a valid classifier
Goto Forum:
  


Current Time: Thu Apr 25 19:22:02 GMT 2024

Powered by FUDForum. Page generated in 0.03588 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top