You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "benhsu (JIRA)" <ji...@apache.org> on 2016/08/11 09:39:20 UTC

[jira] [Updated] (FELIX-5324) Can not install/start the framework.security bundle

     [ https://issues.apache.org/jira/browse/FELIX-5324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

benhsu updated FELIX-5324:
--------------------------
    Environment: 
OS: Ubuntu 14.04

I follow the issue to add the patches to Jamvm and GNU Classpath.
  https://issues.apache.org/jira/browse/FELIX-2775

- JamVM-2.0.0 + patch

- GNU Classpath 0.99-plus + patch
  clone repository from git://git.sv.gnu.org/classpath.git and then switch to master branch

- Felix Framework 5.4.0
  http://apache.stu.edu.tw//felix/org.apache.felix.framework-5.4.0.jar

  was:
OS: Ubuntu 12.04

I follow the issue to add the patches to Jamvm and GNU Classpath.
  https://issues.apache.org/jira/browse/FELIX-2775

- JamVM-2.0.0 + patch

- GNU Classpath 0.99-plus + patch
  clone repository from git://git.sv.gnu.org/classpath.git and then switch to master branch

- Felix Framework 5.4.0
  http://apache.stu.edu.tw//felix/org.apache.felix.framework-5.4.0.jar


> Can not install/start the framework.security bundle
> ---------------------------------------------------
>
>                 Key: FELIX-5324
>                 URL: https://issues.apache.org/jira/browse/FELIX-5324
>             Project: Felix
>          Issue Type: Bug
>          Components: Conditional Permission Admin
>    Affects Versions: framework.security-2.4.0
>         Environment: OS: Ubuntu 14.04
> I follow the issue to add the patches to Jamvm and GNU Classpath.
>   https://issues.apache.org/jira/browse/FELIX-2775
> - JamVM-2.0.0 + patch
> - GNU Classpath 0.99-plus + patch
>   clone repository from git://git.sv.gnu.org/classpath.git and then switch to master branch
> - Felix Framework 5.4.0
>   http://apache.stu.edu.tw//felix/org.apache.felix.framework-5.4.0.jar
>            Reporter: benhsu
>
> Run the following command to start felix framework.
> $ /usr/local/jamvm/bin/jamvm -Dorg.osgi.framework.security="osgi" -Dpolicy.provider=gnu.java.security.PolicyFile -Djava.security.policy=file:///home/benhsu/felix-framework-5.4.0/conf/java.policy -jar bin/felix.jar
> The content of java.policy is as follows.
> grant {
>   permission java.security.AllPermission;
> };
> grant codeBase "http://felix.extensions:9/" {
>   permission java.security.AllPermission;
> };
> There are two ways to start framework.security bundle, but i got the different errors.
> 1. Put the framework.security bundle into bundle directory and it will be started when framework starts. 
> I got the following log and gogo shell hang on not to work.
> DEBUG: WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(status=provisional)(version>=0.10.0)(!(version>=1.0.0))) -> [org.apache.felix.gogo.runtime [4](R 4.0)]
> DEBUG: WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.framework)(version>=1.5.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.framework.wiring)(version>=1.0.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.packageadmin)(version>=1.2.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.startlevel)(version>=1.1.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.util.tracker)(version>=1.3.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.bundlerepository [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.log)(version>=1.3.0)(!(version>=2.0.0))) -> [org.apache.felix.gogo.command [3](R 3.0)]
> DEBUG: WIRE: [org.apache.felix.bundlerepository [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.framework)(version>=1.7.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.bundlerepository [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.framework.wiring)(version>=1.1.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.bundlerepository [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.resource)(version>=1.0.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.bundlerepository [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.url)(version>=1.0.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.bundlerepository [1](R 1.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.util.tracker)(version>=1.5.0)(!(version>=2.0.0))) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.runtime [4](R 4.0)] osgi.wiring.package; (osgi.wiring.package=org.osgi.framework) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.runtime [4](R 4.0)] osgi.wiring.package; (osgi.wiring.package=org.osgi.util.tracker) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: DYNAMIC WIRE: [org.apache.felix.gogo.command [3](R 3.0)] osgi.wiring.package; (osgi.wiring.package=org.apache.felix.bundlerepository) -> [org.apache.felix.bundlerepository [1](R 1.0)]
> DEBUG: WIRE: [org.apache.felix.gogo.shell [5](R 5.0)] osgi.wiring.package; (&(osgi.wiring.package=org.apache.felix.service.command)(status=provisional)(version>=0.10.0)) -> [org.apache.felix.gogo.runtime [4](R 4.0)]
> DEBUG: WIRE: [org.apache.felix.gogo.shell [5](R 5.0)] osgi.wiring.package; (osgi.wiring.package=org.osgi.framework) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.shell [5](R 5.0)] osgi.wiring.package; (osgi.wiring.package=org.osgi.service.startlevel) -> [org.apache.felix.framework [0](R 0)]
> DEBUG: WIRE: [org.apache.felix.gogo.shell [5](R 5.0)] osgi.wiring.package; (osgi.wiring.package=org.osgi.util.tracker) -> [org.apache.felix.framework [0](R 0)]
> ERROR: Bundle org.apache.felix.gogo.runtime [4] EventDispatcher: Error during dispatch. (java.lang.NoClassDefFoundError: org/apache/felix/framework/security/condpermadmin/DomainGripper)
> java.lang.NoClassDefFoundError: org/apache/felix/framework/security/condpermadmin/DomainGripper
>    at org.apache.felix.framework.security.condpermadmin.ConditionalPermissionAdminImpl.handlePAHandle(ConditionalPermissionAdminImpl.java:1084)
>    at org.apache.felix.framework.SecurityProviderImpl.hasBundlePermission(SecurityProviderImpl.java:114)
>    at org.apache.felix.framework.Felix.impliesBundlePermission(Felix.java:4438)
>    at org.apache.felix.framework.BundleProtectionDomain.implies(BundleProtectionDomain.java:404)
>    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:156)
>    at java.security.AccessController.checkPermission(AccessController.java:76)
>    at java.lang.SecurityManager.checkPermission(SecurityManager.java:368)
>    at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:467)
>    at org.osgi.util.tracker.ServiceTracker.addingService(ServiceTracker.java:414)
>    at org.apache.felix.gogo.runtime.activator.Activator$1.addingService(Activator.java:94)
>    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>    at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
>    at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)
>    at org.apache.felix.framework.util.EventDispatcher$4.run(EventDispatcher.java:984)
>    at java.security.AccessController.doPrivileged(AccessController.java:96)
>    at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:979)
>    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
>    at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
>    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)
>    at org.apache.felix.framework.Felix.registerService(Felix.java:3549)
>    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
>    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:322)
>    at org.apache.felix.gogo.shell.Activator.startShell(Activator.java:100)
>    at org.apache.felix.gogo.shell.Activator.access$000(Activator.java:35)
>    at org.apache.felix.gogo.shell.Activator$1.addingService(Activator.java:135)
>    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)
>    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)
>    at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
>    at org.osgi.util.tracker.AbstractTracked.trackInitial(AbstractTracked.java:183)
>    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318)
>    at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
>    at org.apache.felix.gogo.shell.Activator.processorTracker(Activator.java:150)
>    at org.apache.felix.gogo.shell.Activator.start(Activator.java:47)
>    at org.apache.felix.framework.util.SecureAction$Actions.run(SecureAction.java:1709)
>    at java.security.AccessController.doPrivileged(AccessController.java:195)
>    at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:688)
>    at org.apache.felix.framework.Felix.activateBundle(Felix.java:2226)
>    at org.apache.felix.framework.Felix.startBundle(Felix.java:2144)
>    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
>    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
>    at java.lang.Thread.run(Thread.java:745)
> ...
> I checked and  found org/apache/felix/framework/security/condpermadmin/DomainGripper inside of org.apache.felix.framework.security-2.4.0.jar, why it shows not to find?
> 2. After the framework started, i ran the install/start command in gogo shell and i got the following error and any command did not work.
> g! start file:///home/benhsu/felix-framework-5.4.0/org.apache.felix.framework.security-2.4.0.jar
> gogo: InvocationTargetException: null
> g! lb
> gogo: NoClassDefFoundError: org/apache/felix/framework/security/util/Permissions$Entry
> PS: If i restart the framework, i found the framework.security bundle being resolved but not started the both of PermissionAdmin and ConditionalPermissionAdmin services by the command.
> $ inspec cap service 0



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)