title: Tomcat 8.0 webapp deployment fails with NullPointerException
body: <p>After upgrading my environment from Apache Tomcat 6.0.37 to 8.0.44 and Java from 1.7.0_45 to 1.8.0_131, one of my webapps will not deploy while the others run without issue.</p>
  
  <p>My development environment is as follows.</p>
  
  <pre><code>Product Version: NetBeans IDE 8.2 (Build 201609300101)
  Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2
  Java: 1.8.0_131; Java HotSpot(TM) 64-Bit Server VM 25.131-b11
  Runtime: Java(TM) SE Runtime Environment 1.8.0_131-b11
  System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
  User directory: C:\Users\heinzk\AppData\Roaming\NetBeans\8.2
  Cache directory: C:\Users\heinzk\AppData\Local\NetBeans\Cache\8.2
  </code></pre>
  
  <p>When I attempt to run or debug my problematic webapp (which worked fine before these upgrades), I get the following server output.</p>
  
  <pre><code>Using CATALINA_BASE:   "C:\Program Files\Apache Software Foundation\Tomcat 8.0"
  Using CATALINA_HOME:   "C:\Program Files\Apache Software Foundation\Tomcat 8.0"
  Using CATALINA_TMPDIR: "C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp"
  Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_131"
  Using CLASSPATH:       "C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\bootstrap.jar;C:\Program Files\Apache Software Foundation\Tomcat 8.0\bin\tomcat-juli.jar"
  Listening for transport dt_shmem at address: tomcat_shared_memory_id
  20-Jun-2017 12:52:55.059 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/8.0.44
  20-Jun-2017 12:52:55.064 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          May 10 2017 17:21:09 UTC
  20-Jun-2017 12:52:55.064 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         8.0.44.0
  20-Jun-2017 12:52:55.064 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Windows 7
  20-Jun-2017 12:52:55.064 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            6.1
  20-Jun-2017 12:52:55.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
  20-Jun-2017 12:52:55.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             C:\Program Files\Java\jdk1.8.0_131\jre
  20-Jun-2017 12:52:55.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_131-b11
  20-Jun-2017 12:52:55.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
  20-Jun-2017 12:52:55.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 8.0
  20-Jun-2017 12:52:55.065 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.0
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\logging.properties
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.jmxremote.port=9876
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.jmxremote.ssl=false
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcom.sun.jmxremote.authenticate=false
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|US3C0771A3E9F2
  20-Jun-2017 12:52:55.066 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -agentlib:jdwp=transport=dt_shmem,address=tomcat_shared_memory_id,server=y,suspend=n
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=C:\Program Files\Apache Software Foundation\Tomcat 8.0\temp
  20-Jun-2017 12:52:55.067 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_131\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\RSA SecurID Token Common;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Perforce;C:\Program Files (x86)\Tools;C:\Program Files\adt-bundle-windows-x86_64-20140321\sdk\tools;C:\Program Files\Git\cmd;C:\cygwin64\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Users\heinzk\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\WebEx\Productivity Tools;C:\Program Files (x86)\WebEx\PTools020000000;C:\Program Files (x86)\Scrivener;C:\Program Files (x86)\Scrivener\Aspell;C:\Program Files (x86)\Scrivener\Aspell\bin;.
  20-Jun-2017 12:52:55.499 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
  20-Jun-2017 12:52:59.671 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  20-Jun-2017 12:52:59.676 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
  20-Jun-2017 12:52:59.685 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  20-Jun-2017 12:52:59.686 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 5325 ms
  20-Jun-2017 12:52:59.751 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
  20-Jun-2017 12:52:59.752 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.44
  20-Jun-2017 12:52:59.765 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor C:\Program Files\Apache Software Foundation\Tomcat 8.0\conf\Catalina\localhost\Device_Monitor.xml
  20-Jun-2017 12:53:05.430 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
   org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/Device_Monitor]]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:162)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:729)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:587)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1798)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:748)
  Caused by: java.lang.NullPointerException
      at java.util.Hashtable.get(Hashtable.java:363)
      at java.util.Properties.getProperty(Properties.java:969)
      at org.apache.catalina.startup.ContextConfig.authenticatorConfig(ContextConfig.java:400)
      at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:794)
      at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:307)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:95)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5213)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      ... 10 more
  </code></pre>
  
  <p>Unfortunately the NullPointerException on the HashTable is not of much help.</p>
  
  <p>The context.xml file is and always has been as follows.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Context path="/Device_Monitor"/&gt;
  </code></pre>
  
  <p>Obviously there's a property being retrieved for which the property name is null.  However, I have no idea which it might be as the stack trace is truncated.</p>
  
  <p>Is there a way to get the balance of the "cause's" stack trace?</p>
  
  <p>Is it possible that the context.xml file is incomplete for this new environment?</p>
  
  <p>A sampling of the web.xml is as follows.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"&gt;
  &lt;web-app&gt;
      &lt;display-name&gt;Device Monitor&lt;/display-name&gt;
      &lt;description&gt;Device Monitor application to monitor devices&lt;/description&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;db_hostname&lt;/param-name&gt;
          &lt;param-value&gt;device-monitor-database&lt;/param-value&gt;
          &lt;description&gt;Database server hostname/IP address&lt;/description&gt;
          &lt;/context-param&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;db_name&lt;/param-name&gt;
          &lt;param-value&gt;device_monitor&lt;/param-value&gt;
          &lt;description&gt;Database schema name&lt;/description&gt;
          &lt;/context-param&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;db_password&lt;/param-name&gt;
          &lt;param-value&gt;device_monitor&lt;/param-value&gt;
          &lt;description&gt;Database account password&lt;/description&gt;
          &lt;/context-param&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;db_username&lt;/param-name&gt;
          &lt;param-value&gt;device_monitor&lt;/param-value&gt;
          &lt;description&gt;Database account username&lt;/description&gt;
          &lt;/context-param&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;db_trim_connections&lt;/param-name&gt;
          &lt;param-value&gt;True&lt;/param-value&gt;
          &lt;description&gt;Set true to dynamically trim database conections&lt;/description&gt;
      &lt;/context-param&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;max_HTTP_requests&lt;/param-name&gt;
          &lt;param-value&gt;25&lt;/param-value&gt;
          &lt;description&gt;Maximum number of HTTP requests that
  may be processed at a time.
  Set to "0" (zero) for no limit&lt;/description&gt;
      &lt;/context-param&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;DM Database&lt;/servlet-name&gt;
          &lt;description&gt;Start first to ensure table definitions are loaded
  so any needed repairs can be initiated&lt;/description&gt;
          &lt;servlet-class&gt;database.Main&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;DM Message&lt;/servlet-name&gt;
          &lt;description&gt;Start next to ensure only old messages are cleared and
  caches are preloaded&lt;/description&gt;
          &lt;servlet-class&gt;message.Main&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;DM GlobalSetting&lt;/servlet-name&gt;
          &lt;description&gt;This servlet is loaded next to read the global settings
  stored in the database before anything other than messages starts&lt;/description&gt;
          &lt;servlet-class&gt;globalSetting.Main&lt;/servlet-class&gt;
          &lt;load-on-startup&gt;3&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;DM Device&lt;/servlet-name&gt;
          &lt;description&gt;Load after messages to update the health status of each
  device per any uncleared messages&lt;/description&gt;
          &lt;servlet-class&gt;device.Main&lt;/servlet-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;removeDeletionsAfterMonths&lt;/param-name&gt;
              &lt;param-value&gt;6&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;deleteChangesAfterMonths&lt;/param-name&gt;
              &lt;param-value&gt;6&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;4&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;DM Database&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/Database&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;DM Device&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/Device&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;DM Message&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/Message&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;DM GlobalSetting&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/GlobalSetting&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;600&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;login-config&gt;
          &lt;realm-name&gt;Device-Monitor&lt;/realm-name&gt;
      &lt;/login-config&gt;
  &lt;/web-app&gt;
  </code></pre>