[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.technology.bpel-designer] Problem when open a bpel file
|
Hi,
i try to open a bpel file with following code:
BPELPackage.eINSTANCE.eClass();
Resource.Factory.Registry reg = Resource.Factory.Registry.INSTANCE;
Map<String, Object> m = reg.getExtensionToFactoryMap();
m.put("bpel", new BPELResourceFactoryImpl());
ResourceSet resSet = new ResourceSetImpl();
URI uri = URI.createURI("test/SynchronousSample.bpel");
Resource resource = resSet.getResource(uri, true);
Process process = (Process)resource.getContents().get(0);
and i got some error messages:
Exception in thread "main" java.lang.IllegalStateException: INamespaceMap
cannot be attached to an eObject
at
org.eclipse.bpel.model.util.BPELUtils.getNamespaceMap(BPELUtils.java:260)
at
org.eclipse.bpel.model.resource.BPELReader.saveNamespacePrefix(BPELReader.java:512)
at
org.eclipse.bpel.model.resource.BPELReader.xml2Process(BPELReader.java:932)
at
org.eclipse.bpel.model.resource.BPELReader.xml2Resource(BPELReader.java:912)
at org.eclipse.bpel.model.resource.BPELReader.pass1(BPELReader.java:389)
at org.eclipse.bpel.model.resource.BPELReader.read(BPELReader.java:321)
at
org.eclipse.bpel.model.resource.BPELResourceImpl.doLoad(BPELResourceImpl.java:132)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1445)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1241)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:255)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:270)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
at main(Loadtest.java:38)
i do not know how to solve it. Can anyone give me some advices?
regards