[
https://issues.apache.org/jira/browse/LOG4J2-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Frank Prumbaum updated LOG4J2-3081:
-----------------------------------
Attachment: image-2021-04-22-13-18-19-877.png
> No factory method found for class
> org.apache.logging.log4j.layout.template.json.JsonTemplateLayout
> --------------------------------------------------------------------------------------------------
>
> Key: LOG4J2-3081
> URL: https://issues.apache.org/jira/browse/LOG4J2-3081
> Project: Log4j 2
> Issue Type: Bug
> Components: JsonTemplateLayout
> Affects Versions: 2.14.1
> Reporter: Frank Prumbaum
> Assignee: Volkan Yazici
> Priority: Major
> Attachments: image-2021-04-22-13-18-19-877.png
>
>
> We are using log4j2 in an uber-jar, so plugin initialization via
> *Log4j2Plugins.dat* is not possible.
> Using a programmatic Approach with
> {color:#000000}PluginManager{color}.addPackage({color:#067d17}"org.apache.logging.log4j.layout.template.json"{color});
> we are getting the error
> java.lang.IllegalStateException: No factory method found for class
> org.apache.logging.log4j.layout.template.json.JsonTemplateLayout
> at
> org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.findFactoryMethod(PluginBuilder.java:234)
> at
> org.apache.logging.log4j.core.config.plugins.util.PluginBuilder.build(PluginBuilder.java:134)
> Logging at the source code, a Method with @PluginFactory-annotation is
> missing.
> {color:#9e880d}@PluginFactory
> {color}{color:#0033b3}public static JsonTemplateLayout{color}
> {color:#00627a}createLayout(…){color}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)