Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » BPEL Designer » load BPEL process - resourceException(Problem with load BPEL process)
load BPEL process - resourceException [message #1165733] Fri, 01 November 2013 13:58 Go to next message
marcin maciorowski is currently offline marcin maciorowskiFriend
Messages: 4
Registered: October 2013
Junior Member

Hi everyone,
I am new on this forum, and I am new to BPEL and PDE.

I am trying to implement eclipse plugin and trying to load BPEL process with it.
So I used this ( http://www.eclipse.org/bpel/developers/model.php ) as help with my topic - Reading and Writing BPEL Files section.

Code snippet for loading process (exactly the same as the one on eclipse page):
	public void loadProcess() {
		// New resource set, or add it to existing one
		ResourceSet resourceSet = new ResourceSetImpl();

		// In non-workbench cases, find another way to create your URI
		URI uri = URI.createPlatformResourceURI("E:/BPELExample.bpel");

		// Use getResource(), not createResource()
		Resource resource = resourceSet.getResource(uri, true);

		// There's only one thing in the list
		this.process = (Process) resource.getContents().get(0);
	}


BPELExample.bpel file was created using BPEL Designer plugin.

When I above method I receive an exception:

org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.core.internal.resources.ResourceException: Resource '/private/Dropbox/engineer/project/aag_test/IBMexamples/processes/travelbookingBPEL.bpel' does not exist.
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:406)
	at reader.BPELReader.loadProcess(BPELReader.java:39)
	at pl.eiti.bpelag.actions.AssignGenerateAction.run(AssignGenerateAction.java:46)
	at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
	at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
	at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
	at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
	at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1057)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4170)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3759)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1113)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:997)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:138)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:610)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1426)
Caused by: org.eclipse.core.internal.resources.ResourceException: Resource '/private/Dropbox/engineer/project/aag_test/IBMexamples/processes/travelbookingBPEL.bpel' does not exist.
	at org.eclipse.core.internal.resources.Resource.checkExists(Resource.java:341)
	at org.eclipse.core.internal.resources.Resource.checkAccessible(Resource.java:215)
	at org.eclipse.core.internal.resources.File.getContents(File.java:287)
	at org.eclipse.core.internal.resources.File.getContents(File.java:278)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl$WorkbenchHelper.createPlatformResourceInputStream(PlatformResourceURIHandlerImpl.java:207)
	at org.eclipse.emf.ecore.resource.impl.PlatformResourceURIHandlerImpl.createInputStream(PlatformResourceURIHandlerImpl.java:525)
	at org.eclipse.emf.ecore.resource.impl.ExtensibleURIConverterImpl.createInputStream(ExtensibleURIConverterImpl.java:360)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1269)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259)
	at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
	... 34 more


BPELExample.bpel file of course exists in the given location.
I need any suggestions what wrong with that.
What should I check/fix?

Re: load BPEL process - resourceException [message #1177325 is a reply to message #1165733] Fri, 08 November 2013 23:03 Go to previous message
marcin maciorowski is currently offline marcin maciorowskiFriend
Messages: 4
Registered: October 2013
Junior Member

Solution is pretty simple, I just forgot to add
org.eclipse.emf.ecore
to MANIFEST.MF Require-Bundle: section

Modified loadProcess() method looks like that:

	public void loadProcess() {
		URI uri = URI.createFileURI("E:/BPELExample.bpel");
		Factory factory = Resource.Factory.Registry.INSTANCE.getFactory(uri);
		this.resource = (BPELResource) factory.createResource(uri);
		try {
			this.resource.load(null);
		} catch (IOException e) {
			e.printStackTrace();
		}
		this.process = (Process) resource.getContents().get(0);
	}
Previous Topic:Manually add external WSDL invocation to existing BEPL stub
Next Topic:BPEL process internal structure - activities order
Goto Forum:
  


Current Time: Sun Dec 21 20:16:56 GMT 2014

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

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