Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C8EEE200B5C for ; Thu, 11 Aug 2016 12:12:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C7849160A85; Thu, 11 Aug 2016 10:12:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7420D160A94 for ; Thu, 11 Aug 2016 12:12:21 +0200 (CEST) Received: (qmail 10317 invoked by uid 500); 11 Aug 2016 10:12:20 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 10284 invoked by uid 99); 11 Aug 2016 10:12:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2016 10:12:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 767182C0003 for ; Thu, 11 Aug 2016 10:12:20 +0000 (UTC) Date: Thu, 11 Aug 2016 10:12:20 +0000 (UTC) From: "benhsu (JIRA)" To: dev@felix.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FELIX-5324) Can not install/start the framework.security bundle MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 11 Aug 2016 10:12:23 -0000 [ https://issues.apache.org/jira/browse/FELIX-5324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] benhsu updated FELIX-5324: -------------------------- Description: First i run the following command to start the 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 file 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 all are fail and 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 anymore and shows another error. ____________________________ Welcome to Apache Felix Gogo 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 ____________________________ Welcome to Apache Felix Gogo g! lb START LEVEL 1 ID|State |Level|Name 0|Active | 0|System Bundle (5.4.0)|5.4.0 1|Active | 1|Apache Felix Bundle Repository (2.0.6)|2.0.6 2|Active | 1|Apache Felix Gogo Command (0.16.0)|0.16.0 3|Active | 1|Apache Felix Gogo Runtime (0.16.2)|0.16.2 4|Active | 1|Apache Felix Gogo Shell (0.10.0)|0.10.0 5|Resolved | 1|Apache Felix Security Provider (2.4.0)|2.4.0 g! inspect cap service 0\ gogo: EOFException: unexpected EOT in \ escape g! inspect cap service 0 org.apache.felix.framework [0] provides: ---------------------------------------- service; org.osgi.service.resolver.Resolver with properties: service.bundleid = 0 service.id = 1 service.scope = singleton service; org.osgi.service.packageadmin.PackageAdmin with properties: service.bundleid = 0 service.id = 2 service.scope = singleton service; org.osgi.service.startlevel.StartLevel with properties: service.bundleid = 0 service.id = 3 service.scope = singleton Used by: org.apache.felix.framework [0] was: 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 > 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 followed the issue to add patches to JamVM and GNU Classpth. > https://issues.apache.org/jira/browse/FELIX-2775 > - JamVM-2.0.0 + patch > I got the source to build and install. > https://sourceforge.net/projects/jamvm/files/jamvm/JamVM%202.0.0/jamvm-2.0.0.tar.gz/download > - GNU Classpath-0.99-plus + patch > I got the latest source from the Git repository and then switch to master branch to build and install. > $ git clone git://git.sv.gnu.org/classpath.git > - Felix Framework-5.4.0 > I got the executable from the official. > http://apache.stu.edu.tw//felix/org.apache.felix.framework-5.4.0.jar > Reporter: benhsu > > First i run the following command to start the 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 file 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 all are fail and 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 anymore and shows another error. > ____________________________ > Welcome to Apache Felix Gogo > 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 > ____________________________ > Welcome to Apache Felix Gogo > g! lb > START LEVEL 1 > ID|State |Level|Name > 0|Active | 0|System Bundle (5.4.0)|5.4.0 > 1|Active | 1|Apache Felix Bundle Repository (2.0.6)|2.0.6 > 2|Active | 1|Apache Felix Gogo Command (0.16.0)|0.16.0 > 3|Active | 1|Apache Felix Gogo Runtime (0.16.2)|0.16.2 > 4|Active | 1|Apache Felix Gogo Shell (0.10.0)|0.10.0 > 5|Resolved | 1|Apache Felix Security Provider (2.4.0)|2.4.0 > g! inspect cap service 0\ > gogo: EOFException: unexpected EOT in \ escape > g! inspect cap service 0 > org.apache.felix.framework [0] provides: > ---------------------------------------- > service; org.osgi.service.resolver.Resolver with properties: > service.bundleid = 0 > service.id = 1 > service.scope = singleton > service; org.osgi.service.packageadmin.PackageAdmin with properties: > service.bundleid = 0 > service.id = 2 > service.scope = singleton > service; org.osgi.service.startlevel.StartLevel with properties: > service.bundleid = 0 > service.id = 3 > service.scope = singleton > Used by: > org.apache.felix.framework [0] -- This message was sent by Atlassian JIRA (v6.3.4#6332)