My Oracle Support Banner

java.jet.ConnectException: Connection refused, when connecting to remote EJB and opmn:ormi syntax used (Doc ID 359103.1)

Last updated on JULY 01, 2021

Applies to:

Oracle Containers for J2EE - Version 10.1.2.0.2 and later
Information in this document applies to any platform.

Symptoms

(Note: Problem believed to be generic, but so far only reported on MS Windows platforms)

Java client is requesting the remote EJB and get's following response

Lookup error: java.net.ConnectException: Connection refused: connect; nested exception is:

java.net.ConnectException: Connection refused: connect

even when java client is using code such as this:

env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "admin");
env.put(Context.SECURITY_CREDENTIALS, "<PASSWORD>");
env.put(Context.PROVIDER_URL, "opmn:ormi://<HOST>.<DOMAIN>:<PORT>:ejbs/ejbsamples");
Context jndiCon = new InitialContext(env);


Note: The above example should be configured for opmn listening into port 6003, oc4j instance 'ejbs' and application named 'ejbsamples'.

The problem reproduces when requesting remotely only , if the ejb bclient is local, it works perfect

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Changes
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.