• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLException: No Listener

 
Tualha Khan
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Hey,
I am using the OCI8 drivers for Oracle 8i personal edition. When I run my application, I get the following exception:
E:\>java jdbcapp5
Driver Registered
Exception in Connection java.sql.SQLException: ORA-12541: TNS:no listener
The code for this application is :
==========================================
import java.sql.*;
public class jdbcapp5
{
Connection con;
ResultSet rs;
Statement stat;
PreparedStatement pstat;
public jdbcapp5()
{
try
{
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
System.out.println("Driver Registered");
con=DriverManager.getConnection("jdbc racle ci8:@(description=(address=(host=nuqra@ndc)(protocol=tcp)(port=1521))(connect_data=(sid=gmd)))","tualha", "khan");
System.out.println("Connection Made");
}
catch(Exception ex1)
{
System.out.println("Exception in Connection "+ex1);
}
}
public static void main(String args[])
{
jdbcapp5 obj=new jdbcapp5();
}
}
==========================================
How do I configure my System to compile this code?

Bye,
Tualha Khan
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look at this thread:
http://www.javaranch.com/ubb/Forum3/HTML/000283.html
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic