1

I am trying to deploy a web project with tomcat using NetBeans 8.2.

When I run my project, Tomcat 7 server runs fine and its logs shows that server has been started but NetBeans project keeps on waiting for Tomcat server and after waiting for 3 minutes it says "Starting of Tomcat failed"

here are my logs of Tomcat

Mar 03, 2020 3:53:18 PM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.io.tmpdir=/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/temp
Mar 03, 2020 3:53:18 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/Users/user/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.]
Mar 03, 2020 3:53:18 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Mar 03, 2020 3:53:18 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 532 ms
Mar 03, 2020 3:53:18 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service [Catalina]
Mar 03, 2020 3:53:18 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.100
Mar 03, 2020 3:53:18 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/docs]
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/docs] has finished in [274] ms
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/manager]
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/manager] has finished in [67] ms
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/examples]
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/examples] has finished in [188] ms
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/ROOT]
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/ROOT] has finished in [38] ms
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/host-manager]
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory [/Users/user/Documents/tools/Servers/apache-tomcat-7.0.100/webapps/host-manager] has finished in [46] ms
Mar 03, 2020 3:53:19 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Mar 03, 2020 3:53:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 677 ms

My project logs:

    scrybe_commons.jar:
    scrybe_services.compile:
    scrybe_services.jar:
    deps-ear-jar:
    deps-jar:
    check-rest-config-props:
    generate-rest-config:
    library-inclusion-in-archive:
    library-inclusion-in-manifest:
    compile:
    compile-jsps:
    Starting Tomcat process...
    Waiting for Tomcat...
    Starting of Tomcat failed.
    /Users/user/path/to/project/nbproject/build-impl.xml:1199: Deployment error: Starting of 
    Tomcat failed.
    See the server log for details.
    BUILD FAILED (total time: 3 minutes 1 second)

I don't know what am I doing wrong!

Edit : I have tried all the given solutions in this link but nothing resolved my problem.

M.Ahsen Taqi
  • 965
  • 11
  • 35
  • what build or starting tools are you using? I have no idea what `build-impl.xml` belongs to. – f1sh Mar 03 '20 at 13:51
  • @f1sh Re _"I have no idea what build-impl.xml belongs to"_, it is a read-only build file generated by NetBeans for Ant based projects. – skomisa Mar 03 '20 at 18:39
  • I don't think you are doing anything wrong. Your log shows that Tomcat started successfully, but NetBeans doesn't seem to be aware of that. This may be a variant of the NetBeans bug [NETBEANS-3903 Netbeans 11.2 fails to detect successful startup of Tomcat 9.0.31](https://issues.apache.org/jira/browse/NETBEANS-3903) which is fixed in NetBeans 12. The person reporting the bug stated that the issue also existed with other versions of Tomcat and NetBeans. It may also be O/S related since it was reported for Mac, and I don't face this issue on Windows. Are you running on Mac? – skomisa Mar 03 '20 at 18:48
  • @skomisa yes i am using it Mac. – M.Ahsen Taqi Mar 04 '20 at 07:03
  • OK, since you are on Mac I think your issue is a duplicate of [Starting of Tomcat failed from Netbeans](https://stackoverflow.com/q/22225764/2985643), so I am voting to close this question. That question provides multiple fixes and workarounds, so if one approach doesn't work, try others. If none of them work then please update your question accordingly. – skomisa Mar 04 '20 at 07:48
  • Does this answer your question? [Starting of Tomcat failed from Netbeans](https://stackoverflow.com/questions/22225764/starting-of-tomcat-failed-from-netbeans) – skomisa Mar 04 '20 at 07:49
  • @skomisa thanks for referring me the link. I think i have tried some solution from that post but that didnt solve my problem but i am not sure that i tried all of them , I was in hurry, so I deployed the .war file on tomcat manually and carried out my task. I will try the remaining solution in down time. Thanks for the help :) – M.Ahsen Taqi Mar 05 '20 at 05:40

1 Answers1

0

In my case I think the problem was with Tomcat version that I was using , So changing tomcat version did the trick for me.

I was using Tomcat 7.0.100, I downloaded Tomcat 7.0.56 and added it in Netbeans and then after cleaning and building my project I used Deploy command to run my project.

M.Ahsen Taqi
  • 965
  • 11
  • 35