Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!

k mull

Greenhorn
+ Follow
since Dec 15, 2004
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 k mull

thanks so much - i guess i shoulda copped that i needed to specify the policy file when running the client from the command line..duh!!

thanks again...

could i ask one more thing? this is prolly a really stupid question, but i'm new to RMI and i'm not sure about this so..

I have a Client and a Server (obviously)
I have a Task interface and a FibonacciTask class, a FactorialTask class and a PrimeTask class which all implement Task...

In the Task interface there is a method called calculate( Task t ) which returns a type Object..

So what the client does is it passes the object to be 'calcualted' to the server and server runs the method calculate ( Task t ) on the server-side and passes back an Object to the client..does that make sense? I hope so..

When I do this i get the following error:
RemoteException Error: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: FibonacciTask (no security manager: RMI class loader disabled)

I dont really know how to fix this error, but if I put the FibonacciTask.class file into the folder where my server is ( seperate folder for the client files ) the calculate() method will run and return an Object to the client..but I figure that the FibonacciTask.class file should not be in with the server files - that's the whole point of RMI right!? SO..have you any suggestions on how to fix this...thanks so much for your help so far!!!
[ March 30, 2005: Message edited by: k mull ]
17 years ago
I have..I've tried many different variations of that line but none of them seem to work!

Thanks anyway...
17 years ago
Hi,

I've read so many posts about this problem already all over the net but I still cant fix mine. Basically I get this error everytime I run the client
"Exception Error: access denied (java.net.SocketPermission 127.0.0.1:1099 connect,resolve)"

This is the code in MyClient.java:


It's the SecutiryManager() line's that are the problem..

I have created a policy file which looks like this:
grant {
permission java.security.AllPermission;
};

When I run the Server this is what I type:
java -Djava.security.policy="file:///C:\ds\rmi\dsproj.policy" ComputeServer

This is the code for my ComputeServer.java:


Whenever I run the client I get that error above and I have no idea how to fix it..Can someone please help?? Thanks...

17 years ago


above is the code i'm using to select items from two tables

in the line item table there are 3 fiels - ORDER_NUMBER,PART_NUMBER + QTY!
for every order number there is a part number and quantity so i want to print out all the items associated with a certain order number
eg.
ORDER NUMBER 43567 has:
PART NUMBER QB-101, QTY 4
PART NUMBER QB-102, QTY 1

but when i want to print out these two part numbers it only prints out the first one. I've tried different things but i cant get more than one item to be printed out..Can anyone help?
Hi,

I have a table in my database where one of the entries is a 'Date' in the format 'DD-MMM-YY'. I need to create the date myself and enter it into this table but I dont know how to get it in the correct DD-MMM-YY format.

I can create a new Date() using but i can't get it in the format I need.
Also when I pass this new date into the database it returns an error because it is not of type java.sql.date so it doesn't work that way!

Any help would be much appreciated!