Uploaded image for project: 'Tamaya'
  1. Tamaya
  2. TAMAYA-305

InstantiationException on EnumConverter when adding default converters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.3-incubating
    • 0.4-incubating
    • Core
    • None
    • Ubuntu 14.04
      Java 8
      Karaf 4.1.1

    Description

      When I try to add the default property converters to the ConfigurationContextBuilder like

      ConfigurationContextBuilder builder = ConfigurationProvider.getConfigurationContextBuilder();
      builder.addDefaultPropertyConverters();

      I get the following error

      2017-09-21T09:43:42,196 | ERROR | FelixDispatchQueue | core | 367 - org.apache.tamaya.core - 0.4.0.incubating-201709190608 | FrameworkEvent ERROR - org.apache.tamaya.core
      org.osgi.framework.ServiceException: Service factory returned null. (Component: org.apache.tamaya.core.internal.converters.EnumConverter (16))
      at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:380) [?:?]
      at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247) [?:?]
      at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:350) [?:?]
      at org.apache.felix.framework.Felix.getService(Felix.java:3720) [?:?]
      at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470) [?:?]
      at org.apache.tamaya.core.internal.OSGIServiceContext.getServices(OSGIServiceContext.java:97) [367:org.apache.tamaya.core:0.4.0.incubating-201709190608]
      at org.apache.tamaya.core.internal.DefaultConfigurationContextBuilder.getDefaultPropertyConverters(DefaultConfigurationContextBuilder.java:398) [367:org.apache.tamaya.core:0.4.0.incubating-201709190608]
      at org.apache.tamaya.core.internal.DefaultConfigurationContextBuilder.addDefaultPropertyConverters(DefaultConfigurationContextBuilder.java:171) [367:org.apache.tamaya.core:0.4.0.incubating-201709190608]
      at org.apache.tamaya.core.internal.DefaultConfigurationContextBuilder.addDefaultPropertyConverters(DefaultConfigurationContextBuilder.java:51) [367:org.apache.tamaya.core:0.4.0.incubating-201709190608]

      Checking the EnumConverter this makes sense because of missing default constructor but I can't see how it has been added because it is not a part of the core converters.

      Attachments

        Activity

          People

            anatole Anatole Tresch
            cniehues Christian Niehues
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: