Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Service Oriented Architecture Tools Platform (STP) » Feature 'version' not found(Feature 'version' not found)
Feature 'version' not found [message #632667] Wed, 13 October 2010 15:39 Go to next message
Missing name Missing name is currently offline Missing name Missing name
Messages: 12
Registered: July 2010
Junior Member
Hi,

I am trying to programatically read a BPMN file created using Eclipse BPMN editor. I am getting the following error while trying to read the model:

Feature 'version' not found. (file:///C:/code/workspaces/bpmn/BPMNPoC/src/GPGJoin.bpmn, 2, 175)

The following is my source code:

public class BPMNReader {
	
	@SuppressWarnings("unchecked")
	public static void main(String[] args) {
		registerMetaModels();
		
		ResourceSet resourceSet = new ResourceSetImpl();
		
		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn", new BpmnResourceFactoryImpl());
		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("xmi", new EcoreFactoryImpl());

		Resource resource = resourceSet.getResource(URI.createFileURI("src/GPGJoin.bpmn"), true);
	}

	private static void registerMetaModels() {
		EcorePackage.eINSTANCE.eClass();
		EcoreFactory.eINSTANCE.eClass();
		GMFGraphPackage.eINSTANCE.eClass();
		GMFMapPackage.eINSTANCE.eClass(); 
		GMFToolPackage.eINSTANCE.eClass();
		NotationPackage.eINSTANCE.eClass();
		BpmnPackage.eINSTANCE.eClass();
		BpmnFactory.eINSTANCE.eClass();
	}
}


Can someone please tell me how I can fix this error?

Thanks,
Venkat
Re: Feature 'version' not found [message #632672 is a reply to message #632667] Wed, 13 October 2010 16:15 Go to previous message
Missing name Missing name is currently offline Missing name Missing name
Messages: 12
Registered: July 2010
Junior Member
I fixed the issue by modifying the code to the following:

        @SuppressWarnings("unchecked")
	public static void main(String[] args) {
		BpmnPackage.eINSTANCE.eClass();
		
		ResourceSet resourceSet = new ResourceSetImpl();
		resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpmn", new XMIResourceFactoryImpl());

		Resource resource = resourceSet.getResource(URI.createFileURI("src/GPGJoin.bpmn"), true);
		BpmnDiagram bpmnModel = (BpmnDiagram) resource.getContents().get(0);
	}
Previous Topic:BPEL project and SOA Tools Project
Next Topic:Transform STP BPMN Model to raw BPMN?
Goto Forum:
  


Current Time: Wed Jul 23 16:22:30 EDT 2014

Powered by FUDForum. Page generated in 0.02252 seconds