• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

SQLException: No Listener

 
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
mister krabs
Posts: 13974
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Take a look at this thread:
http://www.javaranch.com/ubb/Forum3/HTML/000283.html
 
reply
    Bookmark Topic Watch Topic
  • New Topic