title: Encountered exception javax.management.RuntimeOperationsException: Exception invoking method check
body: <p>I have been getting a series of error messages when trying to deploy a web application to an instance of tomcat 7.0.35 server installed on my computer.  The application is developed in jsp using eclipse.  </p>
  
  <p>The first error message I received was:  </p>
  
  <pre><code>FAIL - Encountered exception javax.management.RuntimeOperationsException: Exception invoking method check  
  </code></pre>
  
  <p>The above error message came after I tried to deploy the application in the tomcat manager application.</p>
  
  <p>I have an xml file named myapp.xml placed in the root folder of the application in the workspace, and its contents are:  </p>
  
  <pre><code>&lt;Context path="/myapp" docBase="d:\path\to\myapp"/&gt;  
  </code></pre>
  
  <p>I tried to resolve this error message a number of different ways, with no effect.  After some time, an error message started to appear as well.</p>
  
  <p>Finally, every few seconds, the console is refreshing with a large batch of new error messages from its continued retries, and those error messages include the following:  </p>
  
  <pre><code>Feb 8, 2013 10:38:19 PM org.apache.catalina.startup.HostConfig deployDescriptor
  INFO: Deploying configuration descriptor d:\mypath\apache-tomcat-7.0.35\conf\Catalina\localhost\myapp.xml
  Feb 8, 2013 10:38:19 PM org.apache.catalina.startup.HostConfig deployDescriptor
  SEVERE: Error deploying configuration descriptor d:\mypath\apache-tomcat-7.0.35\conf\Catalina\localhost\myapp.xml
  java.io.FileNotFoundException: d:\mypath\apache-tomcat-7.0.35\conf\Catalina\localhost\myapp.xml (Access is denied)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.&lt;init&gt;(Unknown Source)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Feb 8, 2013 10:38:19 PM org.apache.catalina.startup.HostConfig deployDescriptors
  SEVERE: Error waiting for multi-thread deployment of context descriptors to complete
  java.util.concurrent.ExecutionException: java.lang.NullPointerException
      at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
      at java.util.concurrent.FutureTask.get(Unknown Source)
      at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:579)
      at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:475)
      at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1449)
      at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301)
      at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
      at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1374)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
      at java.lang.Thread.run(Unknown Source)  
  Caused by: java.lang.NullPointerException
      at org.apache.catalina.startup.HostConfig.addWatchedResources(HostConfig.java:1172)
      at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:706)
      at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1637)
      at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      ... 1 more
  </code></pre>
  
  <p>It seems to be throwing a null pointer error when tomcat looks for myapp.xml within a tomcat folder.  But it does not seem to be seeing that myapp.xml is located in my eclipse workspace, at the d:\path\to\myapp url that I gave in the tomcat manager application, as shown above.  And it seems like the problem is getting worse as I keep trying new things.  </p>
  
  <p>Can anyone show me how to fix all this so that I can deploy my application on tomcat?  I have deployed other application on this server using similar methods without problems before this.</p>