invoke bpel from java - Failed to create "ejb/collaxa/system/DeliveryBean
432354Oct 24 2006 — edited Oct 25 2006Hi,
I have a very simple java class to invoke CreditRatingProcess sample:
----
String ssn = null;
if (ssn == null)
ssn = "123-12-1234";
String xml =
"<ssn xmlns=\"http://services.otn.com\">" + ssn + "</ssn>";
Locator locator = new Locator("default", "oc4jadmin", "localhost");
IDeliveryService deliveryService =
(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME);
// construct the normalized message and send to Oracle BPEL Process Manager
NormalizedMessage nm = new NormalizedMessage();
nm.addPart("payload", xml);
NormalizedMessage res =
deliveryService.request("CreditRatingService", "process", nm);
Map payload = res.getPayload();
System.out.println("BPELProcess CreditRatingService executed!<br>");
System.out.println("Credit Rating is " + payload.get("payload"));
--------
When I try to execute, I have the following error:
java.lang.Exception: Failed to create "ejb/collaxa/system/DeliveryBean" bean; exception reported is: "javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:645)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:284)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:279)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at docsdemo.bpelapi.BPELProcess.callProcess(BPELProcess.java:84)
at docsdemo.bpelapi.tests.Test1.<init>(Test1.java:14)
at docsdemo.bpelapi.tests.Test1.main(Test1.java:18)
".
at com.oracle.bpel.client.util.BeanRegistry.lookupDeliveryBean(BeanRegistry.java:293)
at com.oracle.bpel.client.delivery.DeliveryService.getDeliveryBean(DeliveryService.java:250)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:83)
at com.oracle.bpel.client.delivery.DeliveryService.request(DeliveryService.java:53)
at docsdemo.bpelapi.BPELProcess.callProcess(BPELProcess.java:84)
at docsdemo.bpelapi.tests.Test1.<init>(Test1.java:14)
at docsdemo.bpelapi.tests.Test1.main(Test1.java:18)
I use SOA suite 10.1.3 Developer Preview and JDeveloper 10.1.3
Can you help me?
Cyryl
Message was edited by:
cbalmati
Message was edited by:
cbalmati