• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

About "You must not require the installation of a security manager"

 
Hu Yong Jun
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
******************************************************
Please See thread: http://www.coderanch.com/t/183373/java-developer-SCJD/certification/RMI-Testing
******************************************************


1. There is a line in the code like:

It is OK when starting server with

It is OK when starting client with

Now I delete that line containing RMISecurityManager, and start the server with no JVM parameter:



I use JBuilder of IDE tool. The stub class is in the classes directory.

Keeping no line containing RMISecurityManager, when I start server and client with JVM parameters as following, it is OK.



[ October 03, 2004: Message edited by: Hu Yong Jun ]

[Andrew: split lines, converted smileys to text, and converted the "please see ..." to a real URL]
[ October 03, 2004: Message edited by: Andrew Monkhouse ]
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 12007
215
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Hu Yong Jun,

I am not sure what you think the issue is.

Your topic heading and the first line of code (and one of the definitions in your first attempt to run your application) are related to the security manager.

However the other definition you are including in your command line and the exception trace you posted have nothing to do with the security manager. They are all to do with the class path for your RMI classes.

In fact, you have shown that you do not need a security manager to run your application .

So lets stop there - if you are not happy with that as a basic concept, then please ask about it. As a developer, you need to be able to see for yourself that the exception trace is not complaining about security issues. Then you can go on with the real issue that your exception trace shows.

-----

Still with me? (Which implies that you agree that the problem is not security related.)

The exception we are interested in is:

You must have run rmic in order for the other examples to have worked. So therefore that class must exist. Therefore the problem is likely to be that it is not in the rmiregistry's class path.

In the thread you referenced (btw: please add a link to referenced threads or articles - don't just list the thread number) I suggested starting the registry from within the server program, using the java.rmi.registry.LocateRegistry class. If you do this, then your server should be starting in the same directory as the your base class path, which should ensure that the registry already contains the class path it needs to find that stub.

So my question at this stage would be: are you starting the registry programatically?

Regards, Andrew
 
Hu Yong Jun
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Andrew.

I resolved this problem after reading thread 004798.

I think others might search here and find something helpful so I edited this message and added a reference to the thread 004798.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic