security manager conflict

A place for examples and help for the License Manager project.

Moderator: beamerblvd

security manager conflict

Postby ashiers » October 30th, 2013, 10:17 am

Hi there,

I'm integrating your Licensing Manager library into my application, which seems to be working well. However, I have a conflict with my own Security Manager for the application. Your home page states for item 8:

It will yield to existing security managers that are equally or more strict, to prevent conflicts.


Your documentation doesn't really go into any more detail, at least not that I could find.

Currently I'm getting the following error message when I attempt to create an instance of my PNSSecurityManager class - System.setSecurityManager(new PNSSecurityManager("plugins")); :

java.lang.SecurityException: Setting a SecurityManager other than the LicenseSecurityManager is prohibited.
at net.nicholaswilliams.java.licensing.LicenseSecurityManager.checkPermission(LicenseSecurityManager.java:260)
at java.lang.System.setSecurityManager0(System.java:295)
at java.lang.System.setSecurityManager(System.java:286)
at com.personalnetsearch.parser.MainGUI.jbInit(MainGUI.java:666)
at com.personalnetsearch.parser.MainGUI.<init>(MainGUI.java:237)
at com.personalnetsearch.parser.MainGUI.main(MainGUI.java:225)

My security manager for the application is extremely important. Please advise as to how we can have both yours and the applications security managers run without conflict.

Alan
ashiers
 
Posts: 4
Joined: October 20th, 2013, 4:35 pm

Re: security manager conflict

Postby ashiers » October 31st, 2013, 8:02 am

For whoever may be reading this,

I discovered thru trial and error how to fix the conflict. It turns out that if your application already has a Security Manager, you need to create an instance of it first before invoking the License Manager.

Alan
ashiers
 
Posts: 4
Joined: October 20th, 2013, 4:35 pm


Return to License Manager

Who is online

Users browsing this forum: No registered users and 1 guest

cron