Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI JDBC SQLException: No suitable driver

Ray Smilgius
Ranch Hand
Posts: 120
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the DOS screen:::::::::::::::::::::::::::::::::::::::::::::
C:\joeramilo\getData>java\joeramilo\getData\rmipermit.policy rmiServer
RMI Server awaiting clients
RmiJdbc.RJDriver: ClassNotFoundException: No driver loaded or found
SQLException: ** Error on data insert. **
SQLException: No suitable driver

Here is the code and mypermit policy info::::::::Windows 2000
Any help greatly appreciated.
permission java.lang.RuntimePermission"accessClassInPackage.sun.jdbc.odbc";
permission"c://joeramilo//getData//flight.mdb", "read,write";
Here is the code that is flopping......
I have installed the C:\jdk1.3.1_01\jre\lib\ext\RmiJdbc.jar
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.sql.*;
import java.util.*;
import java.rmi.*;
import RmiJdbc.*;

public class................
public Vector getDestination()

String userlogin;
Vector temp = new Vector(1,1);
String[] joe;
Connection con;

try {

catch(java.lang.ClassNotFoundException e)
System.err.print("ClassNotFoundException: ");
System.err.println("No driver loaded or found");
catch(Exception e)

System.err.println("another exception"+e.getMessage());
try {

// RMI host will point to local host
String url = "jdbc dbc:getData";
String rmiHost = new String("//" + netAddress.getLocalHost().getHostName());
java.sql.Connection c = DriverManager.getConnection("jdbc:rmi:"+ rmiHost + "/" + url);
java.sql.Statement st = c.createStatement();
java.sql.ResultSet rs = st.executeQuery("SELECT Destination FROM flightone");
java.sql.ResultSetMetaData md = rs.getMetaData();

temp.add("new york");


catch(SQLException ex)
System.err.println("SQLException: ** Error on data insert. **");
System.err.println("SQLException: "+ ex.getMessage());
catch(Exception ex)

return temp;
//THanks in Advance
Ray Smilgius
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!