Solved

stand-alone oc4j connection

Posted on 2004-08-09
6
14,634 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
  • 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

Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Shorten long url?  Apache2 and Tomcat. 7 254
Refresh JTable Content 6 214
Secure cookies 1 72
Https with tomcat. A myth. 5 121
-Xmx and -Xms are the two JVM options often used to tune JVM heap size.   Here are some common mistakes made when using them:   Assume BigApp is a java class file for the below examples. 1.         Missing m, M, g or G at the end …
Most of the developers using Tomcat find it easy to configure the datasource in Server.xml and use the JNDI name in the code to get the connection.  So the default connection pool using DBCP (or any other framework) is made available and the life go…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

679 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