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 1F635200B5C for ; Thu, 11 Aug 2016 11:49:23 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 1DF14160A85; Thu, 11 Aug 2016 09:49:23 +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 14FD9160A94 for ; Thu, 11 Aug 2016 11:49:21 +0200 (CEST) Received: (qmail 69025 invoked by uid 500); 11 Aug 2016 09:49:21 -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 69014 invoked by uid 99); 11 Aug 2016 09:49:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Aug 2016 09:49:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0614E2C02A3 for ; Thu, 11 Aug 2016 09:49:21 +0000 (UTC) Date: Thu, 11 Aug 2016 09:49:21 +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 09:49:23 -0000 [ 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 patches to Jamvm and GNU Classpth. - JamVM-2.0.0 + patch - GNU Classpath-0.99-plus + patch I clone the latest repository from git clone git://git.sv.gnu.org/classpath.git and then switch to master branch. - Felix Framework 5.4.0 I got the bundle from official download path. http://apache.stu.edu.tw//felix/org.apache.felix.framework.security-2.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 patches to Jamvm and GNU Classpth. > - JamVM-2.0.0 + patch > - GNU Classpath-0.99-plus + patch > I clone the latest repository from git clone git://git.sv.gnu.org/classpath.git and then switch to master branch. > - Felix Framework 5.4.0 > I got the bundle from official download path. > http://apache.stu.edu.tw//felix/org.apache.felix.framework.security-2.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)