• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

RMI Registry unable to create because of no admin rights on machine  RSS feed

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I do not have admin rights on my machine. I have written a simple java source code which trying to create a registry for RMI calls. But the code is breaking because of lack of admin rights. Is there any way through which i can create registry even if i have no admin rights?

Following is additional information :

Code snippet :

Exception : Jun 11, 2013 4:57:49 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node Software\JavaSoft\Prefs\com\nec\jp\dianascope\prefs at root 0x80000002. Windows RegOpenKey(...) returned error code 5.
Exception in thread "main" java.lang.SecurityException: Could not open windows registry node Software\JavaSoft\Prefs\com\nec\jp\dianascope\prefs at root 0x80000002: Access denied
at java.util.prefs.WindowsPreferences.openKey(WindowsPreferences.java:513)
at java.util.prefs.WindowsPreferences.openKey(WindowsPreferences.java:480)
at java.util.prefs.WindowsPreferences.openKey(WindowsPreferences.java:466)
at java.util.prefs.WindowsPreferences.putSpi(WindowsPreferences.java:612)
at java.util.prefs.AbstractPreferences.put(AbstractPreferences.java:251)
at com.nec.jp.dianascope.util.PreferencesUtil.setRmiPortPreference(PreferencesUtil.java:35)
at com.nec.jp.dianascope.CoreServer.main(CoreServer.java:5562)


 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseCodeTags (← click) when posting code as it makes it easier for people to read your code. I've added them for you this time.

I don't think this is related to RMI but rather to using the preferences api to store data in the registry. What does your PreferencesUtil class do?
 
Anu Gaur
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Snippet for PreferencesUtil.java method - setRmiPortPreference()


So this is basically getting the node from system where in it is failing because of lack of admin rights. Is it correct?

Also, i tried by comment out of this method call, but still it failed on next line where in it is trying to create the registry.

Please suggest.
 
Rancher
Posts: 1943
15
Android Eclipse IDE Java Java ME
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure if this helps
http://www.rmiproxy.com/doc/guide/RMIProxy_Guide.html
 
Tony Docherty
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

So this is basically getting the node from system where in it is failing because of lack of admin rights. Is it correct?


That's what it looks like to me.

Also, i tried by comment out of this method call, but still it failed on next line where in it is trying to create the registry.


You'll need to post the full error message and stack trace you are getting for the new failure. The one you posted earlier is from using the preferences api.
 
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!