Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Converter classes after logback-access upgrade #908

Open
spellsleeper opened this issue Jan 14, 2025 · 3 comments
Open

No Converter classes after logback-access upgrade #908

spellsleeper opened this issue Jan 14, 2025 · 3 comments

Comments

@spellsleeper
Copy link

I tried to upgrade

implementation "net.logstash.logback:logstash-logback-encoder:7.4"
implementation 'ch.qos.logback:logback-access:1.5.12'

to(artifacts were moved)

implementation "net.logstash.logback:logstash-logback-encoder:8.0"
implementation 'ch.qos.logback.access:logback-access-tomcat:2.0.6'
implementation 'ch.qos.logback.access:logback-access-common:2.0.6'

After the upgrade i have a problem with converter classes which looks like:

INFO in ch.qos.logback.core.model.processor.ImplicitModelHandler - Assuming default type [ch.qos.logback.access.common.PatternLayoutEncoder] for [encoder] property
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [h]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [h] is not a valid conversion word
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [l]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [l] is not a valid conversion word
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [u]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [u] is not a valid conversion word
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [t]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [t] is not a valid conversion word
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [r]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [r] is not a valid conversion word
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [s]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [s] is not a valid conversion word
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - There is no conversion class registered for conversion word [b]
10:51:05,922 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@12323a9d - [b] is not a valid conversion word

and

ERROR in ch.qos.logback.core.pattern.parser.Compiler@7cca6100 - There is no conversion class registered for conversion word [clientHost]
10:51:05,958 |-ERROR in ch.qos.logback.core.pattern.parser.Compiler@7cca6100 - [clientHost] is not a valid conversion word
10:51:05,958 |-ERROR in net.logstash.logback.composite.accessevent.AccessEventPatternJsonProvider@6f10be7d - Invalid [pattern]: Invalid JSON property '//client-host' (was '%clientHost'): Failed to interpret '%clientHost' conversion word. See previous error statuses for more information. net.logstash.logback.pattern.AbstractJsonPatternParser$JsonPatternException: Invalid JSON property '//client-host' (was '%clientHost'): Failed to interpret '%clientHost' conversion word. See previous error statuses for more information.
at net.logstash.logback.pattern.AbstractJsonPatternParser$JsonPatternException: Invalid JSON property '//client-host' (was '%clientHost'): Failed to interpret '%clientHost'

Before the upgrade in ch.qos.logback.core.pattern.parser.Compiler 69 converter classes were loaded. After the upgrade 0. The old conversion classes don't exist any more. It seems they've got a new package - ch.qos.logback.access.pattern vs. ch.qos.logback.access.common.pattern. But in this package are not all necessary converter classes(only 31)

Is there a known way how to get the necessary converter classes with the upgraded dependencies? Is there a necessary additional dependency?

logback converter classes before

logback converter classes now

logback-access

@spellsleeper
Copy link
Author

A colleague of me fixed the problem. The logback default for logback-core was 1.5.12.
ext['logback.version'] = '1.5.16'
fixed the problem. Was the same problem like in #885

@spellsleeper
Copy link
Author

spellsleeper commented Jan 16, 2025

However, it would of course be nice if it worked without this workaround. It's the wrong default version in Spring Boot

@spellsleeper spellsleeper reopened this Jan 16, 2025
@arogulin
Copy link

@spellsleeper Spring Boot team released 3.4.2 just 4 hours ago where they bumped logback.version from 1.5.12 to 1.5.16, so the version override won't be needed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants