Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

spring-boot-starter-tomcat included transitively #328

Open
ArturGajowy opened this issue Mar 12, 2015 · 1 comment
Open

spring-boot-starter-tomcat included transitively #328

ArturGajowy opened this issue Mar 12, 2015 · 1 comment

Comments

@ArturGajowy
Copy link
Contributor

Gradle dep insight:

org.apache.tomcat.embed:tomcat-embed-core:8.0.15
+--- org.apache.tomcat.embed:tomcat-embed-websocket:8.0.15
|    \--- org.springframework.boot:spring-boot-starter-tomcat:1.2.1.RELEASE
|         \--- org.springframework.boot:spring-boot-starter-web:1.2.1.RELEASE
|              \--- com.ofg:micro-infra-spring-base:0.8.10

Tomcat includes servlet-api classes in its org.apache.tomcat.embed:tomcat-embed-core:8.0.15 jar.

This causes the following error in my app, which does not use spring-boot and runs from embedded jetty.

java.lang.AbstractMethodError
at javax.servlet.http.HttpServletRequestWrapper.changeSessionId(HttpServletRequestWrapper.java:249)
at javax.servlet.http.HttpServletRequestWrapper.changeSessionId(HttpServletRequestWrapper.java:249)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
(...)

Suggested solution is to exclude spring-boot-starter-tomcat from micro-infra-spring exported dependencies. Probably this applies to all spring-boot starter jars included in it.

@tadaskay
Copy link
Contributor

tadaskay commented Apr 1, 2015

This should be fixed with #265 with all boot-starters as dependencies only in spring-boot related module

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

No branches or pull requests

2 participants