java.lang.NoClassDefFoundError: javax/servlet/ServletRequest

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

A few things cause this exception:
1) Check if you have all jars and if they're in the correct path.
2) Your classpath might be broken, you can define it in the command line with java -cp yourClassPath or at your IDE if you're using one.

,

you can change your scala version to 2.11.11

Solutions on the web

via Spring JIRA by Brian Clozel, 1 year ago
javax/servlet/ServletRequest
java.lang.NoClassDefFoundError: javax/servlet/ServletRequest
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.springframework.web.reactive.accept.PathExtensionContentTypeResolver.extractKey(PathExtensionContentTypeResolver.java:89)
at org.springframework.web.reactive.accept.AbstractMappingContentTypeResolver.resolveMediaTypes(AbstractMappingContentTypeResolver.java:91)
at org.springframework.web.reactive.accept.CompositeContentTypeResolver.resolveMediaTypes(CompositeContentTypeResolver.java:77)
at org.springframework.web.reactive.result.ContentNegotiatingResultHandlerSupport.getAcceptableTypes(ContentNegotiatingResultHandlerSupport.java:130)
at org.springframework.web.reactive.result.ContentNegotiatingResultHandlerSupport.selectMediaType(ContentNegotiatingResultHandlerSupport.java:102)
at org.springframework.web.reactive.result.method.annotation.AbstractMessageConverterResultHandler.writeBody(AbstractMessageConverterResultHandler.java:118)
at org.springframework.web.reactive.result.method.annotation.ResponseBodyResultHandler.handleResult(ResponseBodyResultHandler.java:119)
at org.springframework.web.reactive.DispatcherHandler.handleResult(DispatcherHandler.java:126)
at org.springframework.web.reactive.DispatcherHandler.lambda$handle$2(DispatcherHandler.java:113)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager.onNext(MonoThenApply.java:99)
at reactor.core.publisher.Operators$DeferredScalarSubscriber.complete(Operators.java:796)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager$SecondSubscriber.onNext(MonoThenApply.java:204)
at reactor.core.publisher.FluxResume$ResumeSubscriber.onNext(FluxResume.java:75)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onNext(FluxMapFuseable.java:131)
at reactor.core.publisher.Operators$ScalarSubscription.request(Operators.java:1292)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.request(FluxMapFuseable.java:187)
at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.set(Operators.java:1009)
at reactor.core.publisher.FluxResume$ResumeSubscriber.onSubscribe(FluxResume.java:70)
at reactor.core.publisher.FluxMapFuseable$MapFuseableSubscriber.onSubscribe(FluxMapFuseable.java:100)
at reactor.core.publisher.FluxFlatMap.trySubscribeScalarMap(FluxFlatMap.java:172)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:51)
at reactor.core.publisher.MonoMapFuseable.subscribe(MonoMapFuseable.java:69)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoThenApply$MonoThenApplyManager.onNext(MonoThenApply.java:133)
at reactor.core.publisher.FluxSwitchIfEmpty$SwitchIfEmptySubscriber.onNext(FluxSwitchIfEmpty.java:71)
at reactor.core.publisher.MonoNext$NextSubscriber.onNext(MonoNext.java:82)
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.drain(FluxConcatMap.java:391)
at reactor.core.publisher.FluxConcatMap$ConcatMapImmediate.onSubscribe(FluxConcatMap.java:192)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:95)
at reactor.core.publisher.FluxIterable.subscribe(FluxIterable.java:59)
at reactor.core.publisher.FluxConcatMap.subscribe(FluxConcatMap.java:116)
at reactor.core.publisher.MonoNext.subscribe(MonoNext.java:45)
at reactor.core.publisher.MonoOtherwiseIfEmpty.subscribe(MonoOtherwiseIfEmpty.java:47)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:58)
at reactor.core.publisher.MonoThenApply.subscribe(MonoThenApply.java:58)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoOtherwise.subscribe(MonoOtherwise.java:47)
at reactor.core.publisher.MonoThenSupply$MonoConcatIgnoreManager.drain(MonoThenSupply.java:169)
at reactor.core.publisher.MonoThenSupply.subscribe(MonoThenSupply.java:55)
at reactor.io.netty.http.NettyHttpServerHandler.channelRead(NettyHttpServerHandler.java:91)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.CombinedChannelDuplexHandler$DelegatingChannelHandlerContext.fireChannelRead(CombinedChannelDuplexHandler.java:435)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267)
at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:250)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:350)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:358)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:123)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:571)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:512)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:426)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:398)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:877)
at java.lang.Thread.run(Thread.java:745)

Users with the same issue

27 times, 3 days ago
2 times, 6 days ago
Once, 1 week ago
Once, 1 week ago
7 times, 1 week ago
2504 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.