'java.lang.ClassNotFoundException: org.apache.coyote.http11.Http11Protocol

After upgrading Apache tomcat from 9.0.48 to 9.0.62 version My application started throwing following error :-

org.apache.catalina.startup.Catalina.stopServer Error stopping Catalina
    org.apache.catalina.LifecycleException: Failed to stop component [StandardService[Catalina]]
        at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:267)
        at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:979)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
        at org.apache.catalina.startup.Catalina.stopServer(Catalina.java:656)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:391)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:481)
    Caused by: java.lang.NullPointerException
        at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:472)
        at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
        ... 9 more
[main] org.apache.catalina.connector.Connector.<init> Protocol handler instantiation failed
    java.lang.ClassNotFoundException: org.apache.coyote.http11.Http11Protocol

I've checked the /conf/server.xml file also , it correctly uses the connector protocol

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
               maxThreads="150" SSLEnabled="true" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLSv1.2" />

Not sure what is causing this error.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source