Spring Boot application does not start with logback EvaluatorFilter and Janino library inside application lib folder

1.4k Views Asked by At

I have a spring-boot based application deployed in tomcat. It uses logback-classic for logging. logback.xml is kept externally inside $TOMCAT_HOME/conf folder and logback.xml is referred using logging.config from a config properties file which is also at the same location.

Recently we added the following filter to filter out some logs

<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
     <evaluator>
           <expression>return message.contains("SOMESTRING")</expression>
      </evaluator>
            <OnMismatch>NEUTRAL</OnMismatch>
            <onMatch>DENY</onMatch>
        </filter>

The above filter requires below library

<dependency>
<groupId>org.codehaus.janino</groupId>
        <artifactId>janino</artifactId>
        <version>3.1.0</version>
    </dependency>

When we build and deploy the application janino library is downloaded inside application lib folder, we checked it exists. But when we are starting the application though tomcat start successfully the application does not deploy. No log shows up also if we try to access the application using browser it says 504 bad gateway. We need a solution for this please help us out.

We copied the Janino library inside tomcat lib folder and it works. But we don't want to do that. Also logback-classic and logback-core jars are present inside application lib folder, inside tomcat webapps.

We except application should start with a started message in the logs. But we don't see that, also application does not respond when invoked.

0

There are 0 best solutions below