Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

stand-alone oc4j connection

Posted on 2004-08-09
6
Medium Priority
?
14,684 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 1000 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 1000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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…
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…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses
Course of the Month11 days, 20 hours left to enroll

916 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