3

Every times I stop or restart the tomcat server in NetBeans(Services > Servers) it takes long time and also gives an error message as "Stopping of Tomcat failed.". Is there any solution to this problem ?

16-Dec-2015 12:50:44.951 INFO [main] org.apache.catalina.core.StandardServer.await A valid shutdown command was received via the shutdown port. Stopping the Server instance.
        16-Dec-2015 12:50:44.952 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-apr-8084"]
        16-Dec-2015 12:50:45.003 INFO [main] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["ajp-apr-8009"]
        16-Dec-2015 12:50:45.054 INFO [main] org.apache.catalina.core.StandardService.stopInternal Stopping service Catalina
        16-Dec-2015 12:50:45.138 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [Imp] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
        16-Dec-2015 12:50:45.139 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [Imp] appears to have started a thread named [MySQL Statement Cancellation Timer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
         java.lang.Object.wait(Native Method)
         java.lang.Object.wait(Object.java:502)
         java.util.TimerThread.mainLoop(Timer.java:526)
         java.util.TimerThread.run(Timer.java:505)
        16-Dec-2015 12:50:45.139 WARNING [localhost-startStop-2] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [Imp] appears to have started a thread named [pool-1-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
         sun.misc.Unsafe.park(Native Method)
         java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
         java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
         java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
         java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
         java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
         java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
         java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
         java.lang.Thread.run(Thread.java:745)
        16-Dec-2015 12:50:45.166 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-apr-8084"]
        16-Dec-2015 12:50:45.221 INFO [main] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["ajp-apr-8009"]
        16-Dec-2015 12:50:45.271 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-apr-8084"]
        16-Dec-2015 12:50:45.272 INFO [main] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["ajp-apr-8009"]
  • On which port are you running your Tomcat? – Abhiroop Sarkar Dec 16 '15 at 06:25
  • So you are using the default port. Can you try changing the port no and see if it work? – Abhiroop Sarkar Dec 16 '15 at 06:31
  • Can you please share the console exception details. Also, see this link it may helps. http://www.javatbrains.com/2015/12/404-error-while-apache-tomcat-server.html – Nallamachu Dec 16 '15 at 06:51
  • SubbaReddy Nallamachu : I have updated the post with server log details. Thanks for the link. But the problem with only stopping the server. – Buddhika Gayashan Dec 16 '15 at 07:47
  • Abhiroop Sarkar : I have changed the default port, but still gives same error. Thanks. – Buddhika Gayashan Dec 16 '15 at 07:49
  • Looks like u are using manual control of JDBC connection to database and dont't relelease connection after there is no need in it anymore – simar Dec 16 '15 at 07:59
  • Actually it is not exactly connection itself, it could be preparedstatement, statement any resource not properly released. More info easy to find http://stackoverflow.com/questions/3320400/to-prevent-a-memory-leak-the-jdbc-driver-has-been-forcibly-unregistered – simar Dec 16 '15 at 08:19
  • Yes. That can be the problem. When I stop the JVM manually(from Windows Task Manager), all the database connections are teminated. Then I can stop the tomcat without any error. Thanks. – Buddhika Gayashan Feb 06 '16 at 18:31

0 Answers0