Dear Java Linux developers/users,
(The following has already been sent to
[EMAIL PROTECTED], but I am sending it here, on
the off chance, that my problem might have something
to do with the Blackdown java port. My apologies if
it is not related to this list. BTW, is there a
'debug' mode for rmiregistry?) ....
(Dear RMI users,)
Can you please help me with this problem I am having trying to establish
a connection between Server and client. The server process(es) seem to
properly register with rmiregistry, the client process, succeeds in
looking up the server process, but I get a ClassNotFoundException
message.
I am running RedHat linux ver 6.1, and am using the Blackdown ver 1.2.2
SDK (or JDK - what is the correct term?)
Included below are :
1. ClassNotFoundException error message
2. Naming.lookup() statement in client code
3. server shell script
4. security policy file (all permissions)
5. output when I run the RMI server shell script
6. output from httpd after startup of server process(es).
7. client shell script
8. codebase (httpd) directories.
1. When I run the client program. I get the message:
java.rmi.UnmarshalException: error unmarshalling return; nested
exception is:
java.lang.ClassNotFoundException: multipi.Interaction_Stub
2. The code where the message is generated is :
System.out.println("Contoller state : ST_INITIAL");
for(i = 0;i < intnCount; i++) {
try {
System.out.println("[ here ]");
InteractionI iInterface
= (InteractionI)
Naming.lookup("rmi://gothamcity.sci.usq.edu.au/" + intnList[i]);
... the client is trying to connect to a server processes which are
registered with rmiregestry with the names 'interaction0', etc
'interaction1' etc. The class name of the interface is 'InteractionI'
and the implementation name is 'Interaction'.
Naming.lookup() call is clearly working, otherwise, I would
get a java.rmi.NotBoundException message.
3. Here is the script to run the server process(es):
#!/bin/sh
ClassPath=$HOME/66401/classes/:$HOME/public_html/classes/
CodeBase=http://smaug.sci.usq.edu.au:8080/~sinnamon/classes/
java -cp ${ClassPath} -Djava.rmi.server.codebase=${CodeBase}
-Djava.security.policy=./policy -Djava.rmi.server.logCalls=true
multipi.Interaction $1
4. the (security) file, 'policy', is simply :
grant {
// Allow everything for now
permission java.security.AllPermission;
};
5. When I run the server script, I get the message:
[sinnamon@gothamcity multipi]$ ./runServer.sh interaction0
Tue May 23 00:28:21 GMT+10:00 2000:RMI:RMI TCP
Connection(2)-139.86.101.55:[139.86.101.55:
sun.rmi.transport.DGCImpl[0:0:0, 2]: java.rmi.dgc.Lease
dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lease)]
interaction0 bound in registry
6. After this is run, I observe the following in the httpd log file :
gothamcity.sci.usq.edu.au - - [23/May/2000:00:28:21 +1000] "GET
/~sinnamon/classes/multipi/Interaction_Stub.class HTTP/1.0" 200 3559
(This raises the question : why the _Stub class and not the _Skel class?
Doesn't the server need to get hold of the Skel class at some point,
since
it is suppopsed to communicate through the _Skel class?)
7. here is the shell script to run the client process :
--------------------------------------------------------------------
ClassPath=$HOME/66401/classes/
CodeBase=http://gothamcity.sci.usq.edu.au:8080/~sinnamon/classes/
java -cp ${ClassPath} multipi.Interactor interaction0 interaction1
----------------------------------------------------------------------
(I have left out the parameter,
"-Djava.rmi.server.codebase=${CodeBase}",
because it has no effect, and, besides, it doesn't seem to be necessry
at the client end (am I right?))
----------------------------------------------------------------------
8. the codebase directories are :
[sinnamon@gothamcity classes]$ pwd
/home/sinnamon/public_html/classes
[sinnamon@gothamcity classes]$ ls -al
total 14
drwxrwxr-x 9 sinnamon sinnamon 1024 May 21 15:00 .
...
drwxrwxr-x 2 sinnamon sinnamon 1024 May 21 13:56 multipi
[sinnamon@gothamcity classes]$ ls -al multipi/
total 15
drwxrwxr-x 2 sinnamon sinnamon 1024 May 21 13:56 .
drwxrwxr-x 9 sinnamon sinnamon 1024 May 21 15:00 ..
-rw-rw-r-- 1 sinnamon sinnamon 1873 May 21 14:27
Interaction_Skel.class
-rw-rw-r-- 1 sinnamon sinnamon 2288 May 21 14:27
Interaction_Skel.java
-rw-rw-r-- 1 sinnamon sinnamon 3559 May 21 14:27
Interaction_Stub.class
-rw-rw-r-- 1 sinnamon sinnamon 3518 May 21 14:27
Interaction_Stub.java
------------------------------------------------------------------------
--
Could someone out there please tell me what I have missed, or where else
to look for the problem.
TIA
James Sinnamon
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]