I am trying to find out if we can test BRM adapter from Java.
I am trying to write a java code to connect to a BRM jca adapter and send input messages to its opcodes.
The BRM adapter is deployed on a soa server which is not on my machine.
Following is the code where i am just trying to lookup the jndi.
ConnectionFactory connectionFactory = null;
Hashtable props = new Hashtable();
props.put(Context.PROVIDER_URL, "jnp://lcl2110:11960"); // lcl2110 11960 is present in the connection string in the adapter section of em console.
InitialContext ctx= new InitialContext(props);
connectionFactory = (ConnectionFactory)ctx.lookup("java:comp/env/eis/BRM");
Connection connection = connectionFactory.getConnection();
Interaction interaction = connection.createInteraction();
I have caught all the required exceptions.
I have added "connector-api-1.5.jar" in my classpath.
I am getting the following error:
javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]