• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
Greenhorn
Posts: 5
  • 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: 3320
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: 5
  • 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: 1878
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: 3320
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!