Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Service Oriented Architecture Tools Platform (STP) » Open BPMN model in main method
Open BPMN model in main method [message #593840] Thu, 20 September 2007 10:04 Go to previous message
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 Ottosson
 
Read Message
Read Message
Read Message
Previous Topic:Migration of STP Source Code to Subversion
Next Topic:Cannot access SOA Preferences pages
Goto Forum:
  


Current Time: Sat May 18 22:08:38 EDT 2013

Powered by FUDForum. Page generated in 0.01628 seconds