[
https://issues.apache.org/jira/browse/ISIS-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17224505#comment-17224505
]
ASF subversion and git services commented on ISIS-2458:
-------------------------------------------------------
Commit cdd3c4e60a23d37eaf57e34283071369c2b06efb in isis's branch
refs/heads/ISIS-2458-force-log4j2-for-demo-web from danhaywood
[ https://gitbox.apache.org/repos/asf?p=isis.git;h=cdd3c4e ]
ISIS-2458: forces spring boot logging to use log4j2
> Deploying demo-wicket app to k8s causes a logging issue, won't start
> --------------------------------------------------------------------
>
> Key: ISIS-2458
> URL: https://issues.apache.org/jira/browse/ISIS-2458
> Project: Isis
> Issue Type: Bug
> Affects Versions: 2.0.0-M4
> Environment: k3d on ubunti 20.04
> Reporter: Daniel Keir Haywood
> Assignee: Daniel Keir Haywood
> Priority: Major
> Fix For: 2.0.0-M5
>
>
> Kinda odd, because I don't see the issue when using Docker on my PC. But
> fails on a k8s deployment (k3d). I guess it might be the order in which the
> JARs are discovered at runtime.
> {code:java}
> SLF4J: Class path contains multiple SLF4J bindings.02/11/2020 08:26:59 SLF4J:
> Found binding in
> [jar:file:/app/libs/log4j-slf4j-impl-2.13.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]02/11/2020
> 08:26:59 SLF4J: Found binding in
> [jar:file:/app/libs/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]02/11/2020
> 08:26:59 SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an
> explanation.02/11/2020 08:26:59 SLF4J: Actual binding is of type
> [org.apache.logging.slf4j.Log4jLoggerFactory]02/11/2020 08:26:59 Exception in
> thread "main" java.lang.ExceptionInInitializerError02/11/2020 08:26:59
> at demoapp.webapp.wicket.DemoAppWicket.main(DemoAppWicket.java:75)02/11/2020
> 08:26:59 Caused by: org.apache.logging.log4j.LoggingException:
> log4j-slf4j-impl cannot be present with log4j-to-slf4j02/11/2020 08:26:59
> at
> org.apache.logging.slf4j.Log4jLoggerFactory.validateContext(Log4jLoggerFactory.java:49)02/11/2020
> 08:26:59 at
> org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:39)02/11/2020
> 08:26:59 at
> org.apache.logging.slf4j.Log4jLoggerFactory.newLogger(Log4jLoggerFactory.java:30)02/11/2020
> 08:26:59 at
> org.apache.logging.log4j.spi.AbstractLoggerAdapter.getLogger(AbstractLoggerAdapter.java:54)02/11/2020
> 08:26:59 at
> org.apache.logging.slf4j.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:30)02/11/2020
> 08:26:59 at
> org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:363)02/11/2020 08:26:59
> at
> org.apache.commons.logging.LogAdapter$Slf4jAdapter.createLocationAwareLog(LogAdapter.java:130)02/11/2020
> 08:26:59 at
> org.apache.commons.logging.LogAdapter.createLog(LogAdapter.java:91)02/11/2020
> 08:26:59 at
> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:67)02/11/2020
> 08:26:59 at
> org.apache.commons.logging.LogFactory.getLog(LogFactory.java:59)02/11/2020
> 08:26:59 at
> org.springframework.boot.SpringApplication.<clinit>(SpringApplication.java:196)02/11/2020
> 08:26:59 ... 1 more
> {code}
>
> The fix would seem to be: https://stackoverflow.com/a/61873064/56880
--
This message was sent by Atlassian Jira
(v8.3.4#803005)