Home » RDBMS Server » Networking and Gateways » oracle in vmware JDBC problem (Oracle/JDBC/VMWare, 10g/4/6, XP)
icon11.gif  oracle in vmware JDBC problem [message #298701] Thu, 07 February 2008 03:51
Messages: 1
Registered: February 2008
Junior Member
Hi Virtual folks, I installed Oracle in VMWare running XP. (My Firewall is disabled in both host and gues system) In my host i run eclipse and have sticked on to everything JDBC documentation says. I'm able to ping my guest from host.

C:\Documents and Settings\Chakru>ping sweety2
Pinging sweety2 with 32 bytes of data:

Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time<1ms TTL=128
Reply from bytes=32 time=1ms TTL=128

Ping statistics for
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
I'm even able to access guest's oracle's isqlplus in my host's Browser using this URL:

But when my Java program throws the following error:

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:158)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:206)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:382)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:342)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:388)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:622)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at CreateCoffees.main(CreateCoffees.java:22)

For the following program:

import java.sql.*;
public class CreateCoffees {
public static void main(String args[]) {
String url = "jdbc:oracle:thin:@";
Connection con; Statement stmt;
String selectString = "Select * from Employees";
try {
} catch (java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
try {
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
con = DriverManager.
getConnection("jdbc:oracle:thin:@", "usr", "a123");
stmt = con.createStatement();
ResultSet rrs = stmt.executeQuery(selectString);
while (rrs.next())
} catch (SQLException ex) {
//System.err.println("SQLException: " + ex.getMessage());

Any Clue What the Problem is?

Any help appreciated, Thanks
  • Attachment: scrsht.JPG
    (Size: 214.15KB, Downloaded 168 times)
Previous Topic: Listener not starting
Next Topic: i cant connect my oracle server. there are host problems.
Goto Forum:

Current Time: Wed Sep 03 03:00:48 CDT 2014

Total time taken to generate the page: 0.09574 seconds