io.netty.handler.codec.DecoderException: java.lang.NoClassDefFoundError: org/owasp/esapi/errors/EncodingException

65 Views Asked by At

Details of my application:

Microservice - Spring boot 1.3.5.RELEASE, JDK 8

Application - Spring framework 5.3.15, JDK 8

Functionality: I am uploading an excel file in my application that uses the above microservice to process it further. This functionality was working well when my application was on spring 4.2.1.RELEASE.

Error:

io.netty.handler.codec.DecoderException: java.lang.NoClassDefFoundError: org/owasp/esapi/errors/EncodingException
    at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:278) ~[netty-all-4.0.24.Final.jar:4.0.24.Final]
    at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:147) ~[netty-all-4.0.24.Final.jar:4.0.24.Final]

I upgraded the esapi library to the latest but still it giving me the same error.

What could be possible reasons for this issue? How can this be resolved?

1

There are 1 best solutions below

3
Jens On

Looks like you miss the dependency esapi, which contains the missing class, in your project. If you use maven, add

<!-- https://mvnrepository.com/artifact/org.owasp.esapi/esapi -->
<dependency>
    <groupId>org.owasp.esapi</groupId>
    <artifactId>esapi</artifactId>
    <version>2.5.3.1</version>
</dependency>

to yout dependencies in your pom.xml