You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by red phoenix <ro...@gmail.com> on 2010/05/09 17:03:50 UTC

Help:tomcat 6.0.18 showdown automatically!

I use tomcat 6.0.18 deploy struts2.1.8.1+hibernate3+spring3.0,I find a
puzzled question,I find tomcat will be shutdown automatically after about 10
minutes,I look up files under logs directory of tomcat,I find
localhost.2010-05-09.log,it looks follows:
2010-5-9 22:36:12 org.apache.catalina.core.ApplicationContext log
Info: Initializing Spring root WebApplicationContext
2010-5-9 22:45:12 org.apache.catalina.core.ApplicationContext log
Info: Initializing Spring root WebApplicationContext

The I look server.xml,
...
<Host name="localhost"  appBase="webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
<Context path="/MyApp" docBase="MyApp" reloadable="true"
crossContext="true"></Context>
...
I look up reason,it looks spring will reboot webapplication,so I delete
following statement:
<Context path="/MyApp" docBase="MyApp" reloadable="true"
crossContext="true"></Context>

Then I start Tomcat,this time tomcat don't shutdown after 10 minutes,but
about 30 minutes,tomcat6 also shutdown automatically! this time I look at
localhost.2010-05-09.log,I don't find following information twice:
Info: Initializing Spring root WebApplicationContext

I am puzzled with it!!! Why tomcat will be shutdown automatically? What
reason raise tomcat shutdown  automatically? How to solve it?

Any idea will be appreciated!
Best regards,
phoenix

Re: Help:tomcat 6.0.18 showdown automatically!

Posted by André Warnier <aw...@ice-sa.com>.
red phoenix wrote:
> tomcat6 shutdown after ten minutes, localhost.2010-05-09.log is follows:
> 2010-5-9 22:36:12 org.apache.catalina.core.ApplicationContext log
>  Info: Initializing Spring root WebApplicationContext
>  2010-5-9 22:45:12 org.apache.catalina.core.ApplicationContext log
>  Info: Initializing Spring root WebApplicationContext
> 
> But when server.xml file is follows:
>  ...
>  <Host name="localhost"  appBase="webapps"
>              unpackWARs="true" autoDeploy="true"
>              xmlValidation="false" xmlNamespaceAware="false">
> 
> After 30 minutes,tomcat6 shutdown automatically. There is no any new log in
> log files! I am puzzled with it. I don't know what raise tomcat 6
> shutdown automatically.
> 
There are a few known reasons why Tomcat would stop, but there must be a 
trace somewhere. Have you checked the system's Event Logs ?

What happens when you start Tomcat from the startup.bat file in the 
Tomcat/bin directory ?


> My log files are follows:
...
> Info: validateJarFile(Q:\Tomcat\webapps\MyApp\WEB-INF\lib\servlet-api.jar) -
> jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
> javax/servlet/Servlet.class

The above indicates that you have a copy of servlet-api.jar where it 
says, in your webapp dir. It should not be there.
For Tomcat6, it should be only in tomcat_dir/lib.

By the way, it would help if you would indicate :
- the exact version of Windows; 32- or 64-bit ?
- the version of the Java JVM; 32- or 64-bit ?
- how much RAM you have on that system
- the precise version of Tomcat : 6.x.y
- where you downloaded it from, and which exact download link you used
   (the .exe service installer, or the .zip version ?)
- how you are starting Tomcat : as a Windows Service ?
- how do you know that Tomcat stopped, if there is nothing in the logs ?
- what appears in the Windows Event logs, when Tomcat stops ?

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


Re: Help:tomcat 6.0.18 showdown automatically!

Posted by Gregor Schneider <rc...@googlemail.com>.
No idea if it has to do with your problem, but....

On Mon, May 10, 2010 at 2:21 AM, red phoenix <ro...@gmail.com> wrote:
> Info: validateJarFile(Q:\Tomcat\webapps\MyApp\WEB-INF\lib\servlet-api.jar) -
> jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
> javax/servlet/Servlet.class

get rid of that outdated servlet-api.jar - you don't need it anyways.

Rgds

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

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


Re: Help:tomcat 6.0.18 showdown automatically!

Posted by red phoenix <ro...@gmail.com>.
tomcat6 shutdown after ten minutes, localhost.2010-05-09.log is follows:
2010-5-9 22:36:12 org.apache.catalina.core.ApplicationContext log
 Info: Initializing Spring root WebApplicationContext
 2010-5-9 22:45:12 org.apache.catalina.core.ApplicationContext log
 Info: Initializing Spring root WebApplicationContext

But when server.xml file is follows:
 ...
 <Host name="localhost"  appBase="webapps"
             unpackWARs="true" autoDeploy="true"
             xmlValidation="false" xmlNamespaceAware="false">

After 30 minutes,tomcat6 shutdown automatically. There is no any new log in
log files! I am puzzled with it. I don't know what raise tomcat 6
shutdown automatically.

My log files are follows:
localhost.2010-05-10.log file:
2010-5-10 8:14:41 org.apache.catalina.core.ApplicationContext log
Info: Initializing Spring root WebApplicationContext

catalina.2010-05-10.log file:
2010-5-10 8:14:05 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:\software\Java\jdk1.6.0_17\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;.;C:\software\Java\jdk1.6.0_17\bin;
2010-5-10 8:14:05 org.apache.coyote.http11.Http11Protocol init
Info: Initializing Coyote HTTP/1.1 on http-5168
2010-5-10 8:14:05 org.apache.catalina.startup.Catalina load
Info: Initialization processed in 2209 ms
2010-5-10 8:14:06 org.apache.catalina.core.StandardService start
Info: Starting service Catalina
2010-5-10 8:14:06 org.apache.catalina.core.StandardEngine start
Info: Starting Servlet Engine: Apache Tomcat/6.0.18
2010-5-10 8:14:38 org.apache.catalina.loader.WebappClassLoader
validateJarFile
Info: validateJarFile(Q:\Tomcat\webapps\MyApp\WEB-INF\lib\servlet-api.jar) -
jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
2010-5-10 8:14:41 org.springframework.web.context.ContextLoader
initWebApplicationContext
Info: Root WebApplicationContext: initialization started
2010-5-10 8:14:41
org.springframework.context.support.AbstractApplicationContext
prepareRefresh
Info: Refreshing
org.springframework.web.context.support.XmlWebApplicationContext@136a43c:
display name [Root WebApplicationContext]; startup date [Mon May 10 08:14:41
CST 2010]; root of context hierarchy
2010-5-10 8:14:42
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
Info: Loading XML bean definitions from ServletContext resource
[/WEB-INF/config/applicationContextSKY.xml]
2010-5-10 8:14:43
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
Info: Loading XML bean definitions from ServletContext resource
[/WEB-INF/config/applicationContextCard.xml]
2010-5-10 8:14:43
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
Info: Loading XML bean definitions from ServletContext resource
[/WEB-INF/config/applicationContextConfigure.xml]
2010-5-10 8:14:43
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
Info: Loading XML bean definitions from ServletContext resource
[/WEB-INF/config/applicationContextSearch.xml]
2010-5-10 8:14:43
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions
Info: Loading XML bean definitions from ServletContext resource
[/WEB-INF/config/applicationContextUser.xml]
2010-5-10 8:14:43
org.springframework.context.support.AbstractApplicationContext
obtainFreshBeanFactory
Info: Bean factory for application context
[org.springframework.web.context.support.XmlWebApplicationContext@136a43c]:
org.springframework.beans.factory.support.DefaultListableBeanFactory@194d372
2010-5-10 8:14:45
org.springframework.core.io.support.PropertiesLoaderSupport loadProperties
Info: Loading properties file from ServletContext resource
[/WEB-INF/config/jdbc.properties]
2010-5-10 8:14:47
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons
Info: Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@194d372:
defining beans
[messageSource,nativeJdbcExtractor,oracleLobHandler,environmentVariablesConfiguration,configurationEncryptor,propertyConfigurer,dataSource,sessionFactory,transactionManager,loginDao,cardDao,configureDao,searchDao,userDao];
root of factory hierarchy
2010-5-10 8:14:47 com.mchange.v2.log.MLog <clinit>
Info: MLog clients using java 1.4+ standard logging.
2010-5-10 8:14:48 com.mchange.v2.c3p0.C3P0Registry banner
Info: Initializing c3p0-0.9.1.2 [built 21-May-2007 15:04:56; debug? true;
trace: 10]
2010-5-10 8:14:51 org.springframework.orm.hibernate3.LocalSessionFactoryBean
buildSessionFactory
Info: Building new Hibernate SessionFactory
2010-5-10 8:14:52 com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource
getPoolManager
Info: Initializing c3p0 pool... com.mchange.v2.c3p0.ComboPooledDataSource [
acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay ->
1000, autoCommitOnClose -> false, automaticTestTable -> null,
breakAfterAcquireFailure -> true, checkoutTimeout -> 0,
connectionCustomizerClassName -> null, connectionTesterClassName ->
com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName ->
2slbos88ze788ixqu80b|1bc16f0, debugUnreturnedConnectionStackTraces -> false,
description -> null, driverClass -> sun.jdbc.odbc.JdbcOdbcDriver,
factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false,
identityToken -> 2slbos88ze788ixqu80b|1bc16f0, idleConnectionTestPeriod ->
60, initialPoolSize -> 3, jdbcUrl -> jdbc:odbc:Driver={Microsoft Access
Driver (*.mdb, *.accdb)}; DBQ=C:/sky.accdb, maxAdministrativeTaskTime -> 0,
maxConnectionAge -> 0, maxIdleTime -> 120, maxIdleTimeExcessConnections ->
0, maxPoolSize -> 50, maxStatements -> 0, maxStatementsPerConnection -> 0,
minPoolSize -> 3, numHelperThreads -> 3,
numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null,
properties -> {user=******, password=******}, propertyCycle -> 0,
testConnectionOnCheckin -> false, testConnectionOnCheckout -> false,
unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false
]
2010-5-10 8:14:58
org.springframework.orm.hibernate3.HibernateTransactionManager
afterPropertiesSet
Info: Using DataSource [com.mchange.v2.c3p0.ComboPooledDataSource [
acquireIncrement -> 3, acquireRetryAttempts -> 30, acquireRetryDelay ->
1000, autoCommitOnClose -> false, automaticTestTable -> null,
breakAfterAcquireFailure -> true, checkoutTimeout -> 0,
connectionCustomizerClassName -> null, connectionTesterClassName ->
com.mchange.v2.c3p0.impl.DefaultConnectionTester, dataSourceName ->
2slbos88ze788ixqu80b|1bc16f0, debugUnreturnedConnectionStackTraces -> false,
description -> null, driverClass -> sun.jdbc.odbc.JdbcOdbcDriver,
factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false,
identityToken -> 2slbos88ze788ixqu80b|1bc16f0, idleConnectionTestPeriod ->
60, initialPoolSize -> 3, jdbcUrl -> jdbc:odbc:Driver={Microsoft Access
Driver (*.mdb, *.accdb)}; DBQ=C:/sky.accdb, maxAdministrativeTaskTime -> 0,
maxConnectionAge -> 0, maxIdleTime -> 120, maxIdleTimeExcessConnections ->
0, maxPoolSize -> 50, maxStatements -> 0, maxStatementsPerConnection -> 0,
minPoolSize -> 3, numHelperThreads -> 3,
numThreadsAwaitingCheckoutDefaultUser -> 0, preferredTestQuery -> null,
properties -> {user=******, password=******}, propertyCycle -> 0,
testConnectionOnCheckin -> false, testConnectionOnCheckout -> false,
unreturnedConnectionTimeout -> 0, usesTraditionalReflectiveProxies -> false
]] of Hibernate SessionFactory for HibernateTransactionManager
2010-5-10 8:14:58 org.springframework.web.context.ContextLoader
initWebApplicationContext
Info: Root WebApplicationContext: initialization completed in 17188 ms
2010-5-10 8:14:59 com.opensymphony.xwork2.util.logging.commons.CommonsLogger
info
Info: Parsing configuration file [struts-default.xml]
2010-5-10 8:15:01 com.opensymphony.xwork2.util.logging.commons.CommonsLogger
info
Info: Parsing configuration file [struts-plugin.xml]
2010-5-10 8:15:01 com.opensymphony.xwork2.util.logging.commons.CommonsLogger
info
Info: Parsing configuration file [struts.xml]
2010-5-10 8:15:05 org.apache.coyote.http11.Http11Protocol start
Info: Starting Coyote HTTP/1.1 on http-5168
2010-5-10 8:15:05 org.apache.jk.common.ChannelSocket init
Info: JK: ajp13 listening on /0.0.0.0:8009
2010-5-10 8:15:05 org.apache.jk.server.JkMain start
Info: Jk running ID=0 time=0/78  config=null
2010-5-10 8:15:05 org.apache.catalina.startup.Catalina start
Info: Server startup in 59716 ms
2010-5-10 8:15:45 org.displaytag.export.ExportViewFactory <init>
Info: Initializing ExportViewFactory with type={csv,excel,xml,pdf}
2010-5-10 8:15:45 org.displaytag.properties.TableProperties
getLocaleResolverInstance
Info: No LocaleResolver configured.

Re: Help:tomcat 6.0.18 showdown automatically!

Posted by Pid <pi...@pidster.com>.
On 09/05/2010 16:03, red phoenix wrote:
> I use tomcat 6.0.18 deploy struts2.1.8.1+hibernate3+spring3.0,I find a
> puzzled question,I find tomcat will be shutdown automatically after about 10
> minutes,I look up files under logs directory of tomcat,I find
> localhost.2010-05-09.log,it looks follows:
> 2010-5-9 22:36:12 org.apache.catalina.core.ApplicationContext log
> Info: Initializing Spring root WebApplicationContext
> 2010-5-9 22:45:12 org.apache.catalina.core.ApplicationContext log
> Info: Initializing Spring root WebApplicationContext
> 
> The I look server.xml,
> ...
> <Host name="localhost"  appBase="webapps"
>             unpackWARs="true" autoDeploy="true"
>             xmlValidation="false" xmlNamespaceAware="false">
> <Context path="/MyApp" docBase="MyApp" reloadable="true"
> crossContext="true"></Context>

For Tomcat 6.0.x, it's usually inadvisable to put the Context definition
in server.xml.  Instead put it in:

 MyApp/META-INF/context.xml

and remove the 'path' and 'docBase' attributes.

> ...
> I look up reason,it looks spring will reboot webapplication,so I delete
> following statement:

Where did you look it up and why did it say Spring will 'reboot' the web
application?

> <Context path="/MyApp" docBase="MyApp" reloadable="true"
> crossContext="true"></Context>
> 
> Then I start Tomcat,this time tomcat don't shutdown after 10 minutes,but
> about 30 minutes,tomcat6 also shutdown automatically! this time I look at
> localhost.2010-05-09.log,I don't find following information twice:
> Info: Initializing Spring root WebApplicationContext
> 
> I am puzzled with it!!! Why tomcat will be shutdown automatically? What
> reason raise tomcat shutdown  automatically? How to solve it?

Is this the last log message before it shuts down?


p