Rmi Invocation of Remote BPEL Process Error (Doc ID 365533.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle(R) BPEL Process Manager - Version: 10.1.2.0.0
This problem can occur on any platform.

Symptoms

The following java code is used to invoke a remote BPEL process. it works fine for java
application, but it fails when you embedded this code in JSP. The error message is

Error Message
Invoking BPEL process as a remote process

java.lang.Exception: Failed to create "ejb/collaxa/system/DomainManagerBean"
bean; exception reported is: "java.lang.NullPointerException: domain was null
at com.evermind.server.rmi.RMIServer.addNode(RMIServer.java:858)
at com.evermind.server.rmi.RMIServer.getConnection(RMIServer.java:961)
at
com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(RMIInitialCon
textFactory.java:333)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
at javax.naming.InitialContext.init(InitialContext.java:219)
at javax.naming.InitialContext.(InitialContext.java:195)


Java source code

import java.util.Properties;
import java.util.Map;
import java.util.Hashtable;
import javax.naming.InitialContext;
import javax.naming.Context;

import com.oracle.bpel.client.ClientDefs;
import com.oracle.bpel.client.Locator;
import com.oracle.bpel.client.NormalizedMessage;
import com.oracle.bpel.client.delivery.IDeliveryService;

public class RMIClient
{

public static void main(String[] args) throws Exception {

String ssn = "123456789";
if (args.length == 1) {
ssn = args[0];
}

try{
System.out.println("ssn is " + ssn);
String xml = "<ssn xmlns=\"http://services.otn.com\">" + ssn + "</ssn>";
String jndiFactory = "com.evermind.server.rmi.RMIInitialContextFactory";
String jndiUsername = "admin";
String jndiPassword = "welcome";
String jndiProviderUrl =
"opmn:ormi://lnxcde30.corp.pbgc.gov:6003:OC4J_BPEL/orabpel";
Hashtable jndi = new Hashtable();
jndi.put(Context.PROVIDER_URL, jndiProviderUrl);
jndi.put(Context.INITIAL_CONTEXT_FACTORY, jndiFactory);
jndi.put(Context.SECURITY_PRINCIPAL, jndiUsername);
jndi.put(Context.SECURITY_CREDENTIALS, jndiPassword);
Locator locator = new Locator("default","ias01bpel",jndi);

IDeliveryService deliveryService =
(IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
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") );
}catch(Exception e)
{
e.printStackTrace();
}
}
}






Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms