Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[equinox-dev] Enable SecurityManager

Hi,

I'm trying to use Equinox' Conditional Permission Admin (CPA), which
requires a security manager. The OSGi spec defines the framework property
"org.osgi.framework.security" with value "osgi" to enable the frameworks
security manager. When launching Equinox via the FrameworkFactory
interface with the above property set, I get the appended exception.

Is there another way of starting Equinox with an enabled security manager,
which supports CPA? Maybe without the FrameworkFactory interface?
I'm using Equinox 3.5.1.R35x_v20090827.

Thanks in advance!

Regards,
Saul


java.lang.ExceptionInInitializerError
	at java.lang.System.setSecurityManager0(System.java:296)
	at java.lang.System.setSecurityManager(System.java:264)
	at
org.eclipse.osgi.framework.internal.core.Framework.installSecurityManager(Framework.java:1232)
	at
org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:172)
	at
org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:157)
	at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:68)
	at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:38)
	at org.eclipse.osgi.launch.Equinox.init(Equinox.java:89)
	at my.launcher.FrameworkLauncher.launch(FrameworkLauncher.java:204)
	at my.launcher.Main.main(Main.java:34)
Caused by: java.security.AccessControlException: access denied
(java.security.SecurityPermission getProperty.networkaddress.cache.ttl)
	at
java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
	at
org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.internalCheckPermission(EquinoxSecurityManager.java:117)
	at
org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager$CheckPermissionAction.run(EquinoxSecurityManager.java:60)
	at java.security.AccessController.doPrivileged(Native Method)
	at
org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.checkPermission(EquinoxSecurityManager.java:88)
	at
org.eclipse.osgi.internal.permadmin.EquinoxSecurityManager.checkPermission(EquinoxSecurityManager.java:187)
	at java.security.Security.getProperty(Security.java:725)
	at sun.net.InetAddressCachePolicy$1.run(InetAddressCachePolicy.java:84)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.net.InetAddressCachePolicy.<clinit>(InetAddressCachePolicy.java:80)
	at java.lang.System.setSecurityManager0(System.java:296)
	at java.lang.System.setSecurityManager(System.java:264)
	at
org.eclipse.osgi.framework.internal.core.Framework.installSecurityManager(Framework.java:1232)
	at
org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:172)
	at
org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:157)
	at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.internalInit(EquinoxLauncher.java:68)
	at
org.eclipse.osgi.framework.internal.core.EquinoxLauncher.init(EquinoxLauncher.java:38)
	at org.eclipse.osgi.launch.Equinox.init(Equinox.java:89)
	at my.launcher.FrameworkLauncher.launch(FrameworkLauncher.java:204)
	at my.launcher.Main.main(Main.java:34)




Back to the top