java - 信息 : Additional JARs have been added : 'xalan-2.7.0.jar'

标签 java eclipse spring tomcat maven-2

成功启动 Tomcat 并进行几次 REST 调用后,我在 Tomcat 控制台中收到此消息,然后应用程序自行重新加载。并且由于重新加载需要几秒钟,响应时间太长。然后再次 - 在 REST 调用后我再次收到此消息并再次重新加载应用程序......

Google 没有帮助我,你可以吗? :)

我的(长)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="&quot;/&gt;&#10;        &lt;mapping class=&quot;"
                                             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 日志:

    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

最佳答案

与其说是答案,不如说是提示,但在 Application Context Keeps Reloading 中报告了类似的 Eclipse/Tomcat/Spring 问题(与其他 JAR)和 Tomcat behaving Strangely .检查您的 xalan JAR 是否未损坏(尝试使用 winzip 打开它)并在需要时重新下载。如果不行,可以尝试在JBoss上部署,看看是不是Tomcat插件的问题。

关于java - 信息 : Additional JARs have been added : 'xalan-2.7.0.jar' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2355095/

相关文章:

java - 无法从 Java 进程使用 taskkill.exe

java - JPA OneToMany/ManyToOne 关系不起作用——我错过了什么?

java - 从 RCP 应用程序启动 SWT 窗口/进程

java - 如何使用 Eclipse 创建通用启动配置?

java - 使用 hashmap 和 while 循环对 java mysql 进行编码以检索数据

java - Spring - 基于枚举的动态工厂

java - Linux 中的 Sqlite java.lang.UnsatisfiedLinkError

spring - 具有 Spring 安全性的属性(property)为空

java - Spring Framework AliasFor注解困境

java - 动态创建多个功能区客户端