Hi felix dev,

I'm in a situation where I'd like to embed Apache Felix in a host application. The host application, however is equipped with a security manager that does not allow for the creation of a new security manager. This leads to the following error on startup:

at org.mortbay.thread.BoundedThreadPool $PoolThread.run(BoundedThreadPool.java:442)
Caused by: java.lang.ExceptionInInitializerError
at org .apache.felix.framework.ExtensionManager.<init>(ExtensionManager.java: 142)
        at org.apache.felix.framework.Felix.<init>(Felix.java:301)
        at net.luminis.testdgg.server.Framework.<init>(Framework.java:39)
at net.luminis.testdgg.server.OSGiServiceImpl.start(OSGiServiceImpl.java: 24)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun .reflect .DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        ... 25 more
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission createSecurityManager) at java .security .AccessControlContext.checkPermission(AccessControlContext.java:264) at java.security.AccessController.checkPermission(AccessController.java: 427)


This happens because Felix extends the SecurityManager in SecurityManagerEx to allow for public access to getClassContext(). I do not see an easy way to overcome this situation. Am I missing something ?


thanks in advance,


dennis


Reply via email to