Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[bpel-dev] Fw: help

Hi Mohamed,

I am no longer involved in the BPEL Designer project, but I am sure the
people on the mailing list will help


Mit freundlichen Grüßen / Kind regards

Simon Moser

Architect, GTS Cloud Development and Test
IBM Global Technology Services
Dept. C453, IBM Research & Development Boeblingen

-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland
Schoenaicher Str. 220
71032 Boeblingen
Phone: +49-7031-16-4304
Fax: +49-7031-16-4890
E-Mail: smoser@xxxxxxxxxx
-------------------------------------------------------------------------------------------------------------------------------------------
IBM Deutschland Research & Development GmbH / Vorsitzender des
Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht
Stuttgart, HRB 243294

----- Forwarded by Simon D Moser/Germany/IBM on 10.04.2011 15:28 -----
|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |kerdoudi mohamed <ker_moh2000@xxxxxxxx>                                                                                                           |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Simon D Moser/Germany/IBM@IBMDE                                                                                                                   |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |10.04.2011 01:40                                                                                                                                  |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |help                                                                                                                                              |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





                                                                       
  Dear Sir,                                                            
                                                                       
                                                                       
 I develop this code to generate a bpel File using the bpel API,       
                                                                       
                                                                       
 protected void createBPEL(File bpelFile) {                            
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
 URI uri = URI.createFileURI(bpelFile.getAbsolutePath())             
                                                                       
                                                                       
      BPELResourceSetImpl fResourceSet = new BPELResourceSetImpl();  
                                                                       
                                                                       
         BPELFactory.eINSTANCE.eClass();                               
                                                                       
                                                                       
      EcoreFactory.eINSTANCE.eClass();                                 
                                                                       
                                                                       
 fResourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("bpel", new BPELResourceFactoryImpl());
                                                                       
                                                                       
 fResourceSet.getPackageRegistry().put(BPELPackage.eNS_URI, BPELPackage.eINSTANCE);
                                                                       
                                                                       
      BPELResource bpelResource = (BPELResource) fResourceSet.createResource(uri);
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
      BPELFactory factory = BPELFactory.eINSTANCE;                   
                                                                       
                                                                       
    org.eclipse.bpel.model.Process process = factory.createProcess();
                                                                       
                                                                       
             process.setName("FirstBPEL");                             
                                                                       
                                                                       
             Sequence seq = factory.createSequence();                
                                                                       
                                                                       
             seq.setName("MainSequence");                              
                                                                       
                                                                       
       process.setActivity(seq);                                       
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
 ///  Save the created process                                         
                                                                       
                                                                       
             bpelResource.getContents().add(process);                  
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
             try {                                                     
                                                                       
                                                                       
                   bpelResource.save(null);                            
                                                                       
                                                                       
             } catch (IOException e) {                                 
                                                                       
                                                                       
                   e.printStackTrace();                                
                                                                       
                                                                       
             }                                                         
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
 When I execute the program this exception is appeared                 
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
 Exception in thread "main" java.lang.IllegalStateException: INamespaceMap cannot be attached to an eObject
                                                                       
                                                                       
       at org.eclipse.bpel.model.util.BPELUtils.getNamespaceMap(BPELUtils.java:285)
                                                                       
                                                                       
       at org.eclipse.bpel.model.resource.BPELResourceImpl.doSave(BPELResourceImpl.java:95)
                                                                       
                                                                       
       at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1406)
                                                                       
                                                                       
       at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:993)
                                                                       
                                                                       
       at gen.evol.qu. myproject.createBPEL(Gen.java:386)              
                                                                       
                                                                       
       at gen.evol.qu.myproject.main(Gen.java:109)                     
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
 the same exception is appeared when I read a saved bpel file.         
                                                                       
                                                                       
 can you help me to solve this problem,                                
                                                                       
                                                                       
 Thanks                                                                
                                                                       
                                                                       
                                                                       
                                                                       
                                                                       
 Best Regards                                                          
                                                                       






Back to the top