Hi, I'm trying to embed Felix in an application. Everything works fine,
except when I define a java security manager for the application. In that
case, I can't start any bundles, since they all fail with a "
PackagePermission.IMPORT denied for import" exception for the OSGI system
packages the bundles need to import. I've looked a bit at the source code of
Felix, and it doesn't seem that this is directly related to my security
manager, but instead to the security context of the bundles trying to do the
import, which seems to just be the default created by the jvm.

I'm not sure how to proceed from here, is there something that I can define
in the bundles manifest, or anywhere else to get past this problem?

Thanks,

Guillermo

PS: This is the stack trace of the exception:

java.security.AccessControlException: PackagePermission.IMPORT denied for
import: org.osgi.framework

at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1330)

at org.apache.felix.framework.Felix._startBundle (Felix.java:1241)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)

at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)

at org.apache.felix.framework.StartLevelImpl.run (StartLevelImpl.java:256)

at java.lang.Thread.run(Unknown Source): PackagePermission.IMPORT denied for
import: org.osgi.framework

at org.apache.felix.framework.Felix._resolveBundle(Felix.java:1330)

at org.apache.felix.framework.Felix._startBundle(Felix.java:1241)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)

at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)

at java.lang.Thread.run(Unknown Source)Felix.java:1330)

at org.apache.felix.framework.Felix._startBundle(Felix.java:1241)

at org.apache.felix.framework.Felix.startBundle (Felix.java:1201)

at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)

at java.lang.Thread.run(Unknown Source)Felix.java:1241)

at org.apache.felix.framework.Felix.startBundle(Felix.java:1201)

at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java :256)

at java.lang.Thread.run(Unknown Source)Felix.java:1201)

at org.apache.felix.framework.Felix.setFrameworkStartLevel(Felix.java:807)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java :256)

at java.lang.Thread.run(Unknown Source)Felix.java:807)

at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:256)

at java.lang.Thread.run(Unknown Source)StartLevelImpl.java:256)

at java.lang.Thread.run(Unknown Source)

Reply via email to