Lisa Foster

Ranch Hand
+ Follow
since Feb 28, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Lisa Foster

I could be wrong but off the top of my head I would look at getUID() method for RMI I believe that will return a unique thread ID for each RMI client(thread).
Thanks very much got it working just have to fix the classCast Exception

Thanks Lisa
here is my policy 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";
};
Thanks Lisa
trying to start my server
Access denied(java.io.FilePermission db.db write)
java -Djava.security.policy=myPermit.policy suncertify.server.flyServer db.db
help Lisa
What are the pro/cons of extending the Data Class vs. Modifying the Data class
Next, server programat is the need of Singleton needed for the server
Last But Least, Doc comments provided with sun such as Data DataInfo, etc are any of the docs provided with the methods wrong if so which ones?

thanks Lisa
here my interface for the previous error
package suncertify.db;
import java.io.*;
import java.util.*;
import java.rmi.*;
import java.rmi.Remote;
import suncertify.db.DataInfo;
import suncertify.db.FieldInfo;
public interface DataClient extends Remote
{
public FieldInfo [] getFieldInfo()throws RemoteException;
public DataInfo getRecord(int recNum)throws DatabaseException,RemoteException;
public DataInfo find(String toMatch)throws DatabaseException, RemoteException;
public void add(String [] newData)throws DatabaseException,RemoteException;
public void modify(DataInfo newData)throws DatabaseException, RemoteException;
public void delete(DataInfo toDelete)throws DatabaseException, RemoteException;
public void close() throws RemoteException;
public void lock(int record)throws IOException, RemoteException;
public void unlock(int record)throws RemoteException;
public DataInfo[] criteriaFind(String criteria)throws DatabaseException, RemoteException;
public String[] getComboValues(int fieldNum) throws DatabaseException, RemoteException;
public int getRecordCount() throws RemoteException;
}
Thanks for your response glen and others I have gooten rid of the previous error see my new post for new error.
Thanks Lisa
Headache I am try to instantiate this class below

this is the first line of codes in my client application it keeps on throwing remote exception yet I am connecting locally any suggestions I can get my application to work with another middle tier but I was extending data I dont want to that>........

//global variable
private DataClient myInstance11;

public client()
{
try
{
myInstance11 = new dataConnectImpl("C:\\scjd\\starting\\client\\db.db");
}
catch(RemoteException e)
{
System.out.println("OH not again");
}
.
.
.
.
//end client class
exception "OH not again" is being thrown all the time ???
//here is my middle tier class to handle local and Remote see below it has all the methods of the DataClient Interface see Below...............................

import java.io.*;
import java.util.*;
import suncertify.db.Data;
import suncertify.db.DataClient;
import java.rmi.*;
import java.rmi.server.UnicastRemoteObject;
public class dataConnectImpl extends UnicastRemoteObject implements DataClient
{
private Data InstanceOne;
public dataConnectImpl(String dbName)throws DatabaseException,RemoteException
{
super();
try
{
System.out.println("Im here before");
InstanceOne = new Data(dbName);
System.out.println("Im here after");
}
catch(Exception ex)
{
System.out.println("Error Creating Instance in DataClientLocal");
}
}
public FieldInfo [] getFieldInfo()throws RemoteException
{
FieldInfo[] info = null;
try
{
info = InstanceOne.getFieldInfo();
}
catch(Exception e)
{
}
return info;
}
.
.
.
.
.
.
.
.
}end class
Thanks in advance Lisa
I need to know what site to upload my assignment too and what is the username and password???\
Thanks Lisa
here is the correct code to put in your permit.policy
make sure you put the double quotes when saving as a policy file
save as "permit.policy"
goodluck
grant
{
permission java.net.SocketPermission "*:1024-65535",
"connect,accept,resolve";
permission java.net.SocketPermission "*:1-1023",
"connect,resolve";
};