[jira] [Work started] (KARAF-5296) The command "shell:watch" fails with a NPE

2017-08-11 Thread JIRA

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

Work on KARAF-5296 started by Jean-Baptiste Onofré.
---
> The command "shell:watch" fails with a NPE
> --
>
> Key: KARAF-5296
> URL: https://issues.apache.org/jira/browse/KARAF-5296
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell
>Affects Versions: 4.1.2
>Reporter: J. Brébec
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.2.0, 4.1.3
>
>
> The command "shell:watch" fails with a NPE :
> {code}
> java.lang.NullPointerException
> at org.apache.felix.gogo.jline.Posix.lambda$watch$6(Posix.java:872)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Reproduced on a fresh Karaf 4.1.2 instances, on Windows 7, with various 
> "watch" tests (watch list, watch scr:components, ..)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Updated] (KARAF-5296) The command "shell:watch" fails with a NPE

2017-08-11 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-5296:

Fix Version/s: 4.1.3
   4.2.0

> The command "shell:watch" fails with a NPE
> --
>
> Key: KARAF-5296
> URL: https://issues.apache.org/jira/browse/KARAF-5296
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell
>Affects Versions: 4.1.2
>Reporter: J. Brébec
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.2.0, 4.1.3
>
>
> The command "shell:watch" fails with a NPE :
> {code}
> java.lang.NullPointerException
> at org.apache.felix.gogo.jline.Posix.lambda$watch$6(Posix.java:872)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Reproduced on a fresh Karaf 4.1.2 instances, on Windows 7, with various 
> "watch" tests (watch list, watch scr:components, ..)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5296) The command "shell:watch" fails with a NPE

2017-08-11 Thread JIRA

[ 
https://issues.apache.org/jira/browse/KARAF-5296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16124443#comment-16124443
 ] 

Jean-Baptiste Onofré commented on KARAF-5296:
-

I can reproduce the issue on 4.2.0-SNAPSHOT as well.

> The command "shell:watch" fails with a NPE
> --
>
> Key: KARAF-5296
> URL: https://issues.apache.org/jira/browse/KARAF-5296
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell
>Affects Versions: 4.1.2
>Reporter: J. Brébec
>Assignee: Jean-Baptiste Onofré
>Priority: Minor
> Fix For: 4.2.0, 4.1.3
>
>
> The command "shell:watch" fails with a NPE :
> {code}
> java.lang.NullPointerException
> at org.apache.felix.gogo.jline.Posix.lambda$watch$6(Posix.java:872)
> at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
> at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
> at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> Reproduced on a fresh Karaf 4.1.2 instances, on Windows 7, with various 
> "watch" tests (watch list, watch scr:components, ..)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5304) checkRootInstance function in karaf script fails under AIX

2017-08-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16123492#comment-16123492
 ] 

ASF subversion and git services commented on KARAF-5304:


Commit e1f74e3a2148a3b9b47cc1066d84ef5413920ce1 in karaf's branch 
refs/heads/karaf-4.0.x from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=e1f74e3 ]

[KARAF-5304] Update karaf script to be compliant with AIX


> checkRootInstance function in karaf script fails under AIX
> --
>
> Key: KARAF-5304
> URL: https://issues.apache.org/jira/browse/KARAF-5304
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.9
> Environment: AIX 6.1, 7.1, 7.2
>Reporter: Christian Brüssow
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.0.10, 4.1.3
>
>
> Calling e.g. the status script under KARAF_HOME on AIX, the subsequent called 
> script "karaf" fails and prints the following to stdout:
> {quote}
> [...]
> Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
> [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] 
> [-c classlist] [ -T pid] [ -L pidlist ]
> [-@ [wparname] ]
> Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
> [...]
> {quote}
> The error is triggered by the function checkRootInstance() in the script 
> "karaf". The function uses the following code to determine the status of the 
> karaf process:
> {quote}
> [...]
> if ps p "$\{ROOT_INSTANCE_PID\}" > /dev/null
> then
> [...]
> {quote}
> Under a standard AIX installation the command ps does not allow "p" as an 
> argument. So this call will always fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (KARAF-5304) checkRootInstance function in karaf script fails under AIX

2017-08-11 Thread JIRA

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

Jean-Baptiste Onofré resolved KARAF-5304.
-
Resolution: Fixed

> checkRootInstance function in karaf script fails under AIX
> --
>
> Key: KARAF-5304
> URL: https://issues.apache.org/jira/browse/KARAF-5304
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.9
> Environment: AIX 6.1, 7.1, 7.2
>Reporter: Christian Brüssow
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.0.10, 4.1.3
>
>
> Calling e.g. the status script under KARAF_HOME on AIX, the subsequent called 
> script "karaf" fails and prints the following to stdout:
> {quote}
> [...]
> Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
> [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] 
> [-c classlist] [ -T pid] [ -L pidlist ]
> [-@ [wparname] ]
> Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
> [...]
> {quote}
> The error is triggered by the function checkRootInstance() in the script 
> "karaf". The function uses the following code to determine the status of the 
> karaf process:
> {quote}
> [...]
> if ps p "$\{ROOT_INSTANCE_PID\}" > /dev/null
> then
> [...]
> {quote}
> Under a standard AIX installation the command ps does not allow "p" as an 
> argument. So this call will always fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5304) checkRootInstance function in karaf script fails under AIX

2017-08-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16123308#comment-16123308
 ] 

ASF subversion and git services commented on KARAF-5304:


Commit 7281969cff49399c8f4817456e56de3b06b5b7e0 in karaf's branch 
refs/heads/karaf-4.1.x from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=7281969 ]

[KARAF-5304] Update karaf script to be compliant with AIX


> checkRootInstance function in karaf script fails under AIX
> --
>
> Key: KARAF-5304
> URL: https://issues.apache.org/jira/browse/KARAF-5304
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.9
> Environment: AIX 6.1, 7.1, 7.2
>Reporter: Christian Brüssow
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.0.10, 4.1.3
>
>
> Calling e.g. the status script under KARAF_HOME on AIX, the subsequent called 
> script "karaf" fails and prints the following to stdout:
> {quote}
> [...]
> Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
> [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] 
> [-c classlist] [ -T pid] [ -L pidlist ]
> [-@ [wparname] ]
> Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
> [...]
> {quote}
> The error is triggered by the function checkRootInstance() in the script 
> "karaf". The function uses the following code to determine the status of the 
> karaf process:
> {quote}
> [...]
> if ps p "$\{ROOT_INSTANCE_PID\}" > /dev/null
> then
> [...]
> {quote}
> Under a standard AIX installation the command ps does not allow "p" as an 
> argument. So this call will always fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5304) checkRootInstance function in karaf script fails under AIX

2017-08-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16123306#comment-16123306
 ] 

ASF subversion and git services commented on KARAF-5304:


Commit b7bdb359499d7fd9db09847e078d20cb461c2ace in karaf's branch 
refs/heads/master from [~jbonofre]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=b7bdb35 ]

[KARAF-5304] Update karaf script to be compliant with AIX


> checkRootInstance function in karaf script fails under AIX
> --
>
> Key: KARAF-5304
> URL: https://issues.apache.org/jira/browse/KARAF-5304
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.9
> Environment: AIX 6.1, 7.1, 7.2
>Reporter: Christian Brüssow
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.0.10, 4.1.3
>
>
> Calling e.g. the status script under KARAF_HOME on AIX, the subsequent called 
> script "karaf" fails and prints the following to stdout:
> {quote}
> [...]
> Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
> [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] 
> [-c classlist] [ -T pid] [ -L pidlist ]
> [-@ [wparname] ]
> Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
> [...]
> {quote}
> The error is triggered by the function checkRootInstance() in the script 
> "karaf". The function uses the following code to determine the status of the 
> karaf process:
> {quote}
> [...]
> if ps p "$\{ROOT_INSTANCE_PID\}" > /dev/null
> then
> [...]
> {quote}
> Under a standard AIX installation the command ps does not allow "p" as an 
> argument. So this call will always fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (KARAF-5305) FeatureConfigInstaller writes incorrect config if append=true and file already exists

2017-08-11 Thread Christian Schneider (JIRA)

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

Christian Schneider resolved KARAF-5305.

Resolution: Fixed

> FeatureConfigInstaller writes incorrect config if append=true and file 
> already exists
> -
>
> Key: KARAF-5305
> URL: https://issues.apache.org/jira/browse/KARAF-5305
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-config
>Affects Versions: 4.2.0
>Reporter: Christian Schneider
>Assignee: Christian Schneider
> Fix For: 4.2.0
>
>
> While improving the org.apache.karaf.features.AppendTest I found that there 
> is a case where the FeatureConfigInstaller behaves incorrectly.
> If you add cfgFile.createNewFile() to testAppend then the code does not use  
> the java Property class to write the config but the felix TypedProperties. 
> The resulting file looks like this:
> javax.servlet.context.tempdir = ( \
> \
>   "data/pax-web-jsp", \
> \
> )
> This is incorrect as the property javax.servlet.context.tempdir contains a 
> simple String not an array.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5305) FeatureConfigInstaller writes incorrect config if append=true and file already exists

2017-08-11 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/KARAF-5305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16123098#comment-16123098
 ] 

ASF subversion and git services commented on KARAF-5305:


Commit 5cc9c81b3aadacab6c33614f22680b2acadde20d in karaf's branch 
refs/heads/master from [~ch...@die-schneider.net]
[ https://git-wip-us.apache.org/repos/asf?p=karaf.git;h=5cc9c81 ]

[KARAF-5305] Fix issue when cfg file exists


> FeatureConfigInstaller writes incorrect config if append=true and file 
> already exists
> -
>
> Key: KARAF-5305
> URL: https://issues.apache.org/jira/browse/KARAF-5305
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-config
>Affects Versions: 4.2.0
>Reporter: Christian Schneider
>Assignee: Christian Schneider
> Fix For: 4.2.0
>
>
> While improving the org.apache.karaf.features.AppendTest I found that there 
> is a case where the FeatureConfigInstaller behaves incorrectly.
> If you add cfgFile.createNewFile() to testAppend then the code does not use  
> the java Property class to write the config but the felix TypedProperties. 
> The resulting file looks like this:
> javax.servlet.context.tempdir = ( \
> \
>   "data/pax-web-jsp", \
> \
> )
> This is incorrect as the property javax.servlet.context.tempdir contains a 
> simple String not an array.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Created] (KARAF-5305) FeatureConfigInstaller writes incorrect config if append=true and file already exists

2017-08-11 Thread Christian Schneider (JIRA)
Christian Schneider created KARAF-5305:
--

 Summary: FeatureConfigInstaller writes incorrect config if 
append=true and file already exists
 Key: KARAF-5305
 URL: https://issues.apache.org/jira/browse/KARAF-5305
 Project: Karaf
  Issue Type: Bug
  Components: karaf-config
Affects Versions: 4.2.0
Reporter: Christian Schneider
Assignee: Christian Schneider
 Fix For: 4.2.0


While improving the org.apache.karaf.features.AppendTest I found that there is 
a case where the FeatureConfigInstaller behaves incorrectly.

If you add cfgFile.createNewFile() to testAppend then the code does not use  
the java Property class to write the config but the felix TypedProperties. 
The resulting file looks like this:
javax.servlet.context.tempdir = ( \
\
  "data/pax-web-jsp", \
\
)

This is incorrect as the property javax.servlet.context.tempdir contains a 
simple String not an array.




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (KARAF-5304) checkRootInstance function in karaf script fails under AIX

2017-08-11 Thread JIRA

[ 
https://issues.apache.org/jira/browse/KARAF-5304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16122905#comment-16122905
 ] 

Jean-Baptiste Onofré commented on KARAF-5304:
-

Let me check but AFAIR, {{ps -p}} (instead of {{ps p}}) should work on AIX.

> checkRootInstance function in karaf script fails under AIX
> --
>
> Key: KARAF-5304
> URL: https://issues.apache.org/jira/browse/KARAF-5304
> Project: Karaf
>  Issue Type: Bug
>Affects Versions: 4.0.9
> Environment: AIX 6.1, 7.1, 7.2
>Reporter: Christian Brüssow
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.2.0, 4.0.10, 4.1.3
>
>
> Calling e.g. the status script under KARAF_HOME on AIX, the subsequent called 
> script "karaf" fails and prints the following to stdout:
> {quote}
> [...]
> Usage: ps [-AMNZaedfklm] [-n namelist] [-F Format] [-o specifier[=header],...]
> [-p proclist][-G|-g grouplist] [-t termlist] [-U|-u userlist] 
> [-c classlist] [ -T pid] [ -L pidlist ]
> [-@ [wparname] ]
> Usage: ps [aceglnsuvwxX] [t tty] [processnumber]
> [...]
> {quote}
> The error is triggered by the function checkRootInstance() in the script 
> "karaf". The function uses the following code to determine the status of the 
> karaf process:
> {quote}
> [...]
> if ps p "$\{ROOT_INSTANCE_PID\}" > /dev/null
> then
> [...]
> {quote}
> Under a standard AIX installation the command ps does not allow "p" as an 
> argument. So this call will always fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)