Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Service Oriented Architecture Tools Platform (STP) » Feature 'version' not found(Feature 'version' not found)
Feature 'version' not found [message #632667] Wed, 13 October 2010 19:39 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
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 20:15 Go to previous message
Missing name Missing name is currently offline Missing name Missing nameFriend
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: Tue Nov 12 19:04:54 GMT 2024

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

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

Back to the top