You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@logging.apache.org by Volkan Yazıcı <vo...@gmail.com> on 2021/01/24 21:28:08 UTC

UnknownFormatConversionException for JTL RecyclerFactory

Even though RecyclerFactory of JsonTemplateLayout (JTL) has a public
TypeConverter definition – i.e., RecyclerFactories.RecyclerFactoryConverter
– trying to load a simple configuration containing JTL in JTL tests
(executed either via mvnw or IDE) yields the following error:

ERROR Could not create plugin of type class
org.apache.logging.log4j.layout.template.json.JsonTemplateLayout for
element JsonTemplateLayout: java.util.UnknownFormatConversionException
: Conversion = 'interface
org.apache.logging.log4j.layout.template.json.util.RecyclerFactory'
java.util.UnknownFormatConversionException: Conversion = 'interface
org.apache.logging.log4j.layout.template.json.util.RecyclerFactory'
        at
org.apache.logging.log4j.core.config.plugins.convert.TypeConverterRegistry.findCompatibleConverter(TypeConverterRegistry.java:103)
        at
org.apache.logging.log4j.core.config.plugins.convert.TypeConverters.convert(TypeConverters.java:412)
        at
org.apache.logging.log4j.core.config.plugins.visitors.AbstractPluginVisitor.convert(AbstractPluginVisitor.java:151)
        at
org.apache.logging.log4j.core.config.plugins.visitors.PluginBuilderAttributeVisitor.visit(PluginBuilderAttributeVisitor.java:50)
        at
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:185)
        at
org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
        at
org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1002)
...


Any ideas? Why can't it find the defined TypeConverter?

Re: UnknownFormatConversionException for JTL RecyclerFactory

Posted by Matt Sicker <bo...@gmail.com>.
Via the IDE, it's likely because you don't have annotation processing
enabled. If it's also not working via Maven, then you're probably
missing an annotation.

On Sun, 24 Jan 2021 at 15:28, Volkan Yazıcı <vo...@gmail.com> wrote:
>
> Even though RecyclerFactory of JsonTemplateLayout (JTL) has a public
> TypeConverter definition – i.e., RecyclerFactories.RecyclerFactoryConverter
> – trying to load a simple configuration containing JTL in JTL tests
> (executed either via mvnw or IDE) yields the following error:
>
> ERROR Could not create plugin of type class
> org.apache.logging.log4j.layout.template.json.JsonTemplateLayout for
> element JsonTemplateLayout: java.util.UnknownFormatConversionException
> : Conversion = 'interface
> org.apache.logging.log4j.layout.template.json.util.RecyclerFactory'
> java.util.UnknownFormatConversionException: Conversion = 'interface
> org.apache.logging.log4j.layout.template.json.util.RecyclerFactory'
>         at
> org.apache.logging.log4j.core.config.plugins.convert.TypeConverterRegistry.findCompatibleConverter(TypeConverterRegistry.java:103)
>         at
> org.apache.logging.log4j.core.config.plugins.convert.TypeConverters.convert(TypeConverters.java:412)
>         at
> org.apache.logging.log4j.core.config.plugins.visitors.AbstractPluginVisitor.convert(AbstractPluginVisitor.java:151)
>         at
> org.apache.logging.log4j.core.config.plugins.visitors.PluginBuilderAttributeVisitor.visit(PluginBuilderAttributeVisitor.java:50)
>         at
> org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.injectFields(PluginBuilder.java:185)
>         at
> org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:121)
>         at
> org.apache.logging.log4j.core.config.AbstractConfiguration.createPluginObject(AbstractConfiguration.java:1002)
> ...
>
>
> Any ideas? Why can't it find the defined TypeConverter?