[jira] [Updated] (ARIES-2000) OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to OSGiURLContextFactory to resolve non-url scheme string

2020-09-15 Thread Jira


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

Jean-Baptiste Onofré updated ARIES-2000:

Affects Version/s: (was: proxy-impl-1.1.8)

> OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to 
> OSGiURLContextFactory to resolve non-url scheme string
> --
>
> Key: ARIES-2000
> URL: https://issues.apache.org/jira/browse/ARIES-2000
> Project: Aries
>  Issue Type: Bug
>  Components: JNDI
> Environment: This was discovered when using Apache Aries in 
> OpenLiberty.
>Reporter: Joseph Chacko
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: jndi-core-1.1.0
>
>
> The {{OsgiURLContextFactory.getObjectInstance()}} method throws an 
> {{InvalidNameException}} if the value passed in is a String that does not 
> start with the {{"osgi:"}} or {{"aries:"}} protocol specifiers. 
> According to the OSGi JNDI Services specification (??OSGi Compendium Release 
> 7, section 126.5.5??), a {{URLContextFactory}} object should be looked up 
> from the service registry, filtering on the {{osgi.jndi.url.scheme}} property 
> to choose the right one for the protocol. The {{OsgiURLContextFactory}} is 
> behaving correctly but is being invoked inappropriately by the 
> {{OSGiObjectFactoryBuilder}}.
> {{javax.naming.InvalidNameException: First}}
>    at org.apache.aries.jndi.url.OsgiNameParser.parse(OsgiNameParser.java:46)
>    at 
> org.apache.aries.jndi.url.ServiceRegistryContext.parse(ServiceRegistryContext.java:134)
>    at 
> org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:138)
>    at 
> org.apache.aries.jndi.url.OsgiURLContextFactory.findAny(OsgiURLContextFactory.java:70)
>    at 
> org.apache.aries.jndi.url.OsgiURLContextFactory.getObjectInstance(OsgiURLContextFactory.java:49)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectFromFactory(ObjectFactoryHelper.java:260)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactories(ObjectFactoryHelper.java:123)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.doGetObjectInstance(ObjectFactoryHelper.java:99)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.lambda$getObjectInstance$0(ObjectFactoryHelper.java:62)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper$$Lambda$19/8EF85C30.call(Unknown
>  Source)
>    at org.apache.aries.jndi.Utils.doPrivilegedE(Utils.java:158)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(ObjectFactoryHelper.java:62)
>    at 
> org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:66)
>    at 
> org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:48)
>    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
>    at com.ibm.ws.jndi.internal.WSContext.resolveObject(WSContext.java:157)
>    at com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:309)
>    at com.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:61)
>    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:149)
>    at javax.naming.InitialContext.lookup(InitialContext.java:428)
>  



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


[jira] [Updated] (ARIES-2000) OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to OSGiURLContextFactory to resolve non-url scheme string

2020-09-15 Thread Jira


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

Jean-Baptiste Onofré updated ARIES-2000:

Fix Version/s: (was: proxy-impl-1.1.9)
   jndi-core-1.1.0

> OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to 
> OSGiURLContextFactory to resolve non-url scheme string
> --
>
> Key: ARIES-2000
> URL: https://issues.apache.org/jira/browse/ARIES-2000
> Project: Aries
>  Issue Type: Bug
>  Components: JNDI
>Affects Versions: proxy-impl-1.1.8
> Environment: This was discovered when using Apache Aries in 
> OpenLiberty.
>Reporter: Joseph Chacko
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: jndi-core-1.1.0
>
>
> The {{OsgiURLContextFactory.getObjectInstance()}} method throws an 
> {{InvalidNameException}} if the value passed in is a String that does not 
> start with the {{"osgi:"}} or {{"aries:"}} protocol specifiers. 
> According to the OSGi JNDI Services specification (??OSGi Compendium Release 
> 7, section 126.5.5??), a {{URLContextFactory}} object should be looked up 
> from the service registry, filtering on the {{osgi.jndi.url.scheme}} property 
> to choose the right one for the protocol. The {{OsgiURLContextFactory}} is 
> behaving correctly but is being invoked inappropriately by the 
> {{OSGiObjectFactoryBuilder}}.
> {{javax.naming.InvalidNameException: First}}
>    at org.apache.aries.jndi.url.OsgiNameParser.parse(OsgiNameParser.java:46)
>    at 
> org.apache.aries.jndi.url.ServiceRegistryContext.parse(ServiceRegistryContext.java:134)
>    at 
> org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:138)
>    at 
> org.apache.aries.jndi.url.OsgiURLContextFactory.findAny(OsgiURLContextFactory.java:70)
>    at 
> org.apache.aries.jndi.url.OsgiURLContextFactory.getObjectInstance(OsgiURLContextFactory.java:49)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectFromFactory(ObjectFactoryHelper.java:260)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactories(ObjectFactoryHelper.java:123)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.doGetObjectInstance(ObjectFactoryHelper.java:99)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.lambda$getObjectInstance$0(ObjectFactoryHelper.java:62)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper$$Lambda$19/8EF85C30.call(Unknown
>  Source)
>    at org.apache.aries.jndi.Utils.doPrivilegedE(Utils.java:158)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(ObjectFactoryHelper.java:62)
>    at 
> org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:66)
>    at 
> org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:48)
>    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
>    at com.ibm.ws.jndi.internal.WSContext.resolveObject(WSContext.java:157)
>    at com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:309)
>    at com.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:61)
>    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:149)
>    at javax.naming.InitialContext.lookup(InitialContext.java:428)
>  



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


[jira] [Updated] (ARIES-2000) OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to OSGiURLContextFactory to resolve non-url scheme string

2020-09-15 Thread Jira


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

Jean-Baptiste Onofré updated ARIES-2000:

Fix Version/s: proxy-impl-1.1.9

> OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to 
> OSGiURLContextFactory to resolve non-url scheme string
> --
>
> Key: ARIES-2000
> URL: https://issues.apache.org/jira/browse/ARIES-2000
> Project: Aries
>  Issue Type: Bug
>  Components: JNDI
>Affects Versions: proxy-impl-1.1.8
> Environment: This was discovered when using Apache Aries in 
> OpenLiberty.
>Reporter: Joseph Chacko
>Assignee: Jean-Baptiste Onofré
>Priority: Major
> Fix For: proxy-impl-1.1.9
>
>
> The {{OsgiURLContextFactory.getObjectInstance()}} method throws an 
> {{InvalidNameException}} if the value passed in is a String that does not 
> start with the {{"osgi:"}} or {{"aries:"}} protocol specifiers. 
> According to the OSGi JNDI Services specification (??OSGi Compendium Release 
> 7, section 126.5.5??), a {{URLContextFactory}} object should be looked up 
> from the service registry, filtering on the {{osgi.jndi.url.scheme}} property 
> to choose the right one for the protocol. The {{OsgiURLContextFactory}} is 
> behaving correctly but is being invoked inappropriately by the 
> {{OSGiObjectFactoryBuilder}}.
> {{javax.naming.InvalidNameException: First}}
>    at org.apache.aries.jndi.url.OsgiNameParser.parse(OsgiNameParser.java:46)
>    at 
> org.apache.aries.jndi.url.ServiceRegistryContext.parse(ServiceRegistryContext.java:134)
>    at 
> org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:138)
>    at 
> org.apache.aries.jndi.url.OsgiURLContextFactory.findAny(OsgiURLContextFactory.java:70)
>    at 
> org.apache.aries.jndi.url.OsgiURLContextFactory.getObjectInstance(OsgiURLContextFactory.java:49)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectFromFactory(ObjectFactoryHelper.java:260)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactories(ObjectFactoryHelper.java:123)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.doGetObjectInstance(ObjectFactoryHelper.java:99)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.lambda$getObjectInstance$0(ObjectFactoryHelper.java:62)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper$$Lambda$19/8EF85C30.call(Unknown
>  Source)
>    at org.apache.aries.jndi.Utils.doPrivilegedE(Utils.java:158)
>    at 
> org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(ObjectFactoryHelper.java:62)
>    at 
> org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:66)
>    at 
> org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:48)
>    at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
>    at com.ibm.ws.jndi.internal.WSContext.resolveObject(WSContext.java:157)
>    at com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:309)
>    at com.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:61)
>    at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:149)
>    at javax.naming.InitialContext.lookup(InitialContext.java:428)
>  



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


[jira] [Updated] (ARIES-2000) OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to OSGiURLContextFactory to resolve non-url scheme string

2020-09-09 Thread Joseph Chacko (Jira)


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

Joseph Chacko updated ARIES-2000:
-
Description: 
The {{OsgiURLContextFactory.getObjectInstance()}} method throws an 
{{InvalidNameException}} if the value passed in is a String that does not start 
with the {{"osgi:"}} or {{"aries:"}} protocol specifiers. 

According to the OSGi JNDI Services specification (??OSGi Compendium Release 7, 
section 126.5.5??), a {{URLContextFactory}} object should be looked up from the 
service registry, filtering on the {{osgi.jndi.url.scheme}} property to choose 
the right one for the protocol. The {{OsgiURLContextFactory}} is behaving 
correctly but is being invoked inappropriately by the 
{{OSGiObjectFactoryBuilder}}.

{{javax.naming.InvalidNameException: First}}
   at org.apache.aries.jndi.url.OsgiNameParser.parse(OsgiNameParser.java:46)
   at 
org.apache.aries.jndi.url.ServiceRegistryContext.parse(ServiceRegistryContext.java:134)
   at 
org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:138)
   at 
org.apache.aries.jndi.url.OsgiURLContextFactory.findAny(OsgiURLContextFactory.java:70)
   at 
org.apache.aries.jndi.url.OsgiURLContextFactory.getObjectInstance(OsgiURLContextFactory.java:49)
   at 
org.apache.aries.jndi.ObjectFactoryHelper.getObjectFromFactory(ObjectFactoryHelper.java:260)
   at 
org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactories(ObjectFactoryHelper.java:123)
   at 
org.apache.aries.jndi.ObjectFactoryHelper.doGetObjectInstance(ObjectFactoryHelper.java:99)
   at 
org.apache.aries.jndi.ObjectFactoryHelper.lambda$getObjectInstance$0(ObjectFactoryHelper.java:62)
   at 
org.apache.aries.jndi.ObjectFactoryHelper$$Lambda$19/8EF85C30.call(Unknown
 Source)
   at org.apache.aries.jndi.Utils.doPrivilegedE(Utils.java:158)
   at 
org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(ObjectFactoryHelper.java:62)
   at 
org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:66)
   at 
org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:48)
   at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
   at com.ibm.ws.jndi.internal.WSContext.resolveObject(WSContext.java:157)
   at com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:309)
   at com.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:61)
   at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:149)
   at javax.naming.InitialContext.lookup(InitialContext.java:428)

 

  was:
The {{OsgiURLContextFactory.getObjectInstance()}} method throws an 
{{InvalidNameException}} if the value passed in is a String that does not start 
with the {{"osgi:"}} or {{"aries:"}} protocol specifiers. According to the API 
documentation, it should handle this condition and return null since as an OSGI 
service it can never be truly sure that some other {{ObjectFactory}} service 
will not be able to process the value.

{{javax.naming.InvalidNameException: First}}
  at org.apache.aries.jndi.url.OsgiNameParser.parse(OsgiNameParser.java:46)
  at 
org.apache.aries.jndi.url.ServiceRegistryContext.parse(ServiceRegistryContext.java:134)
  at 
org.apache.aries.jndi.url.ServiceRegistryContext.lookup(ServiceRegistryContext.java:138)
  at 
org.apache.aries.jndi.url.OsgiURLContextFactory.findAny(OsgiURLContextFactory.java:70)
  at 
org.apache.aries.jndi.url.OsgiURLContextFactory.getObjectInstance(OsgiURLContextFactory.java:49)
  at 
org.apache.aries.jndi.ObjectFactoryHelper.getObjectFromFactory(ObjectFactoryHelper.java:260)
  at 
org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactories(ObjectFactoryHelper.java:123)
  at 
org.apache.aries.jndi.ObjectFactoryHelper.doGetObjectInstance(ObjectFactoryHelper.java:99)
  at 
org.apache.aries.jndi.ObjectFactoryHelper.lambda$getObjectInstance$0(ObjectFactoryHelper.java:62)
  at 
org.apache.aries.jndi.ObjectFactoryHelper$$Lambda$19/8EF85C30.call(Unknown
 Source)
  at org.apache.aries.jndi.Utils.doPrivilegedE(Utils.java:158)
  at 
org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(ObjectFactoryHelper.java:62)
  at 
org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:66)
  at 
org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(OSGiObjectFactoryBuilder.java:48)
  at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:311)
  at com.ibm.ws.jndi.internal.WSContext.resolveObject(WSContext.java:157)
  at com.ibm.ws.jndi.internal.WSContext.lookup(WSContext.java:309)
  at com.ibm.ws.jndi.WSContextBase.lookup(WSContextBase.java:61)
  at org.apache.aries.jndi.DelegateContext.lookup(DelegateContext.java:149)
  at javax.naming.InitialContext.lookup(InitialContext.java:428)

 


> OSGiObjectFactoryBuilder.getObjectInstance incorrectly delegates to 
>