You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2014/03/25 21:20:22 UTC

Running Tomcat under Eclipse Debugger

All,

I've only just started running Tomcat under the Eclipse Debugger and it
seemed to take forever to launch -- due to web application deployment.
See below for the catalina.out log for a launch this morning.

Note the initial log timestamp (10:54:57) and the final one (11:00:59).
That's 4 minutes to launch and deploy docs, examples, host-manager,
manager, and ROOT. That seems like an awfully long time.

I'm running on Oracle Java 1.7.0-51 64-bit, Mac OS X 10.9, Eclipse
Kepler (why can't they use sane version numbers?). Max heap size looks
like 2GiB (JVM default, not specified in the command-line), though it's
not anywhere near that limit. Intel i7 single-chip, quad-core ht CPU, so
8 logical cores. 8 GiB of RAM.

Any ideas? Or is that just the cost of the debugger?

Thanks,
-chris


Mar 25, 2014 10:54: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:
/Users/chris/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
Mar 25, 2014 10:54:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8080"]
Mar 25, 2014 10:54:58 AM org.apache.tomcat.util.net.NioSelectorPool
getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 25, 2014 10:54:58 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Mar 25, 2014 10:54:58 AM org.apache.tomcat.util.net.NioSelectorPool
getSharedSelector
INFO: Using a shared selector for servlet write/read
Mar 25, 2014 10:54:58 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 578 ms
Mar 25, 2014 10:54:58 AM org.apache.catalina.core.StandardService
startInternal
INFO: Starting service Catalina
Mar 25, 2014 10:54:58 AM org.apache.catalina.core.StandardEngine
startInternal
INFO: Starting Servlet Engine: Apache Tomcat/@VERSION@
Mar 25, 2014 10:54:58 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/docs
Mar 25, 2014 10:56:52 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.
Mar 25, 2014 10:56:53 AM org.apache.catalina.util.SessionIdGenerator
createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using
[SHA1PRNG] took [377] milliseconds.
Mar 25, 2014 10:56:53 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/examples
Mar 25, 2014 10:59:01 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Mar 25, 2014 10:59:01 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Mar 25, 2014 10:59:01 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/host-manager
Mar 25, 2014 10:59:04 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.
Mar 25, 2014 10:59:04 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/manager
Mar 25, 2014 10:59:06 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.
Mar 25, 2014 10:59:06 AM org.apache.catalina.startup.HostConfig
deployDirectory
INFO: Deploying web application directory
/Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/ROOT
Mar 25, 2014 11:00:58 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.
Mar 25, 2014 11:00:59 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8080"]
Mar 25, 2014 11:00:59 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Mar 25, 2014 11:00:59 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 361118 ms


Re: Running Tomcat under Eclipse Debugger

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Konstantin,

On 3/25/14, 4:30 PM, Konstantin Kolinko wrote:
> 2014-03-26 0:20 GMT+04:00 Christopher Schultz <ch...@christopherschultz.net>:
>> All,
>>
>> I've only just started running Tomcat under the Eclipse Debugger and it
>> seemed to take forever to launch -- due to web application deployment.
>> See below for the catalina.out log for a launch this morning.
>>
> 
> Did you follow the documented recipe,  or just tried to start it from
> within Eclipse?

I used the "recipe", including using the "start-tomcat" Run
Configuration that Tomcat provides.

>> Note the initial log timestamp (10:54:57) and the final one (11:00:59).
>> That's 4 minutes to launch and deploy docs, examples, host-manager,
>> manager, and ROOT. That seems like an awfully long time.
> 
> A thread dump ?

I observed a couple of thread dumps during the deployment. I caught a
lot of BCEL analysis and resource lookups. I could post some full dups
if you think that would be helpful. It didn't look like it was stuck
anywhere... just taking forever to load.

>> I'm running on Oracle Java 1.7.0-51 64-bit, Mac OS X 10.9, Eclipse
>> Kepler (why can't they use sane version numbers?).
> 
> "Kepler" is a yearly simultaneous release.  Each component in Eclipse
> has its own version number.  Kepler = 4.3 (4.3.2 now).
> 
> http://www.eclipse.org/downloads/
> http://www.eclipse.org/kepler/
> 
>> Max heap size looks
>> like 2GiB (JVM default, not specified in the command-line), though it's
>> not anywhere near that limit. Intel i7 single-chip, quad-core ht CPU, so
>> 8 logical cores. 8 GiB of RAM.
>>
>> Any ideas? Or is that just the cost of the debugger?
>>
>> Thanks,
>> -chris
>>
>>
>> Mar 25, 2014 10:54: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:
>> /Users/chris/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
>> Mar 25, 2014 10:54:58 AM org.apache.coyote.AbstractProtocol init
>> INFO: Initializing ProtocolHandler ["http-nio-8080"]
>> Mar 25, 2014 10:54:58 AM org.apache.tomcat.util.net.NioSelectorPool
>> getSharedSelector
>> INFO: Using a shared selector for servlet write/read
>> Mar 25, 2014 10:54:58 AM org.apache.coyote.AbstractProtocol init
>> INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
>> Mar 25, 2014 10:54:58 AM org.apache.tomcat.util.net.NioSelectorPool
>> getSharedSelector
>> INFO: Using a shared selector for servlet write/read
>> Mar 25, 2014 10:54:58 AM org.apache.catalina.startup.Catalina load
>> INFO: Initialization processed in 578 ms
>> Mar 25, 2014 10:54:58 AM org.apache.catalina.core.StandardService
>> startInternal
>> INFO: Starting service Catalina
>> Mar 25, 2014 10:54:58 AM org.apache.catalina.core.StandardEngine
>> startInternal
>> INFO: Starting Servlet Engine: Apache Tomcat/@VERSION@
>> Mar 25, 2014 10:54:58 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory
>> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/docs
>> Mar 25, 2014 10:56:52 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.
>> Mar 25, 2014 10:56:53 AM org.apache.catalina.util.SessionIdGenerator
>> createSecureRandom
>> INFO: Creation of SecureRandom instance for session ID generation using
>> [SHA1PRNG] took [377] milliseconds.
>> Mar 25, 2014 10:56:53 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory
>> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/examples
>> Mar 25, 2014 10:59:01 AM org.apache.catalina.core.ApplicationContext log
>> INFO: ContextListener: contextInitialized()
>> Mar 25, 2014 10:59:01 AM org.apache.catalina.core.ApplicationContext log
>> INFO: SessionListener: contextInitialized()
>> Mar 25, 2014 10:59:01 AM org.apache.catalina.startup.HostConfig
>> deployDirectory
>> INFO: Deploying web application directory
>> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/host-manager
>> Mar 25, 2014 10:59:04 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
> 
> Enable debug logging for "org.apache.jasper.servlet.TldScanner" ?

I will certainly be doing that. We probably ought to mark the JARs in
the stock webapps as not requiring JAR-scanning unless they actually
need it.

Thanks,
-chris


Re: Running Tomcat under Eclipse Debugger

Posted by Konstantin Kolinko <kn...@gmail.com>.
2014-03-26 0:20 GMT+04:00 Christopher Schultz <ch...@christopherschultz.net>:
> All,
>
> I've only just started running Tomcat under the Eclipse Debugger and it
> seemed to take forever to launch -- due to web application deployment.
> See below for the catalina.out log for a launch this morning.
>

Did you follow the documented recipe,  or just tried to start it from
within Eclipse?

> Note the initial log timestamp (10:54:57) and the final one (11:00:59).
> That's 4 minutes to launch and deploy docs, examples, host-manager,
> manager, and ROOT. That seems like an awfully long time.
>

A thread dump ?

> I'm running on Oracle Java 1.7.0-51 64-bit, Mac OS X 10.9, Eclipse
> Kepler (why can't they use sane version numbers?).

"Kepler" is a yearly simultaneous release.  Each component in Eclipse
has its own version number.  Kepler = 4.3 (4.3.2 now).

http://www.eclipse.org/downloads/
http://www.eclipse.org/kepler/

> Max heap size looks
> like 2GiB (JVM default, not specified in the command-line), though it's
> not anywhere near that limit. Intel i7 single-chip, quad-core ht CPU, so
> 8 logical cores. 8 GiB of RAM.
>
> Any ideas? Or is that just the cost of the debugger?
>
> Thanks,
> -chris
>
>
> Mar 25, 2014 10:54: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:
> /Users/chris/Library/Java/Extensions:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java:.
> Mar 25, 2014 10:54:58 AM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["http-nio-8080"]
> Mar 25, 2014 10:54:58 AM org.apache.tomcat.util.net.NioSelectorPool
> getSharedSelector
> INFO: Using a shared selector for servlet write/read
> Mar 25, 2014 10:54:58 AM org.apache.coyote.AbstractProtocol init
> INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
> Mar 25, 2014 10:54:58 AM org.apache.tomcat.util.net.NioSelectorPool
> getSharedSelector
> INFO: Using a shared selector for servlet write/read
> Mar 25, 2014 10:54:58 AM org.apache.catalina.startup.Catalina load
> INFO: Initialization processed in 578 ms
> Mar 25, 2014 10:54:58 AM org.apache.catalina.core.StandardService
> startInternal
> INFO: Starting service Catalina
> Mar 25, 2014 10:54:58 AM org.apache.catalina.core.StandardEngine
> startInternal
> INFO: Starting Servlet Engine: Apache Tomcat/@VERSION@
> Mar 25, 2014 10:54:58 AM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/docs
> Mar 25, 2014 10:56:52 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.
> Mar 25, 2014 10:56:53 AM org.apache.catalina.util.SessionIdGenerator
> createSecureRandom
> INFO: Creation of SecureRandom instance for session ID generation using
> [SHA1PRNG] took [377] milliseconds.
> Mar 25, 2014 10:56:53 AM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/examples
> Mar 25, 2014 10:59:01 AM org.apache.catalina.core.ApplicationContext log
> INFO: ContextListener: contextInitialized()
> Mar 25, 2014 10:59:01 AM org.apache.catalina.core.ApplicationContext log
> INFO: SessionListener: contextInitialized()
> Mar 25, 2014 10:59:01 AM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/host-manager
> Mar 25, 2014 10:59:04 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

Enable debug logging for "org.apache.jasper.servlet.TldScanner" ?

> were scanned but no TLDs were found in them. Skipping unneeded JARs
> during scanning can improve startup time and JSP compilation time.
> Mar 25, 2014 10:59:04 AM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/manager
> Mar 25, 2014 10:59:06 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.
> Mar 25, 2014 10:59:06 AM org.apache.catalina.startup.HostConfig
> deployDirectory
> INFO: Deploying web application directory
> /Users/chris/Documents/Eclipse/tomcat-trunk/output/build/webapps/ROOT
> Mar 25, 2014 11:00:58 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.
> Mar 25, 2014 11:00:59 AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-nio-8080"]
> Mar 25, 2014 11:00:59 AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["ajp-nio-8009"]
> Mar 25, 2014 11:00:59 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 361118 ms
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Running Tomcat under Eclipse Debugger

Posted by Mark Thomas <ma...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 25/03/2014 20:20, Christopher Schultz wrote:
> All,
> 
> I've only just started running Tomcat under the Eclipse Debugger
> and it seemed to take forever to launch -- due to web application
> deployment. See below for the catalina.out log for a launch this
> morning.
> 
> Note the initial log timestamp (10:54:57) and the final one
> (11:00:59). That's 4 minutes to launch and deploy docs, examples,
> host-manager, manager, and ROOT. That seems like an awfully long
> time.
> 
> I'm running on Oracle Java 1.7.0-51 64-bit, Mac OS X 10.9, Eclipse 
> Kepler (why can't they use sane version numbers?). Max heap size
> looks like 2GiB (JVM default, not specified in the command-line),
> though it's not anywhere near that limit. Intel i7 single-chip,
> quad-core ht CPU, so 8 logical cores. 8 GiB of RAM.
> 
> Any ideas? Or is that just the cost of the debugger?

I always use remote debugging. If I set JPDA_SUSPEND=y I don't see any
noticeable delay starting any version of Tomcat. Start up is always a
few seconds for me.

Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJTMeZJAAoJEBDAHFovYFnnrekP/3Ck3DaJPDaOIsMiVB8o06/x
f0NrrLoSvNPe+asILpfJAiqNMsA3gA8riQM2IfsSJ2MGyQamjYh/HJ3VbAquy5u6
hNr0mV+Z24H7u0o/M6Ua5aDFL230YK3AOAJDAN9+lNyfbuzmMMpdzSoeUG20u2HB
r0bYXZwPB1TdAR4FHTPAMDSslE+HoWkFM204NIs2o70zcWS0CY3LLZkExBs1RP6k
4tH7OUYDQHHE8BjSJV4Izjlj0x+Xckz3JlhCKPPnpfD+WWHUd+6FZZrMcExcPP8b
ALpyVAdzQPWsmzeN9aLW+0/PPL6yvLAVbau/RYRPDBUbAVVVNb6YgR056kiXD+IG
5gZKwcz6BVDAMFvqdaxnqNFEiXX3qreYWanzWxJCPmqd+iXi7NvuAmuUEpHv2HIc
9GYShAVl67Ogs9FcAzv+r3odxIgikZd+BWviObZg5LmCMdphnCn0y9ZK3EkngAd8
sY0csCgegU0yghIZl21JH3AQekUnsH74LCG8IG2Lbvpj53cNRP4xKc4v6iFENebz
1GdTZOvYiewJrWqlOjfc2oTrNRAP6f2bRHvFHzcu3KijuOLADErLLNY15lGjifi9
T+yLIJwQ6f3/1+oauDd2E1F69w2fQDOyhGf8VCXQY5/dT9YCKNNyMm3iLlEEOTPd
jm+2hE21cMMwL+Ee4ieu
=FhJ5
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org