Solved

stand-alone oc4j connection

Posted on 2004-08-09
6
14,615 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

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…
Upgrading Tomcat – There are a couple of methods to upgrade Tomcat is to use The Apache Installer is to download and unzip and run the services.bat remove|install Tomcat6 Because of the App that we are working with, we can only use Tomcat 6.…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

771 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now