ошибка инициализации нескольких файлов конфигурации - PullRequest
2 голосов
/ 13 июня 2010

во время запуска инициализации на tomcat, конфигурации:

  1. a webapp/WEB-INF/web.xml, который импортирует yummy-servlet.xml в contextConfigLocation (хотя я знаю, что это не требуется, так как имя сервлетаyummy попытается загрузить yummy-servlet.xml по умолчанию)
  2. webapp/WEB-INF/yummy-servlet.xml, который импортирует spring/applicationContext-hibernate.xml файл
  3. webapp/WEB-INF/spring/applicationContext-hibernate.xml, который импортирует applicationContext-dataSource.xml файл
  4. a webapp/WEB-INF/spring/applicationContext-dataSource.xml

    Я получаю сообщения об ошибках Не удалось импортировать определения bean-компонентов из относительного местоположения, но трассировка стека не очень точно описывает , что такое проблема, я смотрю на них со вчерашнего дня, и я действительно не вижу никаких проблем с файлами

мой web.xml:

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
  <display-name>hello-spring3-RC1</display-name>
<context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/yummy-servlet.xml</param-value>
    </context-param>

    <!--
    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>/WEB-INF/spring/applicationContext-hibernate.xml</param-value>
    </context-param>
    -->
    <!--
        Location of the Log4J config file, for initialization and refresh checks.
        Applied by Log4jConfigListener.
    -->
    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>classpath:log4j.properties</param-value>
    </context-param>


    <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
  <servlet>
     <servlet-name>yummy</servlet-name>
     <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
     <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
     <servlet-name>yummy</servlet-name>
     <url-pattern>*.html</url-pattern>
  </servlet-mapping>

  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
</web-app>

мойyummy-servlet.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-3.0.xsd">

    <import resource="spring/applicationContext-hibernate.xml"/>

    <context:component-scan base-package="com.mine.web.controllers"/>

    <bean id="jspViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
      <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
      <property name="prefix" value="/WEB-INF/jsp/"/>
      <property name="suffix" value=".jsp"/>
    </bean>
</beans>

my applicationContext-hibernate.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context"
        xmlns:tx="http://www.springframework.org/schema/tx"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">


<!-- import the dataSource definition -->
    <import resource="applicationContext-dataSource.xml"/>

<!-- Configurer that replaces ${...} placeholders with values from a properties file -->
    <!-- (in this case, Hibernate-related settings for the sessionFactory definition below) -->
    <context:property-placeholder location="classpath:jdbc.properties"/>
    <context:property-placeholder location="classpath:hibernate.properties"/>

<!-- Hibernate SessionFactory -->
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
            p:dataSource-ref="dataSource" p:mappingResources="hello.hbm.xml">
        <property name="hibernateProperties">
            <props>
                <prop key="hibernate.dialect">${hibernate.dialect}</prop>
                <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
                <prop key="hibernate.generate_statistics">${hibernate.generate_statistics}</prop>
            </props>
        </property>
        <property name="eventListeners">
            <map>
                <entry key="merge">
                    <bean class="org.springframework.orm.hibernate3.support.IdTransferringMergeEventListener"/>
                </entry>
            </map>
        </property>
    </bean>

    <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
     <property name="sessionFactory" ref="sessionFactory" />
    </bean>

    <!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
    <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"
            p:sessionFactory-ref="sessionFactory"/>

    <!-- ========================= BUSINESS OBJECT DEFINITIONS ========================= -->

    <!--
        Activates various annotations to be detected in bean classes:
        Spring's @Required and @Autowired, as well as JSR 250's @Resource.  
    -->
        <context:annotation-config/>

    <!--
        Instruct Spring to perform declarative transaction management
        automatically on annotated classes.
    -->
    <tx:annotation-driven transaction-manager="transactionManager"/>

    <bean id="EntityManager" class="com.mine.persistence.hibernate.HibernateHelloWorldDao"/>
</beans>

и мое applicationContext-dataSource.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:p="http://www.springframework.org/schema/p"
        xmlns:context="http://www.springframework.org/schema/context" 
        xmlns:jdbc="http://www.springframework.org/schema/jdbc"
        xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd">

    <!-- Configurer that replaces ${...} placeholders with values from a properties file -->
    <!-- (in this case, JDBC-related settings for the dataSource definition below) -->
    <context:property-placeholder location="classpath:jdbc.properties"/>
    <context:property-placeholder location="classpath:hibernate.properties"/>       
    <!--
        data source using apache common dbcp pool manager
        <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
            p:driverClassName="${jdbc.driverClassName}" p:url="${jdbc.url}"
            p:username="${jdbc.username}" p:password="${jdbc.password}"/>-->

    <!-- c3p0 pool manager data source -->
    <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
     <property name="driverClass" value="${jdbc.driverClassName}"/>
     <property name="jdbcUrl" value="${jdbc.url}"/>
     <property name="user" value="${jdbc.username}"/>
     <property name="password" value="${jdbc.password}"/>
     <property name="initialPoolSize" value="${hibernate.c3p0.min_size}"/>
     <property name="minPoolSize" value="${hibernate.c3p0.min_size}"/>
     <property name="maxPoolSize" value="${jdbc.maxconn}"/>
     <property name="idleConnectionTestPeriod" value="150"/>
     <property name="acquireIncrement" value="1"/>
     <property name="maxStatements" value="0"/>
     <property name="numHelperThreads" value="5"/>
     </bean>
</beans>

и этоэто трассировка стека:

2010-06-13 12:16:33,526 INFO [org.springframework.web.context.ContextLoader] - <
Root WebApplicationContext: initialization started>
2010-06-13 12:16:33,707 INFO [org.springframework.web.context.support.XmlWebAppl
icationContext] - <Refreshing Root WebApplicationContext: startup date [Sun Jun
13 12:16:33 GMT-05:00 2010]; root of context hierarchy>
2010-06-13 12:16:34,086 INFO [org.springframework.beans.factory.xml.XmlBeanDefin
itionReader] - <Loading XML bean definitions from ServletContext resource [/WEB-
INF/yummy-servlet.xml]>
2010-06-13 12:16:34,378 INFO [org.springframework.beans.factory.xml.XmlBeanDefin
itionReader] - <Loading XML bean definitions from URL [jndi:/localhost/protoweb/
WEB-INF/spring/applicationContext-hibernate.xml]>
2010-06-13 12:16:34,473 INFO [org.springframework.beans.factory.xml.XmlBeanDefin
itionReader] - <Loading XML bean definitions from URL [jndi:/localhost/protoweb/
WEB-INF/spring/applicationContext-dataSource.xml]>
2010-06-13 12:16:35,098 ERROR [org.springframework.web.context.ContextLoader] -
<Context initialization failed>
org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring/applicationContext-hibernate.xml]
Offending resource: ServletContext resource [/WEB-INF/yummy-servlet.xml]; nested
 exception is org.springframework.beans.factory.BeanDefinitionStoreException: Un
expected exception parsing XML document from URL [jndi:/localhost/protoweb/WEB-INF/spring/applicationContext-hibernate.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/Str
ing;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues;
        at org.springframework.beans.factory.parsing.FailFastProblemReporter.err
or(FailFastProblemReporter.java:68)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC
ontext.java:85)
        at org.springframework.beans.factory.parsing.ReaderContext.error(ReaderC
ontext.java:76)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:197)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.parseDefaultElement(DefaultBeanDefinitionDocumentReader.java:146)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:131)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:91)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe
rBeanDefinitions(XmlBeanDefinitionReader.java:475)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:372)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:316)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:284)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:125)
        at org.springframework.web.context.support.XmlWebApplicationContext.load
BeanDefinitions(XmlWebApplicationContext.java:93)
        at org.springframework.context.support.AbstractRefreshableApplicationCon
text.refreshBeanFactory(AbstractRefreshableApplicationContext.java:127)
        at org.springframework.context.support.AbstractApplicationContext.obtain
FreshBeanFactory(AbstractApplicationContext.java:429)
        at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:356)
        at org.springframework.web.context.ContextLoader.createWebApplicationCon
text(ContextLoader.java:270)
        at org.springframework.web.context.ContextLoader.initWebApplicationConte
xt(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitiali
zed(ContextLoaderListener.java:47)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
t.java:3972)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
467)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:77
1)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:546)

        at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:905)

        at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:740
)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:500
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:321)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)

        at org.apache.catalina.core.StandardHost.start(StandardHost.java:785)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)

        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:5
19)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710
)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:581)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexp
ected exception parsing XML document from URL [jndi:/localhost/protoweb/WEB-INF/
spring/applicationContext-hibernate.xml]; nested exception is java.lang.NoSuchMe
thodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String
;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues;
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:394)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:316)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBea
nDefinitions(XmlBeanDefinitionReader.java:284)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at org.springframework.beans.factory.support.AbstractBeanDefinitionReade
r.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:187)
        ... 42 more
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.MutablePropert
yValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/Muta
blePropertyValues;
        at org.springframework.transaction.config.AnnotationDrivenBeanDefinition
Parser.registerTransactionManager(AnnotationDrivenBeanDefinitionParser.java:95)
        at org.springframework.transaction.config.AnnotationDrivenBeanDefinition
Parser.access$0(AnnotationDrivenBeanDefinitionParser.java:94)
        at org.springframework.transaction.config.AnnotationDrivenBeanDefinition
Parser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefi
nitionParser.java:121)
        at org.springframework.transaction.config.AnnotationDrivenBeanDefinition
Parser.parse(AnnotationDrivenBeanDefinitionParser.java:79)
        at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(N
amespaceHandlerSupport.java:72)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseCustomElement(BeanDefinitionParserDelegate.java:1327)
        at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.pa
rseCustomElement(BeanDefinitionParserDelegate.java:1317)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:134)
        at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentRe
ader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:91)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registe
rBeanDefinitions(XmlBeanDefinitionReader.java:475)
        at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadB
eanDefinitions(XmlBeanDefinitionReader.java:372)
        ... 47 more
06/13/2010 12:16:35 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart

РЕДАКТИРОВАТЬ: вот мой pom.xml:

<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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.mine</groupId>
  <artifactId>protoweb</artifactId>
  <packaging>war</packaging>
  <version>1.0-SNAPSHOT</version>
  <name>protoweb Maven Webapp</name>
  <url>http://maven.apache.org</url>
  <repositories>
 <repository>
  <id>springsource maven repo</id>
  <url>http://maven.springframework.org/milestone</url>
 </repository>
</repositories>
<properties>
    <org.springframework.version>3.0.0.RELEASE</org.springframework.version>
</properties>
  <dependencies>
   <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>${org.springframework.version}</version>
 </dependency>

    <!-- required by DAO and transaction management -->
     <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-tx</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>

    <!-- required for hibernate orm integration -->
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-orm</artifactId>
        <version>${org.springframework.version}</version>
    </dependency>


    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    <!--  dependencies related with having jsp -->
    <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.1.2</version>
    <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.15</version>
    </dependency>
    <!-- hibernate3 dependencies -->
    <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-core</artifactId>
       <version>3.3.2.GA</version>
    </dependency>
    <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-annotations</artifactId>
       <version>3.4.0.GA</version>
    </dependency>
    <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-commons-annotations</artifactId>
       <version>3.3.0.ga</version>
    </dependency>
    <dependency>
       <groupId>org.hibernate</groupId>
       <artifactId>hibernate-entitymanager</artifactId>
       <version>3.4.0.GA</version>
    </dependency> 
    <!-- connection pool manager -->
    <dependency>
        <groupId>c3p0</groupId>
        <artifactId>c3p0</artifactId>
        <version>0.9.1</version>
    </dependency>
    <!-- module for c3p0 and hibernate integration -->
    <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-c3p0</artifactId>
      <version>3.3.2.GA</version>
    </dependency>

    <!-- open source microsoft sql server driver -->
    <dependency>
        <groupId>net.sourceforge.jtds</groupId>
        <artifactId>jtds</artifactId>
        <version>1.2</version>
    </dependency>
  </dependencies>
  <build>
    <finalName>protoweb</finalName>
    <plugins>
        <plugin>
        <!--  plugin that allows to deploy the application in tomcat with mvn tomcat:deploy/redeploy -->
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>tomcat-maven-plugin</artifactId>
            <configuration>
                    <configurationDir>tomcat</configurationDir>
                    <url>http://localhost:8080/manager</url>
                    <username>test</username>
                    <password>test</password>
            </configuration>
        </plugin>
    </plugins>
  </build>
</project>

РЕДАКТИРОВАТЬ 2: я сделал mvn clean, а затем при выполнении mvn tomcat: redeploy я получаю эту ошибку:

[INFO] Preparing tomcat:redeploy
[INFO] [resources:resources]
[WARNING] Using platform encoding (Cp1252 actually) to copy filtered resources, i.e. build
 is platform dependent!
[INFO] Copying 5 resources
[WARNING] POM for 'javax.activation:activation:pom:1.1:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'javax.jms:jms:pom:1.1:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'com.sun.jdmk:jmxtools:pom:1.2.1:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'com.sun.jmx:jmxri:pom:1.2.1:compile' is invalid.

Its dependencies (if any) will NOT be available to the current build.
[INFO] [compiler:compile]
[INFO] Compiling 5 source files to C:\Users\mineq\maven_testing\protoweb\target\classes

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure

error: error reading C:\Users\mineq\.m2\repository\javax\activation\activation\1.1\acti
vation-1.1.jar; error in opening zip file
error: error reading C:\Users\mineq\.m2\repository\javax\jms\jms\1.1\jms-1.1.jar; error
 in opening zip file
error: error reading C:\Users\mineq\.m2\repository\com\sun\jdmk\jmxtools\1.2.1\jmxtools
-1.2.1.jar; error in opening zip file
error: error reading C:\Users\mineq\.m2\repository\com\sun\jmx\jmxri\1.2.1\jmxri-1.2.1.
jar; error in opening zip file

Ответы [ 2 ]

1 голос
/ 13 июня 2010

java.lang.NoSuchMethodError обычно говорит о несовместимости версий. Поскольку org.springframework.beans.MutablePropert yValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/Muta blePropertyValues; был добавлен в Spring 3.0, вы, вероятно, смешали файлы Spring 3.0 и pre-3.0.

0 голосов
/ 14 июня 2010

Ваш pom.xml выглядит нормально, и нет никаких пружинных зависимостей, кроме 3.0.0.RELEASE, как показано dependency:tree, вставленным ниже:

[INFO] [dependency:tree {execution: default-cli}]
[INFO] com.mine:protoweb:war:1.0-SNAPSHOT
[INFO] +- org.springframework:spring-webmvc:jar:3.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-asm:jar:3.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-beans:jar:3.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-context:jar:3.0.0.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-expression:jar:3.0.0.RELEASE:compile
[INFO] |  +- org.springframework:spring-core:jar:3.0.0.RELEASE:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] |  \- org.springframework:spring-web:jar:3.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:3.0.0.RELEASE:compile
[INFO] |  +- aopalliance:aopalliance:jar:1.0:compile
[INFO] |  \- org.springframework:spring-aop:jar:3.0.0.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:3.0.0.RELEASE:compile
[INFO] |  \- org.springframework:spring-jdbc:jar:3.0.0.RELEASE:compile
[INFO] +- junit:junit:jar:3.8.1:test
[INFO] +- javax.servlet:jstl:jar:1.1.2:compile
[INFO] +- log4j:log4j:jar:1.2.15:compile
[INFO] |  +- javax.mail:mail:jar:1.4:compile
[INFO] |  |  \- javax.activation:activation:jar:1.1:compile
[INFO] |  +- javax.jms:jms:jar:1.1:compile
[INFO] |  +- com.sun.jdmk:jmxtools:jar:1.2.1:compile
[INFO] |  \- com.sun.jmx:jmxri:jar:1.2.1:compile
[INFO] +- org.hibernate:hibernate-core:jar:3.3.2.GA:compile
[INFO] |  +- antlr:antlr:jar:2.7.6:compile
[INFO] |  +- commons-collections:commons-collections:jar:3.1:compile
[INFO] |  +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |  |  \- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] |  +- javax.transaction:jta:jar:1.1:compile
[INFO] |  \- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] +- org.hibernate:hibernate-annotations:jar:3.4.0.GA:compile
[INFO] |  \- org.hibernate:ejb3-persistence:jar:1.0.2.GA:compile
[INFO] +- org.hibernate:hibernate-commons-annotations:jar:3.3.0.ga:compile
[INFO] |  +- org.hibernate:hibernate:jar:3.2.1.ga:compile
[INFO] |  |  +- net.sf.ehcache:ehcache:jar:1.2.3:compile
[INFO] |  |  +- asm:asm-attrs:jar:1.5.3:compile
[INFO] |  |  +- cglib:cglib:jar:2.1_3:compile
[INFO] |  |  \- asm:asm:jar:1.5.3:compile
[INFO] |  \- javax.persistence:persistence-api:jar:1.0:compile
[INFO] +- org.hibernate:hibernate-entitymanager:jar:3.4.0.GA:compile
[INFO] |  \- javassist:javassist:jar:3.4.GA:compile
[INFO] +- c3p0:c3p0:jar:0.9.1:compile
[INFO] +- org.hibernate:hibernate-c3p0:jar:3.3.2.GA:compile
[INFO] \- net.sourceforge.jtds:jtds:jar:1.2:compile

Однако java.lang.NoSuchMethodError явно пахнетпроблема с загрузкой классов и каким-то образом у вас должно быть несколько весенних банок где-нибудь.Вы поменяли весеннюю версию, не выполнив mvn clean?Или, может быть, в вашем $CATALINA_HOME/lib ??

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...