[jira] [Work started] (KARAF-4701) Problem installing feature

2017-03-26 Thread JIRA

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

Work on KARAF-4701 started by Jean-Baptiste Onofré.
---
> Problem installing feature
> --
>
> Key: KARAF-4701
> URL: https://issues.apache.org/jira/browse/KARAF-4701
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-feature
>Affects Versions: 4.0.6
>Reporter: Hannes Bjurek
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Sometimes(roughly every 5) time we deploy a feature karaf thinks it needs to 
> refresh our org.apache.servicemix.bundles.jaxb-impl bundle even though it 
> should not. We have debugged the Deployer.computeDeployent method and 
> discovered that cause of this problem is that the jaxb-impl bundle is 
> duplicated in the bundlesPerRegions-map and then it gets duplicated in the 
> toDeploy list.
> The "first" jaxb-impl gets removed on line 1219 but the "second" one of 
> course is still there and then it triggers the unexpected event.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4701) Problem installing feature

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4701:

Fix Version/s: 4.1.1
   4.0.9

> Problem installing feature
> --
>
> Key: KARAF-4701
> URL: https://issues.apache.org/jira/browse/KARAF-4701
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-feature
>Affects Versions: 4.0.6
>Reporter: Hannes Bjurek
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Sometimes(roughly every 5) time we deploy a feature karaf thinks it needs to 
> refresh our org.apache.servicemix.bundles.jaxb-impl bundle even though it 
> should not. We have debugged the Deployer.computeDeployent method and 
> discovered that cause of this problem is that the jaxb-impl bundle is 
> duplicated in the bundlesPerRegions-map and then it gets duplicated in the 
> toDeploy list.
> The "first" jaxb-impl gets removed on line 1219 but the "second" one of 
> course is still there and then it triggers the unexpected event.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Assigned] (KARAF-4701) Problem installing feature

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré reassigned KARAF-4701:
---

Assignee: Jean-Baptiste Onofré

> Problem installing feature
> --
>
> Key: KARAF-4701
> URL: https://issues.apache.org/jira/browse/KARAF-4701
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-feature
>Affects Versions: 4.0.6
>Reporter: Hannes Bjurek
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Sometimes(roughly every 5) time we deploy a feature karaf thinks it needs to 
> refresh our org.apache.servicemix.bundles.jaxb-impl bundle even though it 
> should not. We have debugged the Deployer.computeDeployent method and 
> discovered that cause of this problem is that the jaxb-impl bundle is 
> duplicated in the bundlesPerRegions-map and then it gets duplicated in the 
> toDeploy list.
> The "first" jaxb-impl gets removed on line 1219 but the "second" one of 
> course is still there and then it triggers the unexpected event.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (KARAF-5011) Upgrade to Aries Transaction Blueprint 2.1.0

2017-03-26 Thread JIRA

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

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

> Upgrade to Aries Transaction Blueprint 2.1.0
> 
>
> Key: KARAF-5011
> URL: https://issues.apache.org/jira/browse/KARAF-5011
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: karaf-core
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>




--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-4985) Karaf does not start with JDK 9 in Windows

2017-03-26 Thread JIRA

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

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

Can you do a new try as we changed the way we load the lib (endorsed doesn't 
exist anymore in Java9) ?

> Karaf does not start with JDK 9 in Windows 
> ---
>
> Key: KARAF-4985
> URL: https://issues.apache.org/jira/browse/KARAF-4985
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-os-integration
>Affects Versions: 4.1.0
> Environment: Windows 7, Java 9 (JDK and JRE 9 - ea+156)
>Reporter: Lijun Liao
> Fix For: 4.1.2
>
>
> Under JDK / JRE 9 (tested with ea+156) in Windows 7, karaf does not start
> Steps to reproduce the problem:
> 1. Start karaf {code}bin/karaf{code} and you will get the following error
> {code}
> -Djava.endorsed.dir=C:\Program Files\Java\jdk-9\jre\lib\endorsed:C:\Program 
> Files\Java\jdk-9\lib\endorsed:D:\apache-karaf-4.1.0\bin\..\lib\endorsed is 
> not supported. Endorsed standards and standalone APIs
> in modular form will be supported via the concept of upgradeable modules.
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4336) Add support for ordering of CLI scripts and commands in karaf-maven-plugin

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4336:

Fix Version/s: (was: 4.1.2)
   4.1.1

> Add support for ordering of CLI scripts and commands in karaf-maven-plugin
> --
>
> Key: KARAF-4336
> URL: https://issues.apache.org/jira/browse/KARAF-4336
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-tooling
>Affects Versions: 4.0.4
>Reporter: Martin Basovník
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> {code:xml}
> 
>
>   setup1.cli
>   setup2.cli
>
>
>   feature:repo-add camel ${version.camel}
>
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4985) Karaf does not start with JDK 9 in Windows

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4985:

Fix Version/s: (was: 4.1.1)
   4.1.2

> Karaf does not start with JDK 9 in Windows 
> ---
>
> Key: KARAF-4985
> URL: https://issues.apache.org/jira/browse/KARAF-4985
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-os-integration
>Affects Versions: 4.1.0
> Environment: Windows 7, Java 9 (JDK and JRE 9 - ea+156)
>Reporter: Lijun Liao
> Fix For: 4.1.2
>
>
> Under JDK / JRE 9 (tested with ea+156) in Windows 7, karaf does not start
> Steps to reproduce the problem:
> 1. Start karaf {code}bin/karaf{code} and you will get the following error
> {code}
> -Djava.endorsed.dir=C:\Program Files\Java\jdk-9\jre\lib\endorsed:C:\Program 
> Files\Java\jdk-9\lib\endorsed:D:\apache-karaf-4.1.0\bin\..\lib\endorsed is 
> not supported. Endorsed standards and standalone APIs
> in modular form will be supported via the concept of upgradeable modules.
> Error: Could not create the Java Virtual Machine.
> Error: A fatal exception has occurred. Program will exit
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4966) Provide a Update Note document

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4966:

Fix Version/s: (was: 4.1.1)
   4.1.2

> Provide a Update Note document
> --
>
> Key: KARAF-4966
> URL: https://issues.apache.org/jira/browse/KARAF-4966
> Project: Karaf
>  Issue Type: Task
>  Components: karaf-documentation
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.2
>
>
> As we did for the update from Karaf 3.0.x to 4.0.x, we will provide a 
> documentation containing update notes. It should provide the key diff for 
> people upgrading to  Karaf 4.1.x (location of the features, shell behavior, 
> ...).



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4952) Provide features list on website

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4952:

Fix Version/s: (was: 4.1.1)
   4.1.2

> Provide features list on website
> 
>
> Key: KARAF-4952
> URL: https://issues.apache.org/jira/browse/KARAF-4952
> Project: Karaf
>  Issue Type: Improvement
>  Components: website
>Reporter: Jean-Baptiste Onofré
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.1.2
>
>
> Even if the features repositories are already listed in 
> {{etc/org.apache.karaf.features.repos.cfg}}, it could be interesting to 
> provide the list on the website or user guide.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-4336) Add support for ordering of CLI scripts and commands in karaf-maven-plugin

2017-03-26 Thread JIRA

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

Jean-Baptiste Onofré updated KARAF-4336:

Fix Version/s: (was: 4.1.1)
   4.1.2

> Add support for ordering of CLI scripts and commands in karaf-maven-plugin
> --
>
> Key: KARAF-4336
> URL: https://issues.apache.org/jira/browse/KARAF-4336
> Project: Karaf
>  Issue Type: Improvement
>  Components: karaf-tooling
>Affects Versions: 4.0.4
>Reporter: Martin Basovník
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.2
>
>
> {code:xml}
> 
>
>   setup1.cli
>   setup2.cli
>
>
>   feature:repo-add camel ${version.camel}
>
> 
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-5003) Possible bugs in the source code

2017-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5003:


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

[KARAF-5003] Fix test in JDBC lock


> Possible bugs in the source code
> 
>
> Key: KARAF-5003
> URL: https://issues.apache.org/jira/browse/KARAF-5003
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell, karaf-tooling, karaf-webcontainer
>Reporter: AppChecker
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php] and it found several 
> possible defects:
> 1) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/web/src/main/java/org/apache/karaf/web/internal/WebContainerServiceImpl.java#L85
> {code:java}
> contextPath.trim();
> {code}
> contextPath is not changed. Probably it should be:
> {code:java}
> contextPath = contextPath.trim();
> {code}
> 2) 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java#L120
> {code:java}
> if (repository.equals(repository)) {
> {code}
> repository is compared with itself. Probably it should be:
> {code:java}
> if (this.repository.equals(repository)) {
> {code}
> same place - 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java#L563
> 3) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java#L320
> {code:java}
> enableGeneration = !"feature".equals(packaging) && 
> !"feature".equals(packaging);
> {code}
>  !"feature".equals(packaging)  is checked twice
> 4) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java#L157
> {code:java}
> return metadata != null && 
> (checkTableExists(tableName.toLowerCase(), metadata) //
> || checkTableExists(tableName.toLowerCase(), metadata));
> {code}
> checkTableExists(tableName.toLowerCase(), metadata) is checked twice
> 5) Not a bug, pedantic remark
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java#L166
> {code:java}
> if 
> (ps.getClass().getName().equals("org.apache.felix.gogo.runtime.threadio.ThreadPrintStream"))
>  {
> {code}
> Not recommended to comparising of classes by name. See:
> https://cwe.mitre.org/data/definitions/486.html
> https://www.securecoding.cert.org/confluence/display/java/OBJ09-J.+Compare+classes+and+not+class+names
> We hope this was helpful



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (KARAF-5003) Possible bugs in the source code

2017-03-26 Thread JIRA

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

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

> Possible bugs in the source code
> 
>
> Key: KARAF-5003
> URL: https://issues.apache.org/jira/browse/KARAF-5003
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell, karaf-tooling, karaf-webcontainer
>Reporter: AppChecker
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php] and it found several 
> possible defects:
> 1) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/web/src/main/java/org/apache/karaf/web/internal/WebContainerServiceImpl.java#L85
> {code:java}
> contextPath.trim();
> {code}
> contextPath is not changed. Probably it should be:
> {code:java}
> contextPath = contextPath.trim();
> {code}
> 2) 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java#L120
> {code:java}
> if (repository.equals(repository)) {
> {code}
> repository is compared with itself. Probably it should be:
> {code:java}
> if (this.repository.equals(repository)) {
> {code}
> same place - 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java#L563
> 3) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java#L320
> {code:java}
> enableGeneration = !"feature".equals(packaging) && 
> !"feature".equals(packaging);
> {code}
>  !"feature".equals(packaging)  is checked twice
> 4) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java#L157
> {code:java}
> return metadata != null && 
> (checkTableExists(tableName.toLowerCase(), metadata) //
> || checkTableExists(tableName.toLowerCase(), metadata));
> {code}
> checkTableExists(tableName.toLowerCase(), metadata) is checked twice
> 5) Not a bug, pedantic remark
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java#L166
> {code:java}
> if 
> (ps.getClass().getName().equals("org.apache.felix.gogo.runtime.threadio.ThreadPrintStream"))
>  {
> {code}
> Not recommended to comparising of classes by name. See:
> https://cwe.mitre.org/data/definitions/486.html
> https://www.securecoding.cert.org/confluence/display/java/OBJ09-J.+Compare+classes+and+not+class+names
> We hope this was helpful



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-5003) Possible bugs in the source code

2017-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5003:


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

[KARAF-5003] Fix table exists checked twice in JDBC lock


> Possible bugs in the source code
> 
>
> Key: KARAF-5003
> URL: https://issues.apache.org/jira/browse/KARAF-5003
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell, karaf-tooling, karaf-webcontainer
>Reporter: AppChecker
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php] and it found several 
> possible defects:
> 1) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/web/src/main/java/org/apache/karaf/web/internal/WebContainerServiceImpl.java#L85
> {code:java}
> contextPath.trim();
> {code}
> contextPath is not changed. Probably it should be:
> {code:java}
> contextPath = contextPath.trim();
> {code}
> 2) 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java#L120
> {code:java}
> if (repository.equals(repository)) {
> {code}
> repository is compared with itself. Probably it should be:
> {code:java}
> if (this.repository.equals(repository)) {
> {code}
> same place - 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java#L563
> 3) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java#L320
> {code:java}
> enableGeneration = !"feature".equals(packaging) && 
> !"feature".equals(packaging);
> {code}
>  !"feature".equals(packaging)  is checked twice
> 4) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java#L157
> {code:java}
> return metadata != null && 
> (checkTableExists(tableName.toLowerCase(), metadata) //
> || checkTableExists(tableName.toLowerCase(), metadata));
> {code}
> checkTableExists(tableName.toLowerCase(), metadata) is checked twice
> 5) Not a bug, pedantic remark
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java#L166
> {code:java}
> if 
> (ps.getClass().getName().equals("org.apache.felix.gogo.runtime.threadio.ThreadPrintStream"))
>  {
> {code}
> Not recommended to comparising of classes by name. See:
> https://cwe.mitre.org/data/definitions/486.html
> https://www.securecoding.cert.org/confluence/display/java/OBJ09-J.+Compare+classes+and+not+class+names
> We hope this was helpful



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-5003) Possible bugs in the source code

2017-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5003:


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

[KARAF-5003] Compare by class instead of by class name


> Possible bugs in the source code
> 
>
> Key: KARAF-5003
> URL: https://issues.apache.org/jira/browse/KARAF-5003
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell, karaf-tooling, karaf-webcontainer
>Reporter: AppChecker
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php] and it found several 
> possible defects:
> 1) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/web/src/main/java/org/apache/karaf/web/internal/WebContainerServiceImpl.java#L85
> {code:java}
> contextPath.trim();
> {code}
> contextPath is not changed. Probably it should be:
> {code:java}
> contextPath = contextPath.trim();
> {code}
> 2) 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java#L120
> {code:java}
> if (repository.equals(repository)) {
> {code}
> repository is compared with itself. Probably it should be:
> {code:java}
> if (this.repository.equals(repository)) {
> {code}
> same place - 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java#L563
> 3) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java#L320
> {code:java}
> enableGeneration = !"feature".equals(packaging) && 
> !"feature".equals(packaging);
> {code}
>  !"feature".equals(packaging)  is checked twice
> 4) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java#L157
> {code:java}
> return metadata != null && 
> (checkTableExists(tableName.toLowerCase(), metadata) //
> || checkTableExists(tableName.toLowerCase(), metadata));
> {code}
> checkTableExists(tableName.toLowerCase(), metadata) is checked twice
> 5) Not a bug, pedantic remark
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java#L166
> {code:java}
> if 
> (ps.getClass().getName().equals("org.apache.felix.gogo.runtime.threadio.ThreadPrintStream"))
>  {
> {code}
> Not recommended to comparising of classes by name. See:
> https://cwe.mitre.org/data/definitions/486.html
> https://www.securecoding.cert.org/confluence/display/java/OBJ09-J.+Compare+classes+and+not+class+names
> We hope this was helpful



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-5003) Possible bugs in the source code

2017-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5003:


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

[KARAF-5003] Fix test in JDBC lock


> Possible bugs in the source code
> 
>
> Key: KARAF-5003
> URL: https://issues.apache.org/jira/browse/KARAF-5003
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell, karaf-tooling, karaf-webcontainer
>Reporter: AppChecker
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php] and it found several 
> possible defects:
> 1) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/web/src/main/java/org/apache/karaf/web/internal/WebContainerServiceImpl.java#L85
> {code:java}
> contextPath.trim();
> {code}
> contextPath is not changed. Probably it should be:
> {code:java}
> contextPath = contextPath.trim();
> {code}
> 2) 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java#L120
> {code:java}
> if (repository.equals(repository)) {
> {code}
> repository is compared with itself. Probably it should be:
> {code:java}
> if (this.repository.equals(repository)) {
> {code}
> same place - 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java#L563
> 3) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java#L320
> {code:java}
> enableGeneration = !"feature".equals(packaging) && 
> !"feature".equals(packaging);
> {code}
>  !"feature".equals(packaging)  is checked twice
> 4) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java#L157
> {code:java}
> return metadata != null && 
> (checkTableExists(tableName.toLowerCase(), metadata) //
> || checkTableExists(tableName.toLowerCase(), metadata));
> {code}
> checkTableExists(tableName.toLowerCase(), metadata) is checked twice
> 5) Not a bug, pedantic remark
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java#L166
> {code:java}
> if 
> (ps.getClass().getName().equals("org.apache.felix.gogo.runtime.threadio.ThreadPrintStream"))
>  {
> {code}
> Not recommended to comparising of classes by name. See:
> https://cwe.mitre.org/data/definitions/486.html
> https://www.securecoding.cert.org/confluence/display/java/OBJ09-J.+Compare+classes+and+not+class+names
> We hope this was helpful



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-5003) Possible bugs in the source code

2017-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5003:


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

[KARAF-5003] Fix contextPath trim in WebContainer


> Possible bugs in the source code
> 
>
> Key: KARAF-5003
> URL: https://issues.apache.org/jira/browse/KARAF-5003
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-shell, karaf-tooling, karaf-webcontainer
>Reporter: AppChecker
>Assignee: Jean-Baptiste Onofré
> Fix For: 4.0.9, 4.1.1
>
>
> Hello!
> We've checked your project with [static code analyzer 
> AppChecker|https://cnpo.ru/en/solutions/appchecker.php] and it found several 
> possible defects:
> 1) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/web/src/main/java/org/apache/karaf/web/internal/WebContainerServiceImpl.java#L85
> {code:java}
> contextPath.trim();
> {code}
> contextPath is not changed. Probably it should be:
> {code:java}
> contextPath = contextPath.trim();
> {code}
> 2) 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/shell/RepoRemoveCommand.java#L120
> {code:java}
> if (repository.equals(repository)) {
> {code}
> repository is compared with itself. Probably it should be:
> {code:java}
> if (this.repository.equals(repository)) {
> {code}
> same place - 
> https://github.com/apache/karaf-cellar/blob/d3c028808b20ce09f20c2e6c6eca2cef70a86d15/features/src/main/java/org/apache/karaf/cellar/features/management/internal/CellarFeaturesMBeanImpl.java#L563
> 3) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/features/GenerateDescriptorMojo.java#L320
> {code:java}
> enableGeneration = !"feature".equals(packaging) && 
> !"feature".equals(packaging);
> {code}
>  !"feature".equals(packaging)  is checked twice
> 4) 
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/main/src/main/java/org/apache/karaf/main/lock/DefaultJDBCLock.java#L157
> {code:java}
> return metadata != null && 
> (checkTableExists(tableName.toLowerCase(), metadata) //
> || checkTableExists(tableName.toLowerCase(), metadata));
> {code}
> checkTableExists(tableName.toLowerCase(), metadata) is checked twice
> 5) Not a bug, pedantic remark
> https://github.com/apache/karaf/blob/d2894bfabaa73baa63f73675df1b4ae980528517/shell/core/src/main/java/org/apache/karaf/shell/support/table/ShellTable.java#L166
> {code:java}
> if 
> (ps.getClass().getName().equals("org.apache.felix.gogo.runtime.threadio.ThreadPrintStream"))
>  {
> {code}
> Not recommended to comparising of classes by name. See:
> https://cwe.mitre.org/data/definitions/486.html
> https://www.securecoding.cert.org/confluence/display/java/OBJ09-J.+Compare+classes+and+not+class+names
> We hope this was helpful



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-5066) feature:install feature:uninstall without any error

2017-03-26 Thread JIRA

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

Jörg Weule updated KARAF-5066:
--
Priority: Minor  (was: Major)

> feature:install feature:uninstall without any error
> ---
>
> Key: KARAF-5066
> URL: https://issues.apache.org/jira/browse/KARAF-5066
> Project: Karaf
>  Issue Type: New Feature
>Reporter: Jörg Weule
>Priority: Minor
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> feature:install and feature:uninstall are generating errors if the feature is 
> still installed or uninstalled resp. Karaf scripts are ended by this error. 
> An option should tell the commands to ignore the error and scripts are more 
> robust.
> As an alternative, a new command feature:is-installed returning a Boolean 
> should be implemented for
> if { feature:is-installed xxx } { feature:uninstall xxx }
> if {(  feature:is-installed xxx ) equals false } { feature:install xxx }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Resolved] (KARAF-5067) Add option not to register StandardManageableRegionDigraph

2017-03-26 Thread Fabian Lange (JIRA)

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

Fabian Lange resolved KARAF-5067.
-
Resolution: Fixed

> Add option not to register StandardManageableRegionDigraph
> --
>
> Key: KARAF-5067
> URL: https://issues.apache.org/jira/browse/KARAF-5067
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-feature
>Reporter: Fabian Lange
>Priority: Minor
> Fix For: 4.1.1
>
>
> To create a very low footprint karaf container, we disabled all jmx/mbean 
> functionality, but the features activator still registers the 
> StandardManageableRegionDigraph.
> Having an option not to register that mbean would also help us avoid the 
> startup of the mbeanserver at all, preventing some amount of memory usage and 
> classloading.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-5067) Add option not to register StandardManageableRegionDigraph

2017-03-26 Thread Fabian Lange (JIRA)

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

Fabian Lange updated KARAF-5067:

Fix Version/s: 4.1.1

> Add option not to register StandardManageableRegionDigraph
> --
>
> Key: KARAF-5067
> URL: https://issues.apache.org/jira/browse/KARAF-5067
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-feature
>Reporter: Fabian Lange
>Priority: Minor
> Fix For: 4.1.1
>
>
> To create a very low footprint karaf container, we disabled all jmx/mbean 
> functionality, but the features activator still registers the 
> StandardManageableRegionDigraph.
> Having an option not to register that mbean would also help us avoid the 
> startup of the mbeanserver at all, preventing some amount of memory usage and 
> classloading.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (KARAF-5067) Add option not to register StandardManageableRegionDigraph

2017-03-26 Thread ASF subversion and git services (JIRA)

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

ASF subversion and git services commented on KARAF-5067:


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

[KARAF-5067] Add option to prevent RegionDigraph MBean of features service


> Add option not to register StandardManageableRegionDigraph
> --
>
> Key: KARAF-5067
> URL: https://issues.apache.org/jira/browse/KARAF-5067
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf-feature
>Reporter: Fabian Lange
>Priority: Minor
>
> To create a very low footprint karaf container, we disabled all jmx/mbean 
> functionality, but the features activator still registers the 
> StandardManageableRegionDigraph.
> Having an option not to register that mbean would also help us avoid the 
> startup of the mbeanserver at all, preventing some amount of memory usage and 
> classloading.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Created] (KARAF-5067) Add option not to register StandardManageableRegionDigraph

2017-03-26 Thread Fabian Lange (JIRA)
Fabian Lange created KARAF-5067:
---

 Summary: Add option not to register StandardManageableRegionDigraph
 Key: KARAF-5067
 URL: https://issues.apache.org/jira/browse/KARAF-5067
 Project: Karaf
  Issue Type: Bug
  Components: karaf-feature
Reporter: Fabian Lange
Priority: Minor


To create a very low footprint karaf container, we disabled all jmx/mbean 
functionality, but the features activator still registers the 
StandardManageableRegionDigraph.

Having an option not to register that mbean would also help us avoid the 
startup of the mbeanserver at all, preventing some amount of memory usage and 
classloading.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-5065) Shell command shell:wc should be able to return an Integer.

2017-03-26 Thread JIRA

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

Jörg Weule updated KARAF-5065:
--
Issue Type: New Feature  (was: Bug)

> Shell command shell:wc should be able to return an Integer.
> ---
>
> Key: KARAF-5065
> URL: https://issues.apache.org/jira/browse/KARAF-5065
> Project: Karaf
>  Issue Type: New Feature
>  Components: karaf-shell
>Reporter: Jörg Weule
>Priority: Minor
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Karaf command can return Java Objects. shell:wc should be able to return an 
> Integer (or an array of integers) to be processed by an „If {...} {...}” 
> shell command or be assigned to a variable.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Updated] (KARAF-5066) feature:install feature:uninstall without any error

2017-03-26 Thread JIRA

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

Jörg Weule updated KARAF-5066:
--
Issue Type: New Feature  (was: Bug)

> feature:install feature:uninstall without any error
> ---
>
> Key: KARAF-5066
> URL: https://issues.apache.org/jira/browse/KARAF-5066
> Project: Karaf
>  Issue Type: New Feature
>Reporter: Jörg Weule
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> feature:install and feature:uninstall are generating errors if the feature is 
> still installed or uninstalled resp. Karaf scripts are ended by this error. 
> An option should tell the commands to ignore the error and scripts are more 
> robust.
> As an alternative, a new command feature:is-installed returning a Boolean 
> should be implemented for
> if { feature:is-installed xxx } { feature:uninstall xxx }
> if {(  feature:is-installed xxx ) equals false } { feature:install xxx }



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)