After a successful start of Tomcat and a few REST calls I get this message in Tomcat console and then the application reload it self. And because reload takes a few seconds, response time is too long. And then again - after a REST call I again get this message and it reloads the application again...
Google did not help me, can you? :)
My (long) pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>core</groupId>
<artifactId>core</artifactId>
<packaging>war</packaging>
<version>0.1</version>
<name>Core</name>
<repositories>
<repository>
<id>terracotta-repository</id>
<name>Terracotta</name>
<url>http://www.terracotta.org/download/reflector/maven2</url>
</repository>
</repositories>
<profiles>
<profile>
<!-- this profile is for deploying to jboss as -->
<id>jboss</id>
<dependencies>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>2.0.2</version>
<scope>provided</scope>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>2.5.6.SEC01</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>2.5.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-mail</artifactId>
<version>1.0.3.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>2.0.2</version>
<scope>compile</scope>
</dependency>
<!-- Struts -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.1.8.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-convention-plugin</artifactId>
<version>2.1.8.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-rest-plugin</artifactId>
<version>2.1.8.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-spring-plugin</artifactId>
<version>2.1.8.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.6.6</version>
</dependency>
<!-- Terracotta -->
<dependency>
<groupId>org.terracotta.modules</groupId>
<artifactId>tim-distributed-cache</artifactId>
<version>1.2.0</version>
<scope>compile</scope>
</dependency>
<!-- JiBX -->
<dependency>
<groupId>org.jibx</groupId>
<artifactId>jibx-run</artifactId>
<version>1.2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.jibx</groupId>
<artifactId>jibx-extras</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
<!-- Servlet -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<!-- Axis -->
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2</artifactId>
<version>1.5.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-http</artifactId>
<version>1.5.1</version>
<exclusions>
<!-- provided by tomcat -->
<exclusion>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
</exclusion>
<exclusion>
<groupId>xerces</groupId>
<artifactId>xmlParserAPIs</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.5.1</version>
</dependency>
<dependency>
<groupId>httpcomponents-httpcore</groupId>
<artifactId>jakarta-httpcore</artifactId>
<version>4.0-alpha2</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.4.0</version>
<scope>compile</scope>
</dependency>
<!-- Commons -->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-httpclient</groupId>
<artifactId>commons-httpclient</artifactId>
<version>3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-attributes</groupId>
<artifactId>commons-attributes-api</artifactId>
<version>2.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.4</version>
<scope>compile</scope>
</dependency>
<!-- Quartz -->
<dependency>
<groupId>quartz</groupId>
<artifactId>quartz</artifactId>
<version>1.5.2</version>
<scope>compile</scope>
</dependency>
<!-- Postgresql -->
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.4-701.jdbc3</version>
<scope>compile</scope>
</dependency>
<!-- Hibernate & JPA -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.3.2.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.4.0.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.4.0.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>3.1.0.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>3.3.2.GA</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.5.8</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.4.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.7</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>core</finalName>
<plugins>
<!--
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
</plugin>
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-idea-plugin</artifactId>
<version>2.2</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<dependenciesAsLibraries>true</dependenciesAsLibraries>
<useFullNames>false</useFullNames>
</configuration>
</plugin>
<plugin>
<groupId>org.jibx</groupId>
<artifactId>maven-jibx-plugin</artifactId>
<version>1.2.1.1</version>
<configuration>
<directory>src/main/resources/config/rest/mappings</directory>
<includes>
<include>*.xml</include>
</includes>
<!--<verbose>true</verbose>-->
</configuration>
<executions>
<execution>
<phase>process-classes</phase>
<goals>
<goal>bind</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</plugin>
<!-- -->
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.5.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<configuration>
<tasks>
<property name="compile_classpath" refid="maven.compile.classpath"/>
<property name="runtime_classpath" refid="maven.runtime.classpath"/>
<property name="test_classpath" refid="maven.test.classpath"/>
<property name="plugin_classpath" refid="maven.plugin.classpath"/>
<fileset id="dataClasses" dir="${basedir}/src/main/java" includes="**/*.java">
<or>
<contains text="@Entity"/>
<contains text="@javax.persistence.Entity"/>
</or>
</fileset>
<copy file="${basedir}/src/main/resources/hibernate/hibernate.cfg.tmpl.xml"
tofile="${basedir}/src/main/resources/hibernate/hibernate.cfg.xml"
overwrite="true"/>
<pathconvert targetos="unix" pathsep=""/> <mapping class=""
property="mappedClasses"
refid="dataClasses">
<chainedmapper>
<globmapper
from="${basedir}${file.separator}src${file.separator}main${file.separator}java${file.separator}"
to=""/>
<packagemapper from="*.java" to=""/>
</chainedmapper>
</pathconvert>
<echo message="mapped classes: ${mappedClasses}"/>
<replace file="${basedir}/src/main/resources/hibernate/hibernate.cfg.xml"
token="INSERT HBM FILES HERE"
value="${mappedClasses}"/>
<copy file="${basedir}/src/main/resources/hibernate/hibernate.cfg.xml"
tofile="${basedir}/target/classes/hibernate.cfg.xml" overwrite="true"/>
<java
jvm="${java.home}"
classpath="${compile_classpath}"
classname="net.core.jpa.hibernate.HibernateUtils">
<arg value="${basedir}/src/main/resources/hibernate/hibernate.sql"/>
</java>
<copy file="${basedir}/src/main/resources/hibernate/hibernate.sql"
tofile="${basedir}/src/main/resources/hibernate/hibernate.sql.ori"
overwrite="true"/>
<java
jvm="${java.home}"
classpath="${runtime_classpath}"
classname="net.core.jpa.hibernate.SqlFixer">
<arg value="${basedir}/src/main/resources/hibernate/hibernate.sql"/>
</java>
<!--
<taskdef name="instrument"
classname="org.hibernate.tool.instrument.javassist.InstrumentTask">
<classpath>
<path refid="maven.runtime.classpath"/>
<path refid="maven.plugin.classpath"/>
</classpath>
</taskdef>
<instrument verbose="false">
<fileset dir="${project.build.outputDirectory}">
<include name="**/data/**/*.class"/>
</fileset>
</instrument>
-->
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-beta-1</version>
</plugin>
</plugins>
</build>
</project>
Tomcat log:
1.3.2010 13:29:16 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:core' did not find a matching property.
1.3.2010 13:29:16 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\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program Files\PC Connectivity Solution\;C:\Program Files\Nokia\Carbide.c++ v1.3\x86Build\Symbian_Tools\Command_Line_Tools;C:\Program Files\Common Files\Symbian\Tools;C:\Program Files\CSL Arm Toolchain\bin;C:\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\Program Files\ActivIdentity\ActivClient\;c:\Program Files\Hewlett-Packard\IAM\bin;c:\Python26;c:\Program Files\TortoiseSVN\bin;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\TortoiseGit\bin;C:\Sun\SDK\bin;;
1.3.2010 13:29:16 org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
1.3.2010 13:29:16 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 390 ms
1.3.2010 13:29:16 org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
1.3.2010 13:29:16 org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
1.3.2010 13:29:17 org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'core.root' = [C:\Work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\core\]
1.3.2010 13:29:17 org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [file:C:\Work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/conf/livecliq-log4j.properties]
1.3.2010 13:29:17 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
1.3.2010 13:29:27 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
1.3.2010 13:29:27 org.apache.jk.common.ChannelSocket init
INFO: JK: ajp13 listening on /0.0.0.0:8009
1.3.2010 13:29:27 org.apache.jk.server.JkMain start
INFO: Jk running ID=0 time=0/16 config=null
1.3.2010 13:29:27 org.apache.catalina.startup.Catalina start
INFO: Server startup in 10983 ms
1.3.2010 13:29:37 org.apache.catalina.loader.WebappClassLoader modified
INFO: Additional JARs have been added : 'xalan-2.7.0.jar'
1.3.2010 13:29:37 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
1.3.2010 13:29:38 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
1.3.2010 13:29:38 org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
1.3.2010 13:29:38 org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'core.root' = [C:\Work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\core\]
1.3.2010 13:29:38 org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [file:C:\Work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/conf/livecliq-log4j.properties]
1.3.2010 13:29:39 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
1.3.2010 13:29:59 org.apache.catalina.loader.WebappClassLoader modified
INFO: Additional JARs have been added : 'xalan-2.7.0.jar'
1.3.2010 13:29:59 org.apache.catalina.core.StandardContext reload
INFO: Reloading this Context has started
1.3.2010 13:29:59 org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
1.3.2010 13:29:59 org.apache.catalina.core.ApplicationContext log
INFO: Shutting down log4j
1.3.2010 13:30:00 org.apache.catalina.core.ApplicationContext log
INFO: Set web app root system property: 'core.root' = [C:\Work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\core\]
1.3.2010 13:30:00 org.apache.catalina.core.ApplicationContext log
INFO: Initializing log4j from [file:C:\Work\.metadata\.plugins\org.eclipse.wst.server.core\tmp0/conf/log4j.properties]
1.3.2010 13:30:00 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext