praveen p kumar

Greenhorn
+ Follow
since Oct 24, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by praveen p kumar

Hi All,
I am getting below exception while trying to connect ORACLE database using jdbc racle:thin driver:
Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
ter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at Employee1.main(Compiled Code)

If anyone can give me reason for the above exception. It would be a great help to me.
TIA
Praveen Kumar
Hi All,
I am getting below exception while trying to connect ORACLE database using jdbc racle:thin driver:
Exception in thread "main" java.sql.SQLException: Io exception: The Network Adap
ter could not establish the connection
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:114)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:156)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:210)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:251)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
at java.sql.DriverManager.getConnection(Compiled Code)
at java.sql.DriverManager.getConnection(DriverManager.java:137)
at Employee1.main(Compiled Code)

If anyone can give me reason for the above exception. It would be a great help to me.
TIA
Praveen Kumar
hai
In the client program set the ORBInitialHost where your server is running along with the ORBInitialPort
hope the code attached will help u

try
{
String args[]={"-ORBInitialHost","praveen","-ORBInitialPort","1050"};
//showStatus("ORBInitialPort -1050");
ourORB = ORB.init(args,null);
connect();
}

protected void connect()
{
try
{
// Get the root naming context.
org.omg.CORBA.Object obj = ourORB.resolve_initial_references("NameService");
NamingContext namingContext = NamingContextHelper.narrow(obj);
NameComponent nameComponent = new NameComponent("Hello","");
NameComponent path[] = { nameComponent };
hello myhelloServer = helloHelper.narrow(namingContext.resolve(path));
System.out.println(myhelloServer.getConnection());
//showStatus(tf.getText());
}
catch (Exception ex)
{
System.err.println("Couldn't resolve StockServer: " + ex);
return;
}
System.out.println("Succesfully bound to a HelloServer.");
}
23 years ago