Netbeans fail - Application already exists in path /
<p>I have troubles running java webapplications in netbeans. 
Everytime i press run i'm getting the following message:</p>

<p><strong>undeploying ...
undeploy?path=/test
FAIL - Unable to delete [/var/lib/tomcat8/webapps/test]. The continued presence of this file may cause problems.
In-place deployment at /var/lib/tomcat8/webapps/test/build/web
deploy?config=file%3A%2Ftmp%2Fcontext4496745316361475551.xml&amp;path=/test
Deployment is in progress...
FAIL - Application already exists at path /test
/var/lib/tomcat8/webapps/test/nbproject/build-impl.xml:1045: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)</strong></p>

<p>Anyone hasany idea how to fix this?</p>

<p>thanks.</p>