Solved

stand-alone oc4j connection

Posted on 2004-08-09
6
14,655 Views
Last Modified: 2013-12-01
When setting up a stand-alone oc4j connection following the JDev 9.0.3.3 instructions below:

To create a connection to an OC4J instance: In the Navigator, click + to expand the Connections node. Right-click Application Servers. Choose New Connection... from the context menu. The Connection Wizard - Welcome page is displayed. Click Next. Enter a Connection Name for this connection. In the Connection Type list box, select Standalone OC4J. Click Next. Enter the Username and Password for the OC4J admin user to authenticate the connection. This information was specified when OC4J was installed. Default = admin/manager. Select the Deploy Password checkbox if you want to bypass authentication the next time you make this connection. Your password is deployed with your project's connection.xml file. Click Next. On the Connection page, configure the standalone OC4J settings as appropriate. Click Help for more information. Click Next. Click Test Connection. If your connection is successful, click Finish. Otherwise, click Back to return to the previous wizard pages and fix any configuration(s) setting. The configuration to deploy your J2EE applications to a standalone OC4J instance is complete.

When I hit the "Test Connection" button I receive the following error, "IO Error: Connection refused: connect".  I do not know why I am receiving this error, please advise?
0
Comment
Question by:efrainpacheco
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
6 Comments
 
LVL 4

Accepted Solution

by:
ramumorla earned 250 total points
ID: 11755831
You are trying to connect to 9iAS OC4J EJB container via JAVA CLIENT using ORMI:       Context.PROVIDER_URL has the value: "ormi://my-server:my-rmi-port/my-app" + Gets the following errors while running the JAVA CLIENT:  

-----------------------  

java.lang.InstantiationException: Error communicating with server:          Lookup error: java.net.ConnectException: Connection refused: connect;    javax.naming.NamingException: Lookup error: java.net.ConnectException:           Connection refused:

 connect;    
-------------------------- +

You are using same RMI port in the ORMI URL of The CLIENT code,    as mentioned in the "j2ee/home/config/rmi.xml" of 9iAS OC4J. + Works fine with OC4J STANDALONE version.    

Cause

~~~~~~~

 + This is because in 9iAS shiphome, OC4J's RMI port is controled by the opmn.xml,    which by default is at range of 3101-3200.    However, you are using the default RMI port 23791 in the client code, which is incorrect.    Therefore, the client and server port mismatch and hence the connection refused exception.   (In stand-alone OC4J the rmi port is controled by j2ee/home/config/rmi.xml,and its default value is 23791).  + So, to correct the client code with correct rmi port number, we should find the rmi port allocated to that    particular oc4j instance during the startup time.    

Fix
~~~  

There is only one workaround to avoid this bug:

 1)Go to the EMWebsite

2)Select the OC4J instance

3)Select the Server Properties

4)Choose the RMI ports to a specific value( ex:3111) instead of the range of values.

5)Restart the OC4J instance  

6)Change the rmi port in the client code to above set value i.e. "3111".            
0
 

Author Comment

by:efrainpacheco
ID: 11762735
We do not have a middle tier and cannot deploy one on our PC's.  We just want to get the Standalone OC4J connection to work which simulates the middle tier.  The RMI port is <rmi-server port="23791" >.  Here is the exact error we are getting:

javax.naming.NamingException: IO Error: Connection refused: connect

      javax.naming.NamingEnumeration com.evermind.server.rmi.RMIContext.list(java.lang.String, boolean, com.evermind.net.AddressContainer)

            RMIContext.java:347

      javax.naming.NamingEnumeration com.evermind.server.rmi.RMIContext.list(java.lang.String)

            RMIContext.java:291

      javax.naming.NamingEnumeration javax.naming.InitialContext.list(java.lang.String)

            InitialContext.java:390

      void oracle.jdevimpl.cm.dt.browser.jndi.JNDIBrowser._testContext(javax.naming.Context)

            JNDIBrowser.java:175

      void oracle.jdevimpl.cm.dt.browser.jndi.JNDIBrowser.openConnectionBrowser(oracle.jdeveloper.cm.dt.ConnectionBrowsable)

            JNDIBrowser.java:77

      java.lang.Object oracle.jdeveloper.cm.dt.ConnectionNode$NodeOpen.doWork()

            ConnectionNode.java:202

      void oracle.jdeveloper.cm.dt.ProgressRunnable.run()

            ProgressRunnable.java:193

      void oracle.ide.dialogs.ProgressBar.run()

            ProgressBar.java:527

      void java.lang.Thread.run()

            Thread.java:484

Thanks for you help in this matter.
0
 
LVL 4

Expert Comment

by:ramumorla
ID: 11783431
What do you mean you dont have a middle tier-- Even though it is just a simulation it is as good as Middle tier- Mean while simulation may not be a great solution

Have a good day
0
 
LVL 23

Assisted Solution

by:seazodiac
seazodiac earned 250 total points
ID: 11903748
this is a known bug, you should NOT test the connection there.

You just flow through the creation process of OC4J, after you created it,

you will go back to the list component page, and you should be able to connect.
0

Featured Post

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configure Web Service (server application) I. Configure security for Web Services methods First, we need to protect Session bean which implements the service: 1. Open EJB deployment descriptor (ejb-jar.xml) in the EJB project that contains you…
Verbose logging is used to diagnose garbage collector problems. By default, -verbose:gc output is written to either native_stderr.log or native_stdout.log.   It is also possible to redirect the logs to a user-specified file. This article will de…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

635 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question