aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sam Bratton (Jira)" <>
Subject [jira] [Commented] (ARIES-2000) OSGiObjectFactoryBuilder.getObjectInstance() incorrectly propagates exceptions from ObjectFactory.getObjectInstance()
Date Mon, 21 Sep 2020 18:27:00 GMT


Sam Bratton commented on ARIES-2000:

[~jbonofre] Do you plan action on this soon? It was opened by a team member of mine. I'd
like to take ownership. Please let me know if that's an issue. I noticed that this report
was incorrectly opened against proxy and I wonder if you took ownership because you were working
on proxy release?

> OSGiObjectFactoryBuilder.getObjectInstance() incorrectly propagates exceptions from ObjectFactory.getObjectInstance()
> ---------------------------------------------------------------------------------------------------------------------
>                 Key: ARIES-2000
>                 URL:
>             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(
>    at org.apache.aries.jndi.url.ServiceRegistryContext.parse(
>    at org.apache.aries.jndi.url.ServiceRegistryContext.lookup(
>    at org.apache.aries.jndi.url.OsgiURLContextFactory.findAny(
>    at org.apache.aries.jndi.url.OsgiURLContextFactory.getObjectInstance(
>    at org.apache.aries.jndi.ObjectFactoryHelper.getObjectFromFactory(
>    at org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstanceUsingObjectFactories(
>    at org.apache.aries.jndi.ObjectFactoryHelper.doGetObjectInstance(
>    at org.apache.aries.jndi.ObjectFactoryHelper.lambda$getObjectInstance$0(
>    at org.apache.aries.jndi.ObjectFactoryHelper$$Lambda$19/
>    at org.apache.aries.jndi.Utils.doPrivilegedE(
>    at org.apache.aries.jndi.ObjectFactoryHelper.getObjectInstance(
>    at org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(
>    at org.apache.aries.jndi.OSGiObjectFactoryBuilder.getObjectInstance(
>    at javax.naming.spi.NamingManager.getObjectInstance(
>    at
>    at
>    at
>    at org.apache.aries.jndi.DelegateContext.lookup(
>    at javax.naming.InitialContext.lookup(

This message was sent by Atlassian Jira

View raw message