[
https://issues.apache.org/jira/browse/LOG4J2-3081?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17327864#comment-17327864
]
Frank Prumbaum commented on LOG4J2-3081:
----------------------------------------
(i) Hi Volkan, thanks for your hint, I didn't know such a transformer existed.
I have tried it and it worked. :) Thanks a lot solving my issue
*Btw*: After including the transformer and the threreby the assembled
Log4jPlugins.dat my own Plugins where not detected anymore. I included them
before calling Configurator.reconfigure(..) with:
{color:#8c8c8c}//Package enthält eigene Plugins
{color}{color:#000000}PluginManager{color}.addPackage({color:#067d17}"de.axa.mad.core.config.log4j2"{color});
(/) I solved it by removing the above statement and adding the package to
*log4j2.xml* instead:
!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)