Closing down RMI when quiting RCP application

This is the place for general discussion of the RMI plugin for Eclipse and support questions

Closing down RMI when quiting RCP application

Postby mgcorr » Sun Apr 01, 2007 2:26 am

Hi,
I've successfully created a RMI Server-Client setup; both the server and client applications are Eclipse RCP applications.

I can start the server, and the client finds it no problem, and communicates back and forth.

The problem comes when I quit the RMI server application. I get several errors when I select File->Exit from my application (see below). Do I have to de-register my RMI server or something, when I quit? I never saw this problem when I ran the RMI server as a standard java console application.

I get the following error in an error dialog :
"An error has occurred: access denied (java.io.FilePermission C:\Documents and Settings\corr\runtime-RMShell.product\.metadata\.plugins\org.eclipse.ui.workbench read). See error log for more details. Do you want to exit?"

In the error log I have the following additional information:
An exception occurred while writing to the platform log:
java.security.AccessControlException: access denied (java.io.FilePermission C:\Documents and Settings\corr\runtime-RMShell.product\.metadata\.log read)
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
at java.security.AccessController.checkPermission(AccessController.java:427)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
at java.io.File.length(File.java:813)
at org.eclipse.core.runtime.adaptor.EclipseLog.checkLogFileSize(EclipseLog.java:578)
at org.eclipse.core.runtime.adaptor.EclipseLog.log(EclipseLog.java:280)
at org.eclipse.core.internal.runtime.PlatformLogWriter.logging(PlatformLogWriter.java:36)
at org.eclipse.core.internal.runtime.RuntimeLog.log(RuntimeLog.java:68)
....

my java.policy file has the following permissions set:
permission java.io.FilePermission "getenv.USERPROFILE\\runtime-RMShell.product\\-","read,write,delete";
permission java.io.FilePermission "getenv.USERPROFILE\\runtime-RMShell.product\\.metadata\\.plugins\\-","read";
permission java.io.FilePermission "getenv.USERPROFILE\\runtime-RMShell.product\\.metadata\\.plugins\\org.eclipse.ui.workbench\\-","read";
permission java.io.FilePermission "getenv.USERPROFILE\\runtime-RMShell.product\\.metadata\\.log","read";


any ideas?

thanks
Michael
mgcorr
 
Posts: 1
Joined: Sun Apr 01, 2007 1:51 am

Postby genady » Mon Apr 02, 2007 10:59 am

Hi,

I'd suggest you try removing the security manager once you're done loading all remote classes. Otherwise you can debug the security policy by using adding the debug property
(see http://java.sun.com/javase/6/webnotes/t ... html#gbmuf)

Genady
genady
Site Admin
 
Posts: 397
Joined: Sat Aug 16, 2003 5:15 pm


Return to General discussion and support

Who is online

Users browsing this forum: No registered users and 1 guest

cron