Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » Problem when open a bpel file
Problem when open a bpel file [message #11774] Fri, 08 May 2009 10:57 Go to next message
lancel lau is currently offline lancel lauFriend
Messages: 31
Registered: July 2009
Member
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(BPELUt ils.java:260)
at
org.eclipse.bpel.model.resource.BPELReader.saveNamespacePref ix(BPELReader.java:512)
at
org.eclipse.bpel.model.resource.BPELReader.xml2Process(BPELR eader.java:932)
at
org.eclipse.bpel.model.resource.BPELReader.xml2Resource(BPEL Reader.java:912)
at org.eclipse.bpel.model.resource.BPELReader.pass1(BPELReader. java:389)
at org.eclipse.bpel.model.resource.BPELReader.read(BPELReader.j ava:321)
at
org.eclipse.bpel.model.resource.BPELResourceImpl.doLoad(BPEL ResourceImpl.java:132)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1445)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1241)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:255)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:270)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:397)
at main(Loadtest.java:38)


i do not know how to solve it. Can anyone give me some advices?

regards
Re: Problem when open a bpel file [message #849867 is a reply to message #11774] Thu, 19 April 2012 14:18 Go to previous messageGo to next message
Allen Zhang is currently offline Allen ZhangFriend
Messages: 14
Registered: February 2012
Junior Member
I have the same problem. Can anyone help me?
Re: Problem when open a bpel file [message #855262 is a reply to message #849867] Tue, 24 April 2012 16:54 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi all,

I suggest you have a look at the org.eclipse.bpel.ui.util.BPELReader class - this is used by the editor to load the BPEL model and does a bunch of (necessary!) initialization, including the namespace map.

HTH,
Bob
Previous Topic:exception when opening a BPEL file
Next Topic:Working directory does not exist
Goto Forum:
  


Current Time: Thu Apr 25 09:21:37 GMT 2024

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

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

Back to the top