Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [bpel-dev] Reading a BPEL file

Thank you Simon ,
I have this code and the exception it generating
I had read one of your answers in this post http://dev.eclipse.org/mhonarc/lists/bpel-dev/msg00971.html
you have told that you had a sample plugin to launch something to do with a process by right-click menu
I appreciate that you can send it to me because this is what i'm trying to do
thank you in advance

here are the test and the i was talking about
i put soome printout to test the URI
    IPath path = new Path("myproject/helloworld.bpel");
    IFile bpelFile = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
    IPath fullProcessPath = bpelFile.getFullPath();
    URI uri = URI.createPlatformResourceURI(fullProcessPath.toString(),true);
    //test porintout 
    System.out.println(uri);
    System.out.println(CommonPlugin.resolve(uri));
    ResourceSet fResourceSet = new BPELResourceSetImpl();
        BPELResourceSetImpl bpelResource=null;
        try {
            bpelResource = (BPELResourceSetImpl) fResourceSet.getResource(uri, true);
        } catch (Exception e1) {
            e1.printStackTrace();
        }

and the printout with the exception (just the head of the exception printout) are here  (the file helloworld.bpel exists )

platform:/resource/myproject/helloworld.bpel
file:/C:/Documents%20and%20Settings/Iyad/workspace/fr.inria.example/myproject/helloworld.bpel

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.core.internal.resources.ResourceException: Resource '/myproject/helloworld.bpel' does not exist.
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
    at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:397)
    at fr.inria.example.Activator.start(Activator.java:174)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:783)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:774)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:755)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:352)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:280)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:408)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:449)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:211)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:381)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:457)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:410)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:398)



Simon D Moser wrote:
mmh ... i don't think this code is outdated, I rather think that your URI
is incorrect or something (maybe your file does not reside in an eclipse
workspace, thus you cannot construct a PlatformResourceURI but should
rather use a fileURI then). Can you both post the exception that you are
getting ?

Mit freundlichen Grüßen / Kind regards

Simon Daniel Moser

Team Lead BPEL Editor - Websphere Integration Developer (WID)
IBM Software Group, Application and Integration Middleware Software
Business Process Solutions Development 1
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
  Phone:            +49-7031-16-4304           IBM Deutschland                      (Embedded 
                                                                                  image moved 
                                                                                     to file: 
                                                                                pic26738.gif) 
                                                                                              
  Fax:              +49-7031-16-4890           Schoenaicher Str. 220                          
                                                                                              
  E-Mail:           smoser@xxxxxxxxxx          71032 Boeblingen.                              
                                                                                              
                                               Germany                                        
                                                                                              
                                                                                              
                                                                                              
                                                                                              
                                                                                              
  IBM Deutschland                                                                             
  Research &                                                                                  
  Development                                                                                 
  GmbH /                                                                                      
  Vorsitzender des                                                                            
  Aufsichtsrats:                                                                              
  Martin Jetter                                                                               
  Geschäftsführung:                                                                           
  Erich Baier                                                                                 
  Sitz der                                                                                    
  Gesellschaft:                                                                               
  Böblingen /                                                                                 
  Registergericht:                                                                            
  Amtsgericht                                                                                 
  Stuttgart, HRB                                                                              
  243294                                                                                      
                                                                                              




|------------>
| From:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |iyad alshabani <iyad.alshabani@xxxxxxxxx>                                                                                                         |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |"BPEL Designer project developer discussions." <bpel-dev@xxxxxxxxxxx>                                                                             |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |10/10/2009 09:40 AM                                                                                                                               |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [bpel-dev] Reading a BPEL file                                                                                                                |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by:   |
|------------>
  >--------------------------------------------------------------------------------------------------------------------------------------------------|
  |bpel-dev-bounces@xxxxxxxxxxx                                                                                                                      |
  >--------------------------------------------------------------------------------------------------------------------------------------------------|





Hi,
I have always the same problem
I have tried to sourround it with the try/catch

try {

            bpelResource = (BPELResourceSetImpl) fResourceSet.getResource
(uri, true);

        } catch (Exception e1) {

            e1.printStackTrace();

        }

and its catching an exception
i don't know why ?
any explaination ?

than k you

fokaefs@xxxxxxxxxxxxxx wrote:
  
Hello,

I am building an Eclipse plug-in for reengineering BPEL files. I tried
to use the BPEL Project's API but I have difficulties in reading the
BPEL file. I've tried the snippet provided here:

http://www.eclipse.org/bpel/developers/model.php

but it seems to be a little outdated. The resourceSet.getResource(uri,
true) command returns a BPELResourceImpl instance, which contains no
process whatsoever. This is the code that I use:

ResourceSet resourceSet = new ResourceSetImpl();
URI uri = URI.createPlatformResourceURI(file.getFullPath().toString());
BPELResourceImpl resource = (BPELResourceImpl)
resourceSet.getResource(uri, true);
org.eclipse.bpel.model.Process process = resource.getProcess();

and the process in the end is null. The file is a validated BPEL file.
Can you tell me whether I do something wrong or there is another problem.

Thank you,
Marios
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev

    
_______________________________________________
bpel-dev mailing list
bpel-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/bpel-dev
  




_______________________________________________ bpel-dev mailing list bpel-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/bpel-dev


Back to the top