3

I migrated my spring boot app for spring-boot 2.5.6 to spring-boot 2.6.2, but since then the start up tells

java.lang.IllegalStateException: Could not initialize Logback logging from classpath:logback-spring.groovyCaused by: ch.qos.logback.core.LogbackException:

Caused by: ch.qos.logback.core.LogbackException:Unexpected filename extension of file [file:/xyz/out/production/resources/logback-spring.groovy]. Should be either .groovy or .xml

Can someone help if you have a solution? Thanks

Nidhin Dev
  • 499
  • 5
  • 9
  • I'm facing the same problem in a Grails 5.1.3 application (which uses 2.6.2 underneath). Have you found any solution? – brianjohnsen Mar 16 '22 at 13:24
  • we used 2.6.4, it worked – Nidhin Dev Mar 18 '22 at 13:55
  • In my case I add the org.codehaus.janino:janino dependency follow the link https://docs.spring.io/spring-native/docs/current-SNAPSHOT/reference/htmlsingle/#aot-build-setup-configuration It worked for me! – phancuongviet Mar 01 '23 at 12:34

1 Answers1

4

Logback 1.2.9 dropped the support for Groovy.

You can either migrate your logback.groovy to logback.xml or downgrade the logback version to 1.2.7 (logback.version=1.2.7) and see if they’ll come around and support Groovy again (which they might).

brianjohnsen
  • 145
  • 8