I'm having problems with my Tomcat Server in eclipse. I get the following timeout error:
Server Tomcat v7.0 Server at localhost was unable to start within 45 seconds.
If the server requires more time, try increasing the timeout in the server editor.
And this is what I get in the console:
Nov 03, 2013 11:59:57 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;.
Nov 03, 2013 11:59:58 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Gift Registry Application' did not find a matching property.
Nov 03, 2013 11:59:59 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Nov 03, 2013 11:59:59 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Nov 03, 2013 11:59:59 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 3088 ms
Nov 03, 2013 11:59:59 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Nov 03, 2013 11:59:59 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.47
Nov 03, 2013 12:00:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Nov 03, 2013 12:00:03 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Nov 03, 2013 12:00:03 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 3796 ms
Could someone please help me?
Thanks in advance
In Eclipse goto
Servers view => double click tomcat => drop down the Timeouts section.
Update time as per your requirement.
Also refer to this URL for in detail steps.
Go to Windows option -> select Preference.
Than Select General -> Network Connection.
Than select the Active Provider as Manual.
Then restart the tomcat. It will works.
Hope it will help you.
For me changing Start Time from 45 sec to 10 min and wait for 5 minutes after starting the server solved the problem.
Related
It seems like since we upgraded tomcat to version 8+ we aways get a context reload on startup. However it only seems to happen in our development environments (windows OS with eclipse and tomcat 8.5). Our production environments (linux OS with tomcat 8.5) do not have this issue. Ill post it below but I do not see any indication of why this is happenign from the tomcat logs. I know this is normally behavior with something in the web apps directory is changed, but for the life of me i cannot figure out what is doing it. There must be some way to track it down though.
This first chunk of log is it fully starting
Feb 18, 2017 9:53:41 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Stackoverflow-commproxy' did not find a matching property.
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version: Apache Tomcat/8.5.11
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built: Jan 10 2017 21:02:52 UTC
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number: 8.5.11.0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name: Windows 10
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version: 10.0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture: amd64
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home: C:\Program Files\Java\jdk1.8.0_91\jre
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version: 1.8.0_91-b14
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor: Oracle Corporation
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE: C:\CodeRepos\work\EclipseWorkspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME: C:\tomcat\apache-tomcat-8.5.11
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\CodeRepos\work\EclipseWorkspace.metadata.plugins\org.eclipse.wst.server.core\tmp0
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\tomcat\apache-tomcat-8.5.11
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\CodeRepos\work\EclipseWorkspace.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\tomcat\apache-tomcat-8.5.11\endorsed
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Feb 18, 2017 9:53:41 AM 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: C:\Program Files\Java\jdk1.8.0_91\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_121/bin/server;C:/Program Files/Java/jre1.8.0_121/bin;C:/Program Files/Java/jre1.8.0_121/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Python27\;C:\Python27\Scripts;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Users\dever.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Windows Live\Shared;C:\WINDOWS\system32\config\systemprofile.dnx\bin;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft Emulator Manager\1.0\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Program Files\Emscripten\emscripten\1.35.0;C:\Program Files\Emscripten;C:\Program Files\Emscripten\clang\e1.35.0_64bit;C:\Program Files\Emscripten\node\0.12.2_64bit;C:\Program Files\Emscripten\python\2.7.5.3_64bit;C:\Program Files\Emscripten\java\7.45_64bit\bin;C:\Program Files\Emscripten\crunch\1.03;C:\Program Files\Emscripten\mingw\4.6.2_32bit;C:\Program Files\TortoiseSVN\bin;C:\JavaProgramFiles\jdk1.8.0_91\bin;C:\Ruby193\bin;C:\program files\apache-maven-3.3.9\bin;c:\Program Files\MongoDB\Server\3.2\bin;C:\JavaProgramFiles\apache-ant-1.9.7\bin;C:\JavaProgramFiles\xmlbeans-1.0.3\bin;C:\Users\dever\AppData\Local\Microsoft\WindowsApps;C:\Users\dever\AppData\Roaming\npm;C:\Program Files\eclipse\jee-neon\eclipse;;.
Feb 18, 2017 9:53:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Feb 18, 2017 9:53:41 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Feb 18, 2017 9:53:41 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Feb 18, 2017 9:53:41 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Feb 18, 2017 9:53:41 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 610 ms
Feb 18, 2017 9:53:41 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Feb 18, 2017 9:53:41 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.5.11
Feb 18, 2017 9:53:44 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Feb 18, 2017 9:53:44 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Feb 18, 2017 9:53:44 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2017-02-18 09:53:45.755 [localhost-startStop-1] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting system property: org.jboss.logging.provider=slf4j
2017-02-18 09:53:45.757 [localhost-startStop-1] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting default timezone to: UTC
2017-02-18 09:53:47.990 [localhost-startStop-1] INFO com.stackoverflow.util.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService 'taskScheduler'
2017-02-18 09:53:47.997 [localhost-startStop-1] INFO com.stackoverflow.service.commproxy.LoggingServiceImpl - Logging Service: init successfully
2017-02-18 09:53:48.011 [localhost-startStop-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: initializing Stackoverflow Device Service...
2017-02-18 09:53:48.314 [localhost-startStop-1] INFO com.stackoverflow.cache.mapdb.MapDBCacheManager - Opened StackoverflowCommProxyCacheV4 MapDB store. File location C:\Users\dever\AppData\Local\Temp\StackoverflowCommProxyCacheV4.DeviceMetaDataCache
2017-02-18 09:53:48.314 [localhost-startStop-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: loading local DeviceMetaData cache
2017-02-18 09:53:48.316 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: starting device pool refresh task
Feb 18, 2017 5:53:48 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [http-nio-8080]
Feb 18, 2017 5:53:48 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler [ajp-nio-8009]
Feb 18, 2017 5:53:48 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 6928 ms
2017-02-18 09:53:49.774 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: received list of device metadata with 15 items from Stackoverflow Cloud Services
2017-02-18 09:53:49.775 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: device metadata cache contains 15 items
2017-02-18 09:53:49.806 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: performed refresh cycle. Time spent: 1490 ms
Feb 18, 2017 5:53:58 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/stackoverflow-commproxy] has started
Notice how there is no error and none of the operations which took place would have touched the disk. With a slight exception for logging. Which does log to file however with our settings like this it really shouldnt be touching the web apps directory:
log4j2.xml
<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="180">
<Properties>
<!-- change the path to conference logs below to fit your system -->
<Property name="LOG_DIR">C:\CodeRepos\logs\</Property>
And the rest of the log file:
Feb 18, 2017 5:53:58 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
2017-02-18 09:53:58.514 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: destroying Stackoverflow Device Service...
2017-02-18 09:53:58.543 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.cache.mapdb.MapDBCacheManager - Closed StackoverflowCommProxyCacheV4.DeviceMetaDataCache MapDB store
2017-02-18 09:53:58.545 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.concurrent.ThreadPoolTaskScheduler - Shutting down ExecutorService 'taskScheduler'
Feb 18, 2017 5:53:58 PM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNING: The web application [Stackoverflow-commproxy] appears to have started a thread named [Log4j2-Log4j2Scheduled-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)
Feb 18, 2017 5:54:00 PM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Feb 18, 2017 5:54:00 PM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Feb 18, 2017 5:54:00 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
2017-02-18 17:54:01.637 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting system property: org.jboss.logging.provider=slf4j
2017-02-18 17:54:01.639 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.common.AppConfigPostProcessor - Setting default timezone to: UTC
2017-02-18 17:54:03.732 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.util.concurrent.ThreadPoolTaskScheduler - Initializing ExecutorService 'taskScheduler'
2017-02-18 17:54:03.739 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.service.commproxy.LoggingServiceImpl - Logging Service: init successfully
2017-02-18 17:54:03.751 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: initializing Stackoverflow Device Service...
2017-02-18 17:54:04.024 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO com.stackoverflow.cache.mapdb.MapDBCacheManager - Opened StackoverflowCommProxyCacheV4 MapDB store. File location C:\Users\dever\AppData\Local\Temp\StackoverflowCommProxyCacheV4.DeviceMetaDataCache
2017-02-18 17:54:04.024 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: loading local DeviceMetaData cache
2017-02-18 17:54:04.025 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: starting device pool refresh task
Feb 18, 2017 5:54:04 PM org.apache.catalina.core.StandardContext reload
INFO: Reloading Context with name [/Stackoverflow-commproxy] is completed
2017-02-18 17:54:04.987 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: received list of device metadata with 15 items from Stackoverflow Cloud Services
2017-02-18 17:54:04.987 [taskScheduler-1] DEBUG com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: device metadata cache contains 15 items
2017-02-18 17:54:05.020 [taskScheduler-1] INFO com.stackoverflow.service.commproxy.DeviceServiceImpl - Device Service: performed refresh cycle. Time spent: 995
We can see an error regarding some thread that log4j started and couldnt stop but other than that there is no indication of what caused the context reload, and the error regarding log4j is only happening because of the reload.
How can I track down the cause of context reload. We have several projects suffering for this issue some it seems something more global than a specific process or class.
Haven't received any answers so I just wanted to reiterate the fact that Im really looking for my next step in troubleshooting this? Some other log to look at or some way to find out what is triggering the context reload
You may try the following settings:
Open your server configuration from Eclipse Servers View
then make sure that in this editors Server Options section "Modules auto reload by default" is unchecked
also make sure that in that editors Publishing section "Never publish automatically" is selected
Open context menu of your server in Eclipse Servers View
select "Add and Remove..."
in the dialog make sure that "If server is started, publish changes immediately" is unchecked and Finish (you might also have to remove all webapps first and add them again in another step)
It's hard to tell from current info, so I can just only give some suggestions to help you:
Checking conf/context.xml, you may see whether the your watchedResources is changed.
<!--Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reload.-->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
You may specify the tag in context.xml as <Context reloadable="false"> to try to stop this issue.
More logging: localhost.date.log, host-manager.date.log
From this thread, it says it may related with Eclipse and it si suggested to check jars in Eclipse vs the jars used by the installed tomcat:
There are sometimes problems when a jar (in Eclispe) has a future timestamp, or is loaded after Tomcat starts, which results in Tomcat reloading the context.
Implement your ServletContextListener and check ServleConextEvent to find info about pre context status.
Go to server.xml file by search with ctrl+shift+R
Under give value as false for reloadable as follows.
<Context docBase="YourAppName" path="/YourApp" reloadable="false" source="org.eclipse.jst.j2ee.server:YourAppName"/>
When I launched Tomcat 7.X, I got errors in the console. How can I fix it?
My Server log:
August 22, 2016 10:16:15 morning org.apache.catalina.core.AprLifecycleListener init
info: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre1.8.0_92\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_92/bin/server;C:/Program Files/Java/jre1.8.0_92/bin;C:/Program Files/Java/jre1.8.0_92/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\;C:\Program Files (x86)\MySQL\MySQL Fabric 1.5.2 & MySQL Utilities 1.5.2 1.5\Doctrine extensions for PHP\;C:\Program Files\MySQL\MySQL Workbench 6.2 CE\;C:\Program Files (x86)\AMD\ATI.ACE\Core-Static;C:\Program Files\nodejs\;C:\Program Files\MongoDB\Server\3.2\bin;C:\Ruby23-x64\bin;C:\Users\MuteKen\AppData\Local\Microsoft\WindowsApps;C:\Users\MuteKen\AppData\Roaming\npm;C:\Users\MuteKen\Downloads\Programs;;.
August 22, 2016 10:16:15 morning org.apache.tomcat.util.digester.SetPropertiesRule begin
warning: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:ife_service' did not find a matching property.
August 22, 2016 10:16:17 morning org.apache.coyote.AbstractProtocol init
info: Initializing ProtocolHandler ["http-bio-8080"]
August 22, 2016 10:16:17 morning org.apache.coyote.AbstractProtocol init
info: Initializing ProtocolHandler ["ajp-bio-8009"]
August 22, 2016 10:16:17 morning org.apache.catalina.startup.Catalina load
info: Initialization processed in 2895 ms
August 22, 2016 10:16:17 morning org.apache.catalina.core.StandardService startInternal
info: Starting service Catalina
August 22, 2016 10:16:17 morning org.apache.catalina.core.StandardEngine startInternal
info: Starting Servlet Engine: Apache Tomcat/7.0.56
August 22, 2016 10:16:18 morning org.apache.catalina.util.SessionIdGenerator createSecureRandom
info: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [468] milliseconds.
August 22, 2016 10:16:18 morning org.apache.catalina.loader.WebappClassLoader validateJarFile
info: validateJarFile(C:\Users\MuteKen\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\ife_service\WEB-INF\lib\javax.servlet-api-3.0.1.jar) - jar not loaded. See Servlet Spec 3.0, section 10.7.2. Offending class: javax/servlet/Servlet.class
August 22, 2016 10:16:23 morning org.apache.catalina.core.ApplicationContext log
info: No Spring WebApplicationInitializer types detected on classpath
August 22, 2016 10:16:23 morning org.apache.catalina.core.ApplicationContext log
info: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
It was solved when I pull the latest code and replace them to the project.
Cause may be that just like warnings I rm the log4j.properies accidentally.
Thk u all to help me :)
While executing my simple hello world program I am getting a the Tomcat Server error as
“Starting Tomcat Server v7.0 at localhost (2) has encountered a problem”
I am using jdk7 nd spring 3.1.0 and I have not yet introduced hibernate or maven. Can Anyone help me fix the error. The Console output is as follows:
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files (x86)\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files (x86)/Java/jre8/bin/client;C:/Program Files (x86)/Java/jre8/bin;C:/Program Files (x86)/Java/jre8/lib/i386;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Java\jre8\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\VisualSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MySQL\MySQL Server 5.0\bin\;C:\Program Files (x86)\Java\jre8;C:\Program Files (x86)\Java\jre8\lib;D:\Program Files\apache-ant-1.9.4\bin;C:\Program Files (x86)\Java\jre8\bin;D:\Softwares\Eclipse Dump\EclipseForSpring;;.
Aug 21, 2014 10:15:31 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:HelloWorld' did not find a matching property.
Aug 21, 2014 10:15:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Aug 21, 2014 10:15:31 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Aug 21, 2014 10:15:31 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1082 ms
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 21, 2014 10:15:31 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.55
Aug 21, 2014 10:15:32 AM org.apache.catalina.util.SessionIdGenerator createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [203] milliseconds.
Aug 21, 2014 10:15:34 AM org.apache.catalina.core.ApplicationContext log
INFO: No Spring WebApplicationInitializer types detected on classpath
Aug 21, 2014 10:15:34 AM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'HelloWorld'
Aug 21, 2014 10:15:34 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'HelloWorld': initialization started
Aug 21, 2014 10:15:34 AM org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'HelloWorld-servlet': startup date [Thu Aug 21 10:15:34 IST 2014]; root of context hierarchy
Aug 21, 2014 10:15:34 AM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/HelloWorld-servlet.xml]
Aug 21, 2014 10:15:35 AM org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider registerDefaultFilters
INFO: JSR-250 'javax.annotation.ManagedBean' found and supported for component scanning
Aug 21, 2014 10:15:35 AM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#4258426: defining beans [helloWorldController,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.web.servlet.view.InternalResourceViewResolver#0,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor]; root of factory hierarchy
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello.*] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler
INFO: Mapped URL path [/hello/] onto handler 'helloWorldController'
Aug 21, 2014 10:15:35 AM org.springframework.web.servlet.FrameworkServlet initServletBean
INFO: FrameworkServlet 'HelloWorld': initialization completed in 936 ms
Aug 21, 2014 10:15:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Aug 21, 2014 10:15:35 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Aug 21, 2014 10:15:35 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 4138 ms
Its seems this problem doesn't have anything to do with spring, hibernate or maven. As it is saying
its expecting an native library which it cant find. You can find that native library in Tomcat Native
and store it in position as tomcat expect it
This Thread discuss the same problem as yours.
As you are using windows i recommend you to use tomcat installer to avoid unnecessary problems.
The message you are getting is normal. You can ignore it as i think its not creating any issue
But still you want or solve this you need to compile the source package that comes as Tomcat Native
Which i haven't tried yet. It is said in tomcat site Use MS Visual Studio to open the workspace of the APR sources and build the library (libapr). and further instruction also given.
You can change the eclipse tomcat server configuration. Open the server view, double click on you server to open server configuration. Then click to activate "Publish module contents to separate XML files". Finally, restart your server, the message must disappear.
This time page will come without any issues.
I started tomcat 7 using,
cd /opt/tomcat7/bin
$/opt/tomcat7/bin ./startup.sh
It shows process running
root 23206 130 3.4 1323956 572880 pts/2 Sl 07:58 1:05 /usr/bin/java -Djava.util.logging.config.file=/opt/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dspring.profiles.active=mongo1,maxListenersAllowed -DST_SERVER=mongo1 -Djava.endorsed.dirs=/opt/tomcat7/endorsed -classpath /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/opt/tomcat7 -Dcatalina.home=/opt/tomcat7 -Djava.io.tmpdir=/opt/tomcat7/temp org.apache.catalina.startup.Bootstrap start
If I shutdown it using
$/opt/tomcat7/bin ./shutdown.sh
It gives this message
Using CATALINA_BASE: /opt/tomcat7
Using CATALINA_HOME: /opt/tomcat7
Using CATALINA_TMPDIR: /opt/tomcat7/temp
Using JRE_HOME: /usr
Using CLASSPATH: /opt/tomcat7/bin/bootstrap.jar:/opt/tomcat7/bin/tomcat-juli.jar
but if I check the above process, it still shows it running. Tomcat doesn't shut down. I tried it using root user as well but still no success.
Manully I can kill the process but I want to create deploy script so want to do it using shutdown.sh and startup.sh
Same happens if I try using
/opt/tomcat7/bin/catalina.sh start
/opt/tomcat7/bin/catalina.sh stop
Log
Jul 23, 2014 8:26:17 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/packages/lib/i386:/lib:/usr/lib
Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8081"]
Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 361 ms
Jul 23, 2014 8:26:18 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jul 23, 2014 8:26:18 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.53
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/docs
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/manager
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/ROOT
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/examples
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/host-manager
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory /opt/tomcat7/webapps/target
Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8081"]
Jul 23, 2014 8:26:18 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jul 23, 2014 8:26:18 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 862 ms
Jul 23, 2014 8:26:42 AM org.apache.catalina.core.StandardServer await
INFO: A valid shutdown command was received via the shutdown port. Stopping the Server instance.
Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8081"]
Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jul 23, 2014 8:26:42 AM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8081"]
Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8081"]
Jul 23, 2014 8:26:42 AM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
You can force the shutdown by PID.
Edit
..tomcat/bin/catalina.sh
and set the
CATALINA_PID=path
variable to a local path.
CATALINA_PID
(Optional) Path of the file which should contains the pid of the
catalina startup java process, when start (fork) is used
then you can shutdown Tomcat with -force flag
../tomcat/bin/shutdown.sh -force
If the script can not stop Tomcat normally will use a kill to stop the process by PID.
Update:
According to Joshua Taylor comment, the recommended way to store additional variables for running tomcat is the setenv.* script.
Take a look at (3.4) Using the "setenv" script (optional, recommended) section in the tomcat running docs
https://tomcat.apache.org/tomcat-7.0-doc/RUNNING.txt
If you are in windows, and using the portable tomcat, you can use the nircmd program tool, and close by title console window, instead of stopping by PID.
When you have downloaded this tool, just do:
nircmd.exe win close title "Tomcat"
I once had the misfortune of a page running infinite redirect loops due to a faulty authentication mechanism.
It eventually slowed down the entire server, but also made it impossible for me to shut it down gracefully. In the end I had to employ brute force like vzamanillo describes.
The point being that something fishy might be running within your server's processes that won't finish properly.
Is you shutdown port set? (in /etc/tomcat9/conf/server.xml )
<Server port="9005" shutdown="SHUTDOWN">
i am a newbie and just started to work in jsp, i installed the pre-requisites and created a Dynamic Web Project in Eclipse Juno, and to test if the configuration is working well, i have created a dummy jsp page named index.jsp and tried to run it. but i am getting error, the details are below:
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre7\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Ruby200-x64\bin;C:\Python33\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\;c:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;c:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\Tools\Binn\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\MySQL\MySQL Server 5.5\bin;C:\Program Files\Java\jdk1.7.0_21\bin;C:\Program Files\Java\jdk1.7.0_21\lib;C:\Program Files (x86)\Windows Live\Shared;.
Jun 26, 2013 5:20:24 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:DemoWebApp1' did not find a matching property.
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:24 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 755 ms
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.32
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:24 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 489 ms
Jun 26, 2013 5:20:24 PM org.apache.catalina.core.StandardServer await
SEVERE: StandardServer.await: create[localhost:8005]:
java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(Unknown Source)
at java.net.AbstractPlainSocketImpl.bind(Unknown Source)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
at org.apache.catalina.startup.Catalina.await(Catalina.java:766)
at org.apache.catalina.startup.Catalina.start(Catalina.java:712)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:451)
Jun 26, 2013 5:20:24 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:26 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:27 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
Jun 26, 2013 5:20:27 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:28 PM org.apache.coyote.AbstractProtocol stop
INFO: Stopping ProtocolHandler ["ajp-bio-8009"]
Jun 26, 2013 5:20:30 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["http-bio-8080"]
Jun 26, 2013 5:20:30 PM org.apache.coyote.AbstractProtocol destroy
INFO: Destroying ProtocolHandler ["ajp-bio-8009"]
i cannot figure out what am i doing wrong, or what is NOT properly configured in my system.
thanx in advance :)
i really want to start learning JSP as soon as possible, but this is stopping me. HELP!!
first you should try to uninstall tomcat and re-install it again by giving proper privileges. it should work for you. it worked for me.
re-install the eclipse, and tomcat with root privileges and re-configure the IDE.
You have another process running already which occupies port 8005.
This typically happens for 8005 when you try to start Tomcat, and it has been started already. Either by you elsewhere (another Eclipse debug session) or by having started Tomcat as a service when installing Tomcat.
By general principle you should not use an installer to get Tomcat up and running when wanting to run it from inside Eclipse, but a zip file.
If you are brand new to Java programming, I would suggest Netbeans instead (after uninstalling Tomcat). Their download generally works better out of the box for web development.
You should use tcpview from www.sysinternals.com to find out which process occupies port 8005. If you cannot get rid of that process, you may try to configure an alternate port in Tomcats server.xml
The port is already being used. You can do a quick check by changing the port here in this file %CATALINA_HOME%\conf\server.xml
and running the program again.