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 C67122009F3 for ; Fri, 20 May 2016 14:37:14 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C5041160A0E; Fri, 20 May 2016 12:37:14 +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 1B5D91609AF for ; Fri, 20 May 2016 14:37:13 +0200 (CEST) Received: (qmail 50029 invoked by uid 500); 20 May 2016 12:37:13 -0000 Mailing-List: contact issues-help@karaf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@karaf.apache.org Delivered-To: mailing list issues@karaf.apache.org Received: (qmail 50014 invoked by uid 99); 20 May 2016 12:37:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2016 12:37:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id CA8082C1F5C for ; Fri, 20 May 2016 12:37:12 +0000 (UTC) Date: Fri, 20 May 2016 12:37:12 +0000 (UTC) From: "AggelosGroumas (JIRA)" To: issues@karaf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KARAF-4532) SystemCollector throws IOException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 20 May 2016 12:37:15 -0000 [ https://issues.apache.org/jira/browse/KARAF-4532?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1529= 3282#comment-15293282 ]=20 AggelosGroumas commented on KARAF-4532: --------------------------------------- Hi Morgan, can you post the link to the PR? I cant find it. BR > SystemCollector throws IOException > ---------------------------------- > > Key: KARAF-4532 > URL: https://issues.apache.org/jira/browse/KARAF-4532 > Project: Karaf > Issue Type: Bug > Components: decanter > Affects Versions: decanter-1.1.0 > Environment: Karaf 4.0.5=20 > Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode) > Reporter: AggelosGroumas > Assignee: Jean-Baptiste Onofr=C3=A9 > Priority: Minor > Fix For: decanter-1.1.1 > > > I tried following the decanter guide and noticed that the system collecto= r throws java.io.IOException when trying to execute the commands i specifie= d inside the "org.apache.karaf.decanter.collector.system.cfg" file.=20 > E.g=20 > {quote} > 2016-05-17 16:58:36,682 | WARN | scheduler-simple | SystemCollector = | 55 - org.apache.karaf.decanter.collector.system - 1.1.0 | Co= mmand decanter.collector.name execution failed > java.io.IOException: Cannot run program "system" (in directory "."): erro= r=3D2, No such file or directory > =09at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) > =09at java.lang.Runtime.exec(Runtime.java:620) > =09at org.apache.commons.exec.launcher.Java13CommandLauncher.exec(Java13C= ommandLauncher.java:61) > =09at org.apache.commons.exec.DefaultExecutor.launch(DefaultExecutor.java= :279) > =09at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExec= utor.java:336) > =09at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.jav= a:166) > =09at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.jav= a:153) > =09at org.apache.karaf.decanter.collector.system.SystemCollector.run(Syst= emCollector.java:89) > =09at org.apache.karaf.decanter.scheduler.simple.SimpleScheduler.run(Simp= leScheduler.java:72) > =09at java.lang.Thread.run(Thread.java:745) > Caused by: java.io.IOException: error=3D2, No such file or directory > =09at java.lang.UNIXProcess.forkAndExec(Native Method) > =09at java.lang.UNIXProcess.(UNIXProcess.java:248) > =09at java.lang.ProcessImpl.start(ProcessImpl.java:134) > =09at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) > =09... 9 more > {quote} > This happens because the Dictionary object returned by the injected Compo= nentContext contains some extra keys except those skipped by [line 70 of th= e SystemCollector class|https://github.com/apache/karaf-decanter/blob/maste= r/collector/system/src/main/java/org/apache/karaf/decanter/collector/system= /SystemCollector.java#L70]. > As you can see here > bq. 2016-05-17 16:58:36,671 | DEBUG | scheduler-simple | SystemCollector = | 55 - org.apache.karaf.decanter.collector.system - 1.1.0 = | properties: {service.pid=3Dorg.apache.karaf.decanter.collector.system, da= te=3Ddate "+%Y", component.name=3Dorg.apache.karaf.decanter.collector.syste= m, felix.fileinstall.filename=3Dfile:/Users/agroumas/Downloads/apache-karaf= -4.0.5/etc/org.apache.karaf.decanter.collector.system.cfg, decanter.collect= or.name=3Dsystem, component.id=3D1} > the properties object contains three more properties which are being mist= aken as commands:=20 > - component.name=3Dorg.apache.karaf.decanter.collector.system > - decanter.collector.name=3Dsystem > - component.id=3D1 -- This message was sent by Atlassian JIRA (v6.3.4#6332)