title: NetBeans can not start Tomcat on mac
body: <p>I am trying to run Tomcat using NetBeans on Mac. When I execute <code>startup.sh</code> in <code>bin</code> folder and then access <code>http://localhost:8080</code> everything looks great. Then I tried running my JAVA project in NetBeans, but it said that port 8080 is already in use. So I found which process is running on this port using <code>lsof -i :8080</code> and killed it (or executed <code>shutdown.sh</code> in <code>bin</code> folder, it is the same). </p>
  
  <p>Then I tried to run my project in NetBeans and after over 3 minutes of waiting it says this</p>
  
  <pre><code>.../WebApplication/nbproject/build-impl.xml:1045: Deployment error: Starting of Tomcat failed.
  </code></pre>
  
  <p>There is log:</p>
  
  <pre><code>09-Feb-2018 01:07:06.183 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version:        Apache Tomcat/9.0.4
  09-Feb-2018 01:07:06.196 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 18 2018 19:42:17 UTC
  09-Feb-2018 01:07:06.199 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server number:         9.0.4.0
  09-Feb-2018 01:07:06.200 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Mac OS X
  09-Feb-2018 01:07:06.201 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            10.13.1
  09-Feb-2018 01:07:06.201 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          x86_64
  09-Feb-2018 01:07:06.201 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/jre
  09-Feb-2018 01:07:06.201 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           1.8.0_161-b12
  09-Feb-2018 01:07:06.201 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Oracle Corporation
  09-Feb-2018 01:07:06.201 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4
  09-Feb-2018 01:07:06.202 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /Users/patrikbujna/lib/apache-tomcat-9.0.4
  09-Feb-2018 01:07:06.203 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4/conf/logging.properties
  09-Feb-2018 01:07:06.203 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
  09-Feb-2018 01:07:06.203 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dhttp.nonProxyHosts=localhost|127.0.0.1|Patriks-MacBook-Pro.local
  09-Feb-2018 01:07:06.204 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
  09-Feb-2018 01:07:06.204 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
  09-Feb-2018 01:07:06.205 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
  09-Feb-2018 01:07:06.206 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4
  09-Feb-2018 01:07:06.207 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/Users/patrikbujna/lib/apache-tomcat-9.0.4
  09-Feb-2018 01:07:06.208 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4/temp
  09-Feb-2018 01:07:06.208 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: [/Users/patrikbujna/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
  09-Feb-2018 01:07:06.579 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
  09-Feb-2018 01:07:06.619 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  09-Feb-2018 01:07:06.637 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-nio-8009"]
  09-Feb-2018 01:07:06.638 INFO [main] org.apache.tomcat.util.net.NioSelectorPool.getSharedSelector Using a shared selector for servlet write/read
  09-Feb-2018 01:07:06.641 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 1337 ms
  09-Feb-2018 01:07:06.709 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
  09-Feb-2018 01:07:06.709 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/9.0.4
  09-Feb-2018 01:07:06.719 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4/conf/Catalina/localhost/manager.xml]
  09-Feb-2018 01:07:07.121 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4/conf/Catalina/localhost/manager.xml] has finished in [401] ms
  09-Feb-2018 01:07:07.121 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying configuration descriptor [/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4/conf/Catalina/localhost/ROOT.xml]
  09-Feb-2018 01:07:07.142 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of configuration descriptor [/Users/patrikbujna/lib/Apache-Tomcat-Netbeans/9.0.4/conf/Catalina/localhost/ROOT.xml] has finished in [21] ms
  09-Feb-2018 01:07:07.147 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
  09-Feb-2018 01:07:07.156 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-nio-8009"]
  09-Feb-2018 01:07:07.159 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 515 ms
  </code></pre>
  
  <p>Can you guys help me? I do not know what to solve this several days...</p>