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

ConcurrentModificationException when serving Servlet.fn request and Undertow #22698

Closed
dsyer opened this issue Mar 28, 2019 · 0 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Milestone

Comments

@dsyer
Copy link
Member

dsyer commented Mar 28, 2019

I get this with Undertow (but not Tomcat):

Caused by: java.util.ConcurrentModificationException
	at java.util.HashMap$HashIterator.nextNode(HashMap.java:1437)
	at java.util.HashMap$KeyIterator.next(HashMap.java:1461)
	at io.undertow.servlet.util.IteratorEnumeration.nextElement(IteratorEnumeration.java:44)
	at org.springframework.web.servlet.function.DefaultServerRequest$ServletAttributesMap.clear(DefaultServerRequest.java:377)
	at org.springframework.web.servlet.function.RequestPredicates.restoreAttributes(RequestPredicates.java:292)
	at org.springframework.web.servlet.function.RequestPredicates.access$300(RequestPredicates.java:67)

Basic app:

@SpringBootApplication
public class ServletApplication {

	public static void main(String[] args) {
		SpringApplication.run(ServletApplication.class, args);
	}

	@Bean
	public RouterFunction<?> userEndpoints() {
		return route().GET("/hello", request -> ok().body("Hello")).build();
	}

}

The error shows up when you try to visit a non-existent endpoint (e.g. http://localhost:8080/).

@poutsma poutsma self-assigned this Mar 28, 2019
@poutsma poutsma added this to the 5.2 M1 milestone Mar 28, 2019
@poutsma poutsma added in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug labels Mar 28, 2019
@dsyer dsyer changed the title ConcurrentModificationException when serving Servlet.fn request ConcurrentModificationException when serving Servlet.fn request and Undertow Mar 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants