Hi Karl,

thanks, I figured as much... I'll see if i can make it work. I'll keep you posted.


cheers, dennis


On 29 jun 2009, at 10:56, Karl Pauls wrote:

Thats a tricky one. Generally speaking, the framework needs
AllPermission (as per spec). If that's not possible then things are
getting really tricky. Sorry.

You could try to hack stuff to not use the ExtensionManager and
disable URLHandlers and see whether that makes it work...

regards,

Karl

On Mon, Jun 29, 2009 at 10:44 AM, Dennis Geurts<[email protected] > wrote:
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






--
Karl Pauls
[email protected]

Reply via email to