[jboss-osgi-issues] [JBoss JIRA] Resolved: (JBOSGI-40) Cannot run embedded tests with SecurityManager

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Thu Apr 9 08:15:22 EDT 2009


     [ https://jira.jboss.org/jira/browse/JBOSGI-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Diesler resolved JBOSGI-40.
----------------------------------

    Resolution: Done


It seems that this is an issue with org.osgi.core.jar

	/*
	 * NOTE: A framework implementor may also choose to replace this class in
	 * their distribution with a class that directly interfaces with the
	 * framework implementation. This replacement class MUST NOT
	 * alter the public/protected signature of this class.
	 */

	/*
	 * This class will load the AdminPermission class in the package named by
	 * the org.osgi.vendor.framework package. For each instance of this class,
	 * an instance of the vendor AdminPermission class will be created and this
	 * class will delegate method calls to the vendor AdminPermission instance.
	 */

	private static class ImplHolder implements PrivilegedAction {
		private static final String			packageProperty		= "org.osgi.vendor.framework";
		static final Constructor	initStringString;
		static final Constructor	initBundleString;
		static {
			Constructor[] constructors = (Constructor[]) AccessController.doPrivileged(new ImplHolder());
			
			initStringString = constructors[0];
			initBundleString = constructors[1];
		}

If the AdminPermission class is loaded from the Felix framework jar this does not occur

> Cannot run embedded tests with SecurityManager
> ----------------------------------------------
>
>                 Key: JBOSGI-40
>                 URL: https://jira.jboss.org/jira/browse/JBOSGI-40
>             Project: JBossOSGi
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Other
>            Reporter: Thomas Diesler
>            Assignee: Thomas Diesler
>             Fix For:  JBossOSGi 1.0.0 Beta1
>
>
> It seem that this is related to the presents of a SecurityManager. 
> Running org.jboss.test.osgi.jbosgi38.OSGI38TestCase
> java.lang.NoClassDefFoundError: org.osgi.vendor.framework property not set
> 	at org.osgi.framework.AdminPermission$ImplHolder.run(AdminPermission.java:166)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.osgi.framework.AdminPermission$ImplHolder.<clinit>(AdminPermission.java:153)
> 	at org.osgi.framework.AdminPermission.<init>(AdminPermission.java:279)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2379)
> 	at org.apache.felix.framework.Felix.installBundle(Felix.java:2278)
> 	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:122)
> 	at org.apache.felix.framework.BundleContextImpl.installBundle(BundleContextImpl.java:108)
> 	at org.jboss.test.osgi.jbosgi38.OSGI38TestCase.testInstallStartX(OSGI38TestCase.java:59)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-osgi-issues mailing list