Git Product home page Git Product logo

Comments (9)

dsharinov avatar dsharinov commented on August 14, 2024 1

@liweinan
https://github.com/dsharinov/resteasy-example
That's a simple example that fails with the error when deployed on Tomcat but runs successfully as a Spring Boot application.

	Caused by: java.lang.IllegalStateException: Failed to register 'servlet com.example.resteasy.ResteasyServlet' on the servlet context. Possibly already registered?
		at org.springframework.boot.web.servlet.DynamicRegistrationBean.register(DynamicRegistrationBean.java:122)
		at org.springframework.boot.web.servlet.RegistrationBean.onStartup(RegistrationBean.java:52)
		at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.selfInitialize(ServletWebServerApplicationContext.java:241)
		at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:197)
		at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:162)

Just in case, here are my settings for Tomcat run configuration in IntelliJ:
image

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

@dsharinov Could you please provide a sample project to reproduce this on Github?

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

@dsharinov Thanks for the example and detail explanations :D I'll check it.

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

Sorry I was working on some other tasks, I'll try to find time to check this during this week.

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

@dsharinov I deployed the project to Tomcat 11 and it seems it doesn't have problem:

image

The Tomcat version I used is:

from resteasy-spring-boot.

dsharinov avatar dsharinov commented on August 14, 2024

@liweinan Thanks! That's good to know, unfortunately it's still an alpha version. I cannot tell customers to install it. Would it still be possible to ignore registration failures and see if it works on Tomcat 10?

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

@liweinan Thanks! That's good to know, unfortunately it's still an alpha version. I cannot tell customers to install it. Would it still be possible to ignore registration failures and see if it works on Tomcat 10?

I haven't tested it on Tomcat 10. I'll verify this.

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

@dsharinov I tested it on Tomcat 10 and the example also works:

image

The tomcat I used is:

from resteasy-spring-boot.

liweinan avatar liweinan commented on August 14, 2024

I assume this issue is answered. Please reopen it if the problem exists.

from resteasy-spring-boot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.