bertramdev / asset-pipeline

The core implementation of the asset pipeline for the jvm
192 stars 90 forks source link

Asset Pipeline requires log4j? #315

Open olavgg opened 1 year ago

olavgg commented 1 year ago

When I try to run a Spring Boot project with Asset Pipeline I get the following error

java.lang.IllegalStateException: Unable to load cache item
    ....
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
    at asset.pipeline.springboot.AssetPipelineService.<clinit>(AssetPipelineService.groovy)

It seems like log4j is required, but my project is configured with logback. If I add Log4j 1.x dependency it works fine,

mkobel commented 1 year ago

I usually add log4j-over-slf4j as dependency to resolve this issue:

e.g. implementation 'org.slf4j:log4j-over-slf4j:2.0.4'