Appfuse - Spring 4应用程序无法在Tomcat 7上部署

时间:2014-05-20 14:58:55

标签: java spring spring-mvc

我正在尝试部署由Appfuse创建的基于Spring 4 web的应用程序,但在部署tomcat时失败。 这是我的配置: Java版本:1.7.0_51,Apache Maven 3.2.1,tomcat 7.0.42

这就是我所做的: 我尝试从appfuse工件创建一个项目,尝试使用appfuse运行(成功!),然后尝试在Eclipse上运行我的tomcat(不幸)。

我的pom的依赖关系如下:

<!-- Dependencies calculated by AppFuse when running full-source plugin -->
<dependencies>
    <dependency>
        <groupId>${jdbc.groupId}</groupId>
        <artifactId>${jdbc.artifactId}</artifactId>
        <version>${jdbc.version}</version>
    </dependency>
    <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>${commons.beanutils.version}</version>
    </dependency>
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>${commons.collections.version}</version>
    </dependency>
    <dependency>
        <groupId>commons-dbcp</groupId>
        <artifactId>commons-dbcp</artifactId>
        <version>${commons.dbcp.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>xercesImpl</artifactId>
                <groupId>xerces</groupId>
            </exclusion>
            <exclusion>
                <artifactId>commons-collections</artifactId>
                <groupId>commons-collections</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>${commons.fileupload.version}</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${commons.io.version}</version>
    </dependency>
    <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${commons.lang.version}</version>
    </dependency>
    <dependency>
        <groupId>displaytag</groupId>
        <artifactId>displaytag</artifactId>
        <version>${displaytag.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>jcl104-over-slf4j</artifactId>
                <groupId>org.slf4j</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>javassist</groupId>
        <artifactId>javassist</artifactId>
        <version>3.12.1.GA</version>
    </dependency>
    <dependency>
        <groupId>javax.mail</groupId>
        <artifactId>mail</artifactId>
        <version>${javamail.version}</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>${servlet.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>jstl</artifactId>
        <version>${jstl.version}</version>
    </dependency>
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>${jsp.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>javax.xml.bind</groupId>
        <artifactId>jaxb-api</artifactId>
        <version>2.2.11</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${junit.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>mail</artifactId>
                <groupId>javax.mail</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jms</artifactId>
                <groupId>javax.jms</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jmxtools</artifactId>
                <groupId>com.sun.jdmk</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jmxri</artifactId>
                <groupId>com.sun.jmx</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-core</artifactId>
        <version>${ehcache.version}</version>
    </dependency>
    <dependency>
        <groupId>net.sf.ehcache</groupId>
        <artifactId>ehcache-web</artifactId>
        <version>${ehcache.web.version}</version>
    </dependency>
    <dependency>
        <groupId>opensymphony</groupId>
        <artifactId>sitemesh</artifactId>
        <version>${sitemesh.version}</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        <version>${cxf.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>*</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>wstx-asl</artifactId>
                <groupId>org.codehaus.woodstox</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>${cxf.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>spring-web</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${cxf.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>wstx-asl</artifactId>
                <groupId>org.codehaus.woodstox</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>${velocity.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity-tools</artifactId>
        <version>2.0</version>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjweaver</artifactId>
        <version>${aspectj.version}</version>
    </dependency>
    <dependency>
        <groupId>org.aspectj</groupId>
        <artifactId>aspectjrt</artifactId>
        <version>${aspectj.version}</version>
    </dependency>
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-jaxrs</artifactId>
        <version>1.9.11</version>
    </dependency>
    <dependency>
        <groupId>org.directwebremoting</groupId>
        <artifactId>dwr</artifactId>
        <version>${dwr.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-search</artifactId>
        <version>${hibernate.search.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>hibernate-core</artifactId>
                <groupId>org.hibernate</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-search-analyzers</artifactId>
        <version>${hibernate.search.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-ehcache</artifactId>
        <version>${hibernate.version}</version>
    </dependency>
    <dependency>
        <groupId>org.hibernate.java-persistence</groupId>
        <artifactId>jpa-api</artifactId>
        <version>${jpa.version}</version>
    </dependency>
    <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${mockito.version}</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>jcl-over-slf4j</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${slf4j.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aop</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-aspects</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context-support</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-core</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-config</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-ldap</artifactId>
        <version>${spring.security.version}</version>
    </dependency>
    <dependency>
        <groupId>org.springframework.security</groupId>
        <artifactId>spring-security-taglibs</artifactId>
        <version>${spring.security.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>spring-expression</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring-context</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring-web</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.springmodules</groupId>
        <artifactId>spring-modules-validation</artifactId>
        <version>${springmodules.validation.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>*</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>xml-apis</artifactId>
                <groupId>xml-apis</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.subethamail</groupId>
        <artifactId>subethasmtp-wiser</artifactId>
        <version>${wiser.version}</version>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <artifactId>servlet-api</artifactId>
                <groupId>javax.servlet</groupId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.tuckey</groupId>
        <artifactId>urlrewritefilter</artifactId>
        <version>${urlrewrite.version}</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap</artifactId>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootstrap-datepicker</artifactId>
        <version>1.2.0</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>jquery</artifactId>
        <version>1.8.3</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>jquery-cookie</artifactId>
        <version>1.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.webjars</groupId>
        <artifactId>bootswatch</artifactId>
        <version>3.0.0</version>
    </dependency>
    <dependency>
        <groupId>ro.isdc.wro4j</groupId>
        <artifactId>wro4j-core</artifactId>
        <version>${wro4j.version}</version>
    </dependency>
    <dependency>
        <groupId>struts-menu</groupId>
        <artifactId>struts-menu</artifactId>
        <version>${struts.menu.version}</version>
        <scope>runtime</scope>
        <exclusions>
            <exclusion>
                <artifactId>xml-apis</artifactId>
                <groupId>xml-apis</groupId>
            </exclusion>
            <exclusion>
                <artifactId>*</artifactId>
                <groupId>velocity</groupId>
            </exclusion>
            <exclusion>
                <artifactId>*</artifactId>
                <groupId>velocity-tools</groupId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

运行tomcat时,出现以下错误:

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext-dao.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparator()Ljava/util/Comparator;
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.factory.support.DefaultListableBeanFactory.getDependencyComparator()Ljava/util/Comparator;

有些人似乎也有类似的错误:

Maven 3 build issue with Spring Framework 4 - NoSuchMethodError

Spring application fails to deploy on Tomcat: whats wrong with applicationContext?

但我不是在使用泽西也不是在使用OAuth。

当我尝试运行mvn依赖:树时,我没有看到任何特殊内容:

[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @  ---
[INFO] com.mycompany:myproject:war:1.0-SNAPSHOT
[INFO] +- postgresql:postgresql:jar:9.1-901-1.jdbc4:compile
[INFO] +- commons-beanutils:commons-beanutils:jar:1.8.3:compile
[INFO] |  \- commons-logging:commons-logging:jar:1.1.1:compile

[INFO] +- commons-collections:commons-collections:jar:3.2.1:compile
[INFO] +- commons-dbcp:commons-dbcp:jar:1.4:compile
[INFO] |  \- commons-pool:commons-pool:jar:1.5.4:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.3:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- commons-lang:commons-lang:jar:2.6:compile
[INFO] +- displaytag:displaytag:jar:1.2:compile
[INFO] |  \- com.lowagie:itext:jar:1.3:compile
[INFO] +- javassist:javassist:jar:3.12.1.GA:compile
[INFO] +- javax.mail:mail:jar:1.4.1:compile
[INFO] |  \- javax.activation:activation:jar:1.1:compile
[INFO] +- javax.servlet:javax.servlet-api:jar:3.1.0:provided
[INFO] +- javax.servlet:jstl:jar:1.2:compile
[INFO] +- javax.servlet.jsp:jsp-api:jar:2.1:provided
[INFO] +- javax.xml.bind:jaxb-api:jar:2.2.11:compile
[INFO] +- junit:junit:jar:4.11:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- log4j:log4j:jar:1.2.17:compile
[INFO] +- net.sf.ehcache:ehcache-core:jar:2.6.6:compile
[INFO] +- net.sf.ehcache:ehcache-web:jar:2.0.4:compile
[INFO] +- opensymphony:sitemesh:jar:2.4.2:runtime
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxrs:jar:2.7.7:compile
[INFO] |  +- org.apache.cxf:cxf-api:jar:2.7.7:compile
[INFO] |  |  +- org.codehaus.woodstox:woodstox-core-asl:jar:4.2.0:compile
[INFO] |  |  |  \- org.codehaus.woodstox:stax2-api:jar:3.1.1:compile
[INFO] |  |  +- org.apache.ws.xmlschema:xmlschema-core:jar:2.0.3:compile
[INFO] |  |  +- org.apache.geronimo.specs:geronimo-javamail_1.4_spec:jar:1.7.1:compile
[INFO] |  |  \- wsdl4j:wsdl4j:jar:1.6.3:compile
[INFO] |  +- org.apache.cxf:cxf-rt-core:jar:2.7.7:compile
[INFO] |  |  \- com.sun.xml.bind:jaxb-impl:jar:2.2.6:compile
[INFO] |  +- javax.ws.rs:javax.ws.rs-api:jar:2.0-m10:compile
[INFO] |  \- org.apache.cxf:cxf-rt-bindings-xml:jar:2.7.7:compile
[INFO] +- org.apache.cxf:cxf-rt-transports-http:jar:2.7.7:compile
[INFO] +- org.apache.cxf:cxf-rt-frontend-jaxws:jar:2.7.7:compile
[INFO] |  +- xml-resolver:xml-resolver:jar:1.2:compile
[INFO] |  +- asm:asm:jar:3.3.1:compile
[INFO] |  +- org.apache.cxf:cxf-rt-bindings-soap:jar:2.7.7:compile
[INFO] |  |  \- org.apache.cxf:cxf-rt-databinding-jaxb:jar:2.7.7:compile
[INFO] |  +- org.apache.cxf:cxf-rt-frontend-simple:jar:2.7.7:compile
[INFO] |  \- org.apache.cxf:cxf-rt-ws-addr:jar:2.7.7:compile
[INFO] |     \- org.apache.cxf:cxf-rt-ws-policy:jar:2.7.7:compile
[INFO] |        \- org.apache.neethi:neethi:jar:3.0.2:compile
[INFO] +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] +- org.apache.velocity:velocity-tools:jar:2.0:runtime
[INFO] |  +- commons-digester:commons-digester:jar:1.8:compile
[INFO] |  +- commons-chain:commons-chain:jar:1.1:runtime
[INFO] |  +- commons-validator:commons-validator:jar:1.3.1:compile
[INFO] |  +- dom4j:dom4j:jar:1.1:compile
[INFO] |  +- oro:oro:jar:2.0.8:runtime
[INFO] |  +- sslext:sslext:jar:1.2-0:runtime
[INFO] |  +- org.apache.struts:struts-core:jar:1.3.8:runtime
[INFO] |  +- org.apache.struts:struts-taglib:jar:1.3.8:runtime
[INFO] |  \- org.apache.struts:struts-tiles:jar:1.3.8:runtime
[INFO] +- org.aspectj:aspectjweaver:jar:1.7.4:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.7.4:compile
[INFO] +- org.codehaus.jackson:jackson-jaxrs:jar:1.9.11:compile
[INFO] |  +- org.codehaus.jackson:jackson-core-asl:jar:1.9.11:compile
[INFO] |  \- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.11:compile
[INFO] +- org.directwebremoting:dwr:jar:2.0.10:compile
[INFO] +- org.hibernate:hibernate-search:jar:4.1.1.Final:compile
[INFO] |  \- org.hibernate:hibernate-search-orm:jar:4.1.1.Final:compile
[INFO] |     \- org.hibernate:hibernate-search-engine:jar:4.1.1.Final:compile
[INFO] |        \- org.apache.avro:avro:jar:1.5.1:compile
[INFO] |           +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
[INFO] |           \- org.xerial.snappy:snappy-java:jar:1.0.1-rc3:compile
[INFO] +- org.hibernate:hibernate-core:jar:4.2.7.Final:compile
[INFO] |  +- antlr:antlr:jar:2.7.7:compile
[INFO] |  +- org.jboss.logging:jboss-logging:jar:3.1.0.GA:compile
[INFO] |  +- org.javassist:javassist:jar:3.18.1-GA:compile
[INFO] |  +- org.jboss.spec.javax.transaction:jboss-transaction-api_1.1_spec:jar:1.0.1.Final:compile
[INFO] |  +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] |  \- org.hibernate.common:hibernate-commons-annotations:jar:4.0.2.Final:compile
[INFO] +- org.hibernate:hibernate-search-analyzers:jar:4.1.1.Final:compile
[INFO] |  +- org.apache.lucene:lucene-core:jar:3.5.0:compile
[INFO] |  +- org.apache.lucene:lucene-analyzers:jar:3.5.0:compile
[INFO] |  \- org.apache.solr:solr-analysis-extras:jar:3.5.0:compile
[INFO] |     +- org.apache.solr:solr-core:jar:3.5.0:compile
[INFO] |     |  +- org.apache.solr:solr-solrj:jar:3.5.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-highlighter:jar:3.5.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-memory:jar:3.5.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-misc:jar:3.5.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-spatial:jar:3.5.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-spellchecker:jar:3.5.0:compile
[INFO] |     |  +- org.apache.lucene:lucene-grouping:jar:3.5.0:compile
[INFO] |     |  +- org.apache.solr:solr-commons-csv:jar:3.5.0:compile
[INFO] |     |  +- commons-codec:commons-codec:jar:1.5:compile
[INFO] |     |  \- com.google.guava:guava:jar:r05:compile
[INFO] |     +- org.apache.lucene:lucene-smartcn:jar:3.5.0:compile
[INFO] |     \- org.apache.lucene:lucene-stempel:jar:3.5.0:compile
[INFO] +- org.hibernate:hibernate-ehcache:jar:4.2.7.Final:compile
[INFO] +- org.hibernate.java-persistence:jpa-api:jar:2.0-cr-1:compile
[INFO] +- org.mockito:mockito-core:jar:1.9.5:test
[INFO] |  \- org.objenesis:objenesis:jar:1.0:test
[INFO] +- org.slf4j:slf4j-api:jar:1.7.5:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.7.5:compile
[INFO] +- org.slf4j:slf4j-log4j12:jar:1.7.5:compile
[INFO] +- org.springframework:spring-test:jar:4.0.4.RELEASE:test
[INFO] |  \- org.springframework:spring-core:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:4.0.4.RELEASE:compile
[INFO] |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  \- org.springframework:spring-beans:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-context:jar:4.0.4.RELEASE:compile
[INFO] |  \- org.springframework:spring-expression:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:4.0.4.RELEASE:compile
[INFO] |  \- org.springframework:spring-tx:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:4.0.4.RELEASE:compile
[INFO] |  \- org.springframework:spring-web:jar:4.0.4.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-core:jar:3.2.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-config:jar:3.2.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-ldap:jar:3.2.3.RELEASE:compile
[INFO] |  \- org.springframework.ldap:spring-ldap-core:jar:1.3.2.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:3.2.3.RELEASE:compile
[INFO] |  +- org.springframework.security:spring-security-acl:jar:3.2.3.RELEASE:compile
[INFO] |  \- org.springframework.security:spring-security-web:jar:3.2.3.RELEASE:compile
[INFO] +- org.springmodules:spring-modules-validation:jar:0.8:compile
[INFO] |  \- rhino:js:jar:1.6R2:compile
[INFO] +- org.subethamail:subethasmtp-wiser:jar:1.2:test
[INFO] |  \- org.subethamail:subethasmtp-smtp:jar:1.2:test
[INFO] +- org.tuckey:urlrewritefilter:jar:3.1.0:compile
[INFO] +- org.webjars:bootstrap:jar:3.0.2:compile
[INFO] +- org.webjars:bootstrap-datepicker:jar:1.2.0:compile
[INFO] +- org.webjars:jquery:jar:1.8.3:compile
[INFO] +- org.webjars:jquery-cookie:jar:1.3.1:compile
[INFO] +- org.webjars:bootswatch:jar:3.0.0:compile
[INFO] +- ro.isdc.wro4j:wro4j-core:jar:1.7.2:compile
[INFO] |  \- org.apache.commons:commons-lang3:jar:3.1:compile
[INFO] \- struts-menu:struts-menu:jar:2.4.3:runtime
[INFO] ------------------------------------------------------------------------

有没有人有想法?

1 个答案:

答案 0 :(得分:1)

SuperEb提出的想法是对的! 我比较了文件&#34; org.eclipse.wst.common.component&#34;中的依赖项列表。与target / myproject / WEB-INF / lib中的依赖项列表。我找到了一个与这里无关的弹簧2.0.3.jar。 弹簧模块验证使用此依赖关系。它应该被mvn排除在玩eclipse时:eclipse因为&#34; *&#34;排除但它不起作用。

最后我换了:

<dependency>
    <groupId>org.springmodules</groupId>
            <artifactId>spring-modules-validation</artifactId>
            <version>${springmodules.validation.version}</version>
            <exclusions>
                <exclusion>
                    <artifactId>*</artifactId>
                    <groupId>org.springframework</groupId>
                </exclusion>
                <exclusion>
                    <artifactId>xml-apis</artifactId>
                    <groupId>xml-apis</groupId>
                </exclusion>
            </exclusions>
        </dependency>

通过

<dependency>
        <groupId>org.springmodules</groupId>
        <artifactId>spring-modules-validation</artifactId>
        <version>${springmodules.validation.version}</version>
        <exclusions>
            <exclusion>
                <artifactId>*</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>spring</artifactId>
                <groupId>org.springframework</groupId>
            </exclusion>
            <exclusion>
                <artifactId>xml-apis</artifactId>
                <groupId>xml-apis</groupId>
            </exclusion>
        </exclusions>
    </dependency>

这可以帮助别人......