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

App can't start #542

Open
vahidshirvani opened this issue Jan 23, 2025 · 3 comments · Fixed by #537 or #543
Open

App can't start #542

vahidshirvani opened this issue Jan 23, 2025 · 3 comments · Fixed by #537 or #543
Assignees
Labels
type:bug A bug report or bug fix.
Milestone

Comments

@vahidshirvani
Copy link

Describe the bug

Our app on Spring-boot version 3.4.1 can't start with your latest dependency (version 4.4.0)

To Reproduce

This is the console output

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer.customizeMaxQueueCapacity(TomcatWebServerFactoryCustomizer.java:168)

The following method did not exist:

    'void org.apache.coyote.AbstractProtocol.setMaxQueueSize(int)'

The calling method's class, org.springframework.boot.autoconfigure.web.embedded.TomcatWebServerFactoryCustomizer, was loaded from the following location:

    jar:nested:/app.jar/!BOOT-INF/lib/spring-boot-autoconfigure-3.4.1.jar!/org/springframework/boot/autoconfigure/web/embedded/TomcatWebServerFactoryCustomizer.class

The called method's class, org.apache.coyote.AbstractProtocol, is available from the following locations:

    jar:nested:/app.jar/!BOOT-INF/lib/tomcat-coyote-10.0.27.jar!/org/apache/coyote/AbstractProtocol.class
    jar:nested:/app.jar/!BOOT-INF/lib/tomcat-embed-core-10.1.34.jar!/org/apache/coyote/AbstractProtocol.class

The called method's class hierarchy was loaded from the following locations:

    org.apache.coyote.AbstractProtocol: jar:nested:/app.jar/!BOOT-INF/lib/tomcat-coyote-10.0.27.jar!/

Expected behavior

It should not crash on startup

Environment

  • Version of this library used: 4.4.0
  • Version of Java used: 21
  • Version of Spring Boot used: 3.4.1
  • Web server used (Tomcat, Jetty, Undertow or Netty): Tomcat
  • Web application type used (Servlet Stack or Reactive Stack): Servlet

Solution

I did some research and found the root cause. The issue was in logback-access and it was resolved in version 2.0.5. Here is the discussion qos-ch/logback-access#17 (comment)

So basically you need to bump the version of the logback-access from 2.0.4 to at least 2.0.5 and release logback-access-spring-boot-starter version 4.4.1

Do you have any ETA for this patch? I have temporarily manually included logback-access 2.0.5 in my pom.xml in my project to be able to move further and not be stuck.

@vahidshirvani vahidshirvani added the type:bug A bug report or bug fix. label Jan 23, 2025
@sruffatti
Copy link

sruffatti commented Jan 23, 2025

I ran into this. I had to exclude a few dependencies from logback-access-spring-boot-starter

<dependency>
            <groupId>dev.akkinoc.spring.boot</groupId>
            <artifactId>logback-access-spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.tomcat</groupId>
                    <artifactId>tomcat-catalina</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.tomcat</groupId>
                    <artifactId>tomcat-coyote</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

@akkinoc akkinoc self-assigned this Jan 25, 2025
@akkinoc akkinoc added this to the v4 milestone Jan 25, 2025
@akkinoc akkinoc removed their assignment Jan 25, 2025
@akkinoc akkinoc self-assigned this Jan 25, 2025
@akkinoc
Copy link
Owner

akkinoc commented Jan 25, 2025

Updated Logback-access in v4.4.1.
Could you please try v4.4.1 or later?

This was linked to pull requests Jan 25, 2025
@vahidshirvani
Copy link
Author

Thanks, so far it looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug A bug report or bug fix.
Projects
None yet
3 participants