• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI JDBC SQLException: No suitable driver  RSS feed

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 -Djava.security.policy=C:\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.security.AllPermissions;
permission java.net.SocketPermission"*:1024-65535","connect,accept,resolve";
permission java.net.SocketPermission"*:1-1023","connect,resolve";
permission java.lang.RuntimePermission"accessClassInPackage.sun.jdbc.odbc";
permission java.io.FilePermission"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.*;
import java.net.InetAddress;
import java.net.*;

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
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!