Wrox Home  
Search P2P Archive for: Go

  Return to Index  

enterprise_java_beans thread: Some Common RMI problems and their solutions [From Qurban Ali]


Message #1 by "Qurban Ali" <qurban@c...> on Thu, 26 Jul 2001 18:53:08 +0500
Hi Every RMI Programmer!





Here are solutions for some general problems facing while developing RMI
System.



Problem1:       While running client you get the following error.

"Error in lookup() java.security.AccessControlException: access denied
(java.net.SocketPermission 127.0.0.1:1000 connect,resolve)"



Solution:

                   You are facing security problem. You must have to
override default securities provided with JDK. Make a policy file (say
c:\myPolicy.policy). Then run the client as below.

Note: Do not install this policy file in a production system. However, you
can use it in  testing

Java -Djava java.security.policy=c:\myPlicy.poicy package.classname
remotemachine port#



Problem2:    You get the following error when running the client

Exception occured: java.rmi.UnmarshalException: Return value class not
found; nested exception is:

          java.lang.ClassNotFoundException: myIml_Stub



Solution:



The stub class must be deployed with your client application (that is, you
must place it somewhere in the classpath of the client machine; If you were
using an applet as a client, you would place it in the directory specified
in the CODEBASE parameter to achieve the same effect).



Problem3:       You get a "class not found" error when running rmic



Solutions.

                        Add the current directory to your classpath.









Qurban Ali

Web Developer

Cybercomcity



  Return to Index