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.
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
grant
{
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 {
Class.forName("RmiJdbc.RJDriver").newInstance();
}
catch(java.lang.ClassNotFoundException e)
{
System.err.println(e.getMessage());
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("chicago");
temp.add("new york");
st.close();
c.close();
}
catch(SQLException ex)
{
System.err.println("SQLException: ** Error on data insert. **");
System.err.println("SQLException: "+ ex.getMessage());
}
catch(Exception ex)
{
System.out.println(ex.getMessage());
}
return temp;
}
//THanks in Advance
Ray Smilgius