aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joseph Chacko (Jira)" <>
Subject [jira] [Created] (ARIES-2000) OsgiURLContextFactory.getObjectInstance() throws InvalidNameException but should just return null
Date Tue, 08 Sep 2020 16:15:00 GMT
Joseph Chacko created ARIES-2000:

             Summary: OsgiURLContextFactory.getObjectInstance() throws InvalidNameException
but should just return null
                 Key: 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

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(}}
{{ 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/ Source)}}
{{ 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