java.lang.NullPointerException from org.apache.catalina.loader.WebappClassLoaderBase.loadClass
<p>What causes this? This appears to be a very comon error with myriad causes.</p>

<pre><code>HTTP Status 500 -

type Exception report

message

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.NullPointerException
    java.util.concurrent.ConcurrentHashMap.putVal(Unknown Source)
    java.util.concurrent.ConcurrentHashMap.putIfAbsent(Unknown Source)
    java.lang.ClassLoader.getClassLoadingLock(Unknown Source)
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1149)
    org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1116)
    org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:510)
    org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
    org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:620)
    org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
    org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:1110)
    org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
    org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:785)
    org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1425)
    org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
    java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    java.lang.Thread.run(Unknown Source)
note The full stack trace of the root cause is available in the Apache Tomcat/8.5.3 logs.
</code></pre>

<p>Here are the includes:</p>

<pre><code>import java.util.Set;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Application;
</code></pre>

<p>Adding web.xml
Please note: I have tried multiple values for the url-pattern and all it seems to do is change the URI on which I get the error. 'Hello' is the class name in the java source.</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;web-app 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns="http://java.sun.com/xml/ns/javaee"
        xsi:schemaLocation="
        http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0"&gt;

        &lt;servlet&gt;
        &lt;servlet-name&gt;HelloWorldTomcatService&lt;/servlet-name&gt;
        &lt;init-param&gt;
            &lt;param-name&gt;com.package.from.java.file&lt;/param-name&gt;
            &lt;param-value&gt;Hello&lt;/param-value&gt;
        &lt;/init-param&gt;
        &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;HelloWorldTomcatService&lt;/servlet-name&gt;
        &lt;url-pattern&gt;&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;session-config&gt;
        &lt;session-timeout&gt;30&lt;/session-timeout&gt;
    &lt;/session-config&gt;
    &lt;welcome-file-list&gt;
        &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
&lt;/web-app&gt;
</code></pre>