[jira] [Resolved] (KARAF-6380) Karaf does not pass configs with dashes to ManagedService

2019-08-14 Thread Freeman Fang (JIRA)


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

Freeman Fang resolved KARAF-6380.
-
Resolution: Information Provided

> Karaf does not pass configs with dashes to ManagedService
> -
>
> Key: KARAF-6380
> URL: https://issues.apache.org/jira/browse/KARAF-6380
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.2.6
>Reporter: Kamil
>Assignee: Freeman Fang
>Priority: Major
>
> I have a bundle with this code in activator:
>  
> {code:java}
>   @Override
>   public final void start(final BundleContext bundleContext) throws 
> InterruptedException {
> // final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
> not work!
> final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
> ServiceRegistration serviceReg = 
> bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
> Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
> }
> {code}
> where:
> {code:java}
>   private final class ConfigUpdater implements ManagedService {
>   @Override
>   public void updated(final Dictionary config) throws 
> ConfigurationException {
> if (config == null) {
>   System.out.println("The config is null!");
>   return;
> }
>   }
>   }
> {code}
> and two files in $KARAF_HOME/etc:
>  * foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
>  * foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg
> the first pid gives null as a config, while the second works



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (KARAF-6380) Karaf does not pass configs with dashes to ManagedService

2019-08-14 Thread Freeman Fang (JIRA)


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

Freeman Fang commented on KARAF-6380:
-

Hi [~eximius],

This is a known behavior, and it lies in Apache Felix.
{code}
PID strings (symbolic-name syntax) allow hyphens in the OSGI specification. 
However, hyphens are interpreted by Apache Felix.fileinstall and config:edit 
shell commands to differentiate a "managed service" and "managed service 
factory". Therefore, it is recommended to not use hyphens elsewhere in a PID 
string. 
{code}

So it's not a Karaf problem.

Cheers
Freeman

> Karaf does not pass configs with dashes to ManagedService
> -
>
> Key: KARAF-6380
> URL: https://issues.apache.org/jira/browse/KARAF-6380
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.2.6
>Reporter: Kamil
>Assignee: Freeman Fang
>Priority: Major
>
> I have a bundle with this code in activator:
>  
> {code:java}
>   @Override
>   public final void start(final BundleContext bundleContext) throws 
> InterruptedException {
> // final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
> not work!
> final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
> ServiceRegistration serviceReg = 
> bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
> Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
> }
> {code}
> where:
> {code:java}
>   private final class ConfigUpdater implements ManagedService {
>   @Override
>   public void updated(final Dictionary config) throws 
> ConfigurationException {
> if (config == null) {
>   System.out.println("The config is null!");
>   return;
> }
>   }
>   }
> {code}
> and two files in $KARAF_HOME/etc:
>  * foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
>  * foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg
> the first pid gives null as a config, while the second works



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Assigned] (KARAF-6380) Karaf does not pass configs with dashes to ManagedService

2019-08-14 Thread Freeman Fang (JIRA)


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

Freeman Fang reassigned KARAF-6380:
---

Assignee: Freeman Fang

> Karaf does not pass configs with dashes to ManagedService
> -
>
> Key: KARAF-6380
> URL: https://issues.apache.org/jira/browse/KARAF-6380
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.2.6
>Reporter: Kamil
>Assignee: Freeman Fang
>Priority: Major
>
> I have a bundle with this code in activator:
>  
> {code:java}
>   @Override
>   public final void start(final BundleContext bundleContext) throws 
> InterruptedException {
> // final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
> not work!
> final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
> ServiceRegistration serviceReg = 
> bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
> Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
> }
> {code}
> where:
> {code:java}
>   private final class ConfigUpdater implements ManagedService {
>   @Override
>   public void updated(final Dictionary config) throws 
> ConfigurationException {
> if (config == null) {
>   System.out.println("The config is null!");
>   return;
> }
>   }
>   }
> {code}
> and two files in $KARAF_HOME/etc:
>  * foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
>  * foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg
> the first pid gives null as a config, while the second works



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (KARAF-6380) Karaf does not pass configs with dashes to ManagedService

2019-08-14 Thread Kamil (JIRA)


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

Kamil updated KARAF-6380:
-
Description: 
I have a bundle with this code in activator:

 
{code:java}
  @Override
  public final void start(final BundleContext bundleContext) throws 
InterruptedException {
// final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
not work!
final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
ServiceRegistration serviceReg = 
bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
}
{code}
where:
{code:java}
  private final class ConfigUpdater implements ManagedService {
  @Override
  public void updated(final Dictionary config) throws 
ConfigurationException {
if (config == null) {
  System.out.println("The config is null!");
  return;
}
  }
  }
{code}
and two files in $KARAF_HOME/etc:
 * foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
 * foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg

the first pid gives null as a config, while the second works

  was:
I have a bundle with this code in activator:

 
{code:java}
  @Override
  public final void start(final BundleContext bundleContext) throws 
InterruptedException {
final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
//final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
not work!
ServiceRegistration serviceReg = 
bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
}
{code}
where:
{code:java}
  private final class ConfigUpdater implements ManagedService {
  @Override
  public void updated(final Dictionary config) throws 
ConfigurationException {
if (config == null) {
  System.out.println("The config is null!");
  return;
}
  }
  }
{code}
and two files in $KARAF_HOME/etc:
* foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
* foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg

the first pid gives null as a config, while the second works


> Karaf does not pass configs with dashes to ManagedService
> -
>
> Key: KARAF-6380
> URL: https://issues.apache.org/jira/browse/KARAF-6380
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.2.6
>Reporter: Kamil
>Priority: Major
>
> I have a bundle with this code in activator:
>  
> {code:java}
>   @Override
>   public final void start(final BundleContext bundleContext) throws 
> InterruptedException {
> // final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
> not work!
> final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
> ServiceRegistration serviceReg = 
> bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
> Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
> }
> {code}
> where:
> {code:java}
>   private final class ConfigUpdater implements ManagedService {
>   @Override
>   public void updated(final Dictionary config) throws 
> ConfigurationException {
> if (config == null) {
>   System.out.println("The config is null!");
>   return;
> }
>   }
>   }
> {code}
> and two files in $KARAF_HOME/etc:
>  * foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
>  * foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg
> the first pid gives null as a config, while the second works



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Updated] (KARAF-6380) Karaf does not pass configs with dashes to ManagedService

2019-08-14 Thread Kamil (JIRA)


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

Kamil updated KARAF-6380:
-
Summary: Karaf does not pass configs with dashes to ManagedService  (was: 
Karaf does not pass cofigs with dashes to ManagedService)

> Karaf does not pass configs with dashes to ManagedService
> -
>
> Key: KARAF-6380
> URL: https://issues.apache.org/jira/browse/KARAF-6380
> Project: Karaf
>  Issue Type: Bug
>  Components: karaf
>Affects Versions: 4.2.6
>Reporter: Kamil
>Priority: Major
>
> I have a bundle with this code in activator:
>  
> {code:java}
>   @Override
>   public final void start(final BundleContext bundleContext) throws 
> InterruptedException {
> final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
> //final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; 
> //does not work!
> ServiceRegistration serviceReg = 
> bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
> Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
> }
> {code}
> where:
> {code:java}
>   private final class ConfigUpdater implements ManagedService {
>   @Override
>   public void updated(final Dictionary config) throws 
> ConfigurationException {
> if (config == null) {
>   System.out.println("The config is null!");
>   return;
> }
>   }
>   }
> {code}
> and two files in $KARAF_HOME/etc:
> * foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
> * foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg
> the first pid gives null as a config, while the second works



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (KARAF-6380) Karaf does not pass cofigs with dashes to ManagedService

2019-08-14 Thread Kamil (JIRA)
Kamil created KARAF-6380:


 Summary: Karaf does not pass cofigs with dashes to ManagedService
 Key: KARAF-6380
 URL: https://issues.apache.org/jira/browse/KARAF-6380
 Project: Karaf
  Issue Type: Bug
  Components: karaf
Affects Versions: 4.2.6
Reporter: Kamil


I have a bundle with this code in activator:

 
{code:java}
  @Override
  public final void start(final BundleContext bundleContext) throws 
InterruptedException {
final String pid = "foo.bar.e35a73c8f720465283bb2b9ed79ea51e";
//final String pid = "foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e"; //does 
not work!
ServiceRegistration serviceReg = 
bundleContext.registerService(ManagedService.class, new ConfigUpdater(), new 
Hashtable<>(singletonMap(Constants.SERVICE_PID, pid)));
}
{code}
where:
{code:java}
  private final class ConfigUpdater implements ManagedService {
  @Override
  public void updated(final Dictionary config) throws 
ConfigurationException {
if (config == null) {
  System.out.println("The config is null!");
  return;
}
  }
  }
{code}
and two files in $KARAF_HOME/etc:
* foo.bar.e35a73c8-f720-4652-83bb-2b9ed79ea51e.cfg
* foo.bar.e35a73c8f720465283bb2b9ed79ea51e.cfg

the first pid gives null as a config, while the second works



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (KARAF-6379) Update to CXF 3.1.18 and Common-IO 2.6

2019-08-14 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KARAF-6379:
---

fpapon commented on pull request #24: [KARAF-6379] Updating CXF + Commons IO
URL: https://github.com/apache/karaf-cave/pull/24
 
 
   
 

This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Update to CXF 3.1.18 and Common-IO 2.6
> --
>
> Key: KARAF-6379
> URL: https://issues.apache.org/jira/browse/KARAF-6379
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: cave
>Reporter: Francois Papon
>Priority: Major
> Fix For: cave-4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Commented] (KARAF-6379) Update to CXF 3.1.18 and Common-IO 2.6

2019-08-14 Thread ASF subversion and git services (JIRA)


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

ASF subversion and git services commented on KARAF-6379:


Commit f992c039d698a5a9866285011338ac6d3fefadd6 in karaf-cave's branch 
refs/heads/master from Francois Papon
[ https://gitbox.apache.org/repos/asf?p=karaf-cave.git;h=f992c03 ]

Merge pull request #24 from coheigea/cxf

[KARAF-6379] Updating CXF + Commons IO

> Update to CXF 3.1.18 and Common-IO 2.6
> --
>
> Key: KARAF-6379
> URL: https://issues.apache.org/jira/browse/KARAF-6379
> Project: Karaf
>  Issue Type: Dependency upgrade
>  Components: cave
>Reporter: Francois Papon
>Priority: Major
> Fix For: cave-4.2.0
>
>




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)


[jira] [Created] (KARAF-6379) Update to CXF 3.1.18 and Common-IO 2.6

2019-08-14 Thread Francois Papon (JIRA)
Francois Papon created KARAF-6379:
-

 Summary: Update to CXF 3.1.18 and Common-IO 2.6
 Key: KARAF-6379
 URL: https://issues.apache.org/jira/browse/KARAF-6379
 Project: Karaf
  Issue Type: Dependency upgrade
  Components: cave
Reporter: Francois Papon
 Fix For: cave-4.2.0






--
This message was sent by Atlassian JIRA
(v7.6.14#76016)