Skip to content

A WebFlux app that depends on com.amazonaws:DynamoDBLocal fails to start #22275

@wilkinsona

Description

@wilkinsona
org.springframework.context.ApplicationContextException: Unable to start reactive web server; nested exception is java.lang.NoClassDefFoundError: org/eclipse/jetty/servlet/ServletHolder
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.onRefresh(ReactiveWebServerApplicationContext.java:81) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-5.2.7.RELEASE.jar:5.2.7.RELEASE]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at com.example.demo.JettyConditionsApplication.main(JettyConditionsApplication.java:10) [main/:na]
Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/servlet/ServletHolder
	at org.springframework.boot.web.embedded.jetty.JettyReactiveWebServerFactory.createJettyServer(JettyReactiveWebServerFactory.java:174) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.web.embedded.jetty.JettyReactiveWebServerFactory.getWebServer(JettyReactiveWebServerFactory.java:105) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext$ServerManager.<init>(ReactiveWebServerApplicationContext.java:230) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext$ServerManager.get(ReactiveWebServerApplicationContext.java:248) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.createWebServer(ReactiveWebServerApplicationContext.java:91) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.onRefresh(ReactiveWebServerApplicationContext.java:78) ~[spring-boot-2.2.8.RELEASE.jar:2.2.8.RELEASE]
	... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.eclipse.jetty.servlet.ServletHolder
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[na:1.8.0_252]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_252]
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) ~[na:1.8.0_252]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_252]
	... 14 common frames omitted

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions