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 20, 2018

Applies to:

Oracle Containers for J2EE - Version: and later   [Release: AS10gR2 and later ]
Information in this document applies to any platform.


(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: Connection refused: connect; nested exception is: 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, "welcome");
env.put(Context.PROVIDER_URL, "opmn:ormi://<FQservername>:6003:ejbs/ejbsamples");
Context jndiCon = new InitialContext(env);

Note: 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


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

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