[jira] [Updated] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-16 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert updated FELIX-6384:
--
Fix Version/s: configadmin-interpolation-plugin-1.1.2

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.1.2
>
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-16 Thread A. J. David Bosschaert (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6384?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285210#comment-17285210
 ] 

A. J. David Bosschaert commented on FELIX-6384:
---

Merged with many thanks [~kwin]!

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (FELIX-6384) Felix Configadmin Interpolator: Support default directive with empty value

2021-02-16 Thread A. J. David Bosschaert (Jira)


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

A. J. David Bosschaert resolved FELIX-6384.
---
Resolution: Fixed

> Felix Configadmin Interpolator: Support default directive with empty value
> --
>
> Key: FELIX-6384
> URL: https://issues.apache.org/jira/browse/FELIX-6384
> Project: Felix
>  Issue Type: Improvement
>  Components: Configuration Admin
>Affects Versions: configadmin-interpolation-plugin-1.1.0
>Reporter: Konrad Windszus
>Priority: Major
> Fix For: configadmin-interpolation-plugin-1.1.2
>
>
> Currently in 
> https://github.com/apache/felix-dev/tree/master/configadmin-plugins/interpolation#default-values
>  it is not stated that an empty value is not supported as default value. 
> Still the following code is not replaced as expected
> {code}
> $[env:NON_EXISTING_VAR;default=]
> {code}
> This is due to the parsing logic in 
> https://github.com/apache/felix-dev/blob/0aa232a4ff8f95e92d947027ac7d8010e2a0e142/configadmin-plugins/interpolation/src/main/java/org/apache/felix/configadmin/plugin/interpolation/Interpolator.java#L118
>  which detects the directive (in this case {{default}}) only in case there is 
> at least one character after the {{=}}.
> This limitation should be lifted to also allow empty values as default 
> values. At the same time values containing the character {{=}} should be 
> allowed as well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [felix-dev] bosschaert merged pull request #69: FELIX-6384 support empty directive values

2021-02-16 Thread GitBox


bosschaert merged pull request #69:
URL: https://github.com/apache/felix-dev/pull/69


   



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




[GitHub] [felix-dev] kwin commented on pull request #69: FELIX-6384 support empty directive values

2021-02-16 Thread GitBox


kwin commented on pull request #69:
URL: https://github.com/apache/felix-dev/pull/69#issuecomment-779852557


   @bosschaert Can you merge and spin a new release?



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




[jira] [Commented] (FELIX-6387) SAX XML parser does not work properly

2021-02-16 Thread Tom Watson (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285205#comment-17285205
 ] 

Tom Watson commented on FELIX-6387:
---

Without any steps to reproduce it is going to be very hard to diagnose why SCR 
XML processing is causing hibernate to have its own XML parsing issues:

org.hibernate.HibernateException: Could not parse configuration: 
nexus_uk_core-hibernate.cfg.xml at 
org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2246)

This message and exception does not exist in Felix SCR.  I suspect the 
{{nexus_uk_core-hibernate.cfg.xml}} is unrelated to declarative services XML 
parsing.

> SAX XML parser does not work properly 
> --
>
> Key: FELIX-6387
> URL: https://issues.apache.org/jira/browse/FELIX-6387
> Project: Felix
>  Issue Type: Bug
>  Components: Declarative Services (SCR)
>Reporter: Ankita Agarwal
>Priority: Critical
>
> Felix Scr has updated from kxml2 to standard SAX XML parser. After updating 
> to the org.apache.felix.scr/2.1.20, below errors are filled in the logs:
> 10.02.2021 00:24:13.479 *ERROR* [FelixStartLevel] 
> com.az.nexus.hibernate.service.impl.SessionFactoryServiceImpl Error 
> registering Hibernate SessionFactorybl-bundle (nexus_uk_core)10.02.2021 
> 00:24:13.479 *ERROR* [FelixStartLevel] 
> com.az.nexus.hibernate.service.impl.SessionFactoryServiceImpl Error 
> registering Hibernate SessionFactorybl-bundle 
> (nexus_uk_core)org.hibernate.HibernateException: Could not parse 
> configuration: nexus_uk_core-hibernate.cfg.xml at 
> org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2246) at 
> org.hibernate.cfg.Configuration.configure(Configuration.java:2158) at 
> com.az.nexus.hibernate.factory.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:65)
>  at 
> com.az.nexus.hibernate.service.impl.SessionFactoryServiceImpl.registerSessionFactory(SessionFactoryServiceImpl.java:207)
>  at com.az.nexus.bl.Activator.start(Activator.java:149) at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498) at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:242)
>  at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
>  at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:678)
>  at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:524)
>  at 
> org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:318)
>  at 
> org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:308)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:342)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:984)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:957)
>  at 
> org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:766)
>  at 
> org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091)
>  at 
> org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
>  at 
> org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
>  at 
> org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
>  at 
> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
>  at 
> org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
>  at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833) at 
> org.apache.felix.framework.Felix.registerService(Felix.java:3804) at 
> 

[jira] [Commented] (FELIX-6387) SAX XML parser does not work properly

2021-02-16 Thread Julian Reschke (Jira)


[ 
https://issues.apache.org/jira/browse/FELIX-6387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17285108#comment-17285108
 ] 

Julian Reschke commented on FELIX-6387:
---

A wild guess would be that there's an ancient XML parser in the classpath which 
shouldn't be there.

> SAX XML parser does not work properly 
> --
>
> Key: FELIX-6387
> URL: https://issues.apache.org/jira/browse/FELIX-6387
> Project: Felix
>  Issue Type: Bug
>  Components: Declarative Services (SCR)
>Reporter: Ankita Agarwal
>Priority: Critical
>
> Felix Scr has updated from kxml2 to standard SAX XML parser. After updating 
> to the org.apache.felix.scr/2.1.20, below errors are filled in the logs:
> 10.02.2021 00:24:13.479 *ERROR* [FelixStartLevel] 
> com.az.nexus.hibernate.service.impl.SessionFactoryServiceImpl Error 
> registering Hibernate SessionFactorybl-bundle (nexus_uk_core)10.02.2021 
> 00:24:13.479 *ERROR* [FelixStartLevel] 
> com.az.nexus.hibernate.service.impl.SessionFactoryServiceImpl Error 
> registering Hibernate SessionFactorybl-bundle 
> (nexus_uk_core)org.hibernate.HibernateException: Could not parse 
> configuration: nexus_uk_core-hibernate.cfg.xml at 
> org.hibernate.cfg.Configuration.doConfigure(Configuration.java:2246) at 
> org.hibernate.cfg.Configuration.configure(Configuration.java:2158) at 
> com.az.nexus.hibernate.factory.HibernateSessionFactory.createSessionFactory(HibernateSessionFactory.java:65)
>  at 
> com.az.nexus.hibernate.service.impl.SessionFactoryServiceImpl.registerSessionFactory(SessionFactoryServiceImpl.java:207)
>  at com.az.nexus.bl.Activator.start(Activator.java:149) at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>  at java.lang.reflect.Method.invoke(Method.java:498) at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:242)
>  at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41)
>  at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:678)
>  at 
> org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:524)
>  at 
> org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:318)
>  at 
> org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:308)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:342)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:115)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:984)
>  at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:957)
>  at 
> org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:766)
>  at 
> org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1091)
>  at 
> org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1043)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880)
>  at 
> org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168)
>  at 
> org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125)
>  at 
> org.apache.felix.framework.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:990)
>  at 
> org.apache.felix.framework.EventDispatcher.fireEventImmediately(EventDispatcher.java:838)
>  at 
> org.apache.felix.framework.EventDispatcher.fireServiceEvent(EventDispatcher.java:545)
>  at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4833) at 
> org.apache.felix.framework.Felix.registerService(Felix.java:3804) at 
> org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:328)
>  at 
> org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:907)
>  at 
> org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:893)
>  at 
>