Błąd spring.xml

0

Cześć, wyskakuje mi błąd i nie mogę sobie z nim poradzić. Proszę o pomoc

org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/zzz-servlet.xml]; nested exception is java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues;
Caused by: java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues;
<?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:c="http://www.springframework.org/schema/p"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:util="http://www.springframework.org/schema/util"
       xmlns:jee="http://www.springframework.org/schema/jee"
       xmlns:tx="http://www.springframework.org/schema/tx"
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
                           http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
                           http://www.springframework.org/schema/context 
                           http://www.springframework.org/schema/context/spring-context-4.0.xsd
                           http://www.springframework.org/schema/mvc
                           http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
                           http://www.springframework.org/schema/util 
                           http://www.springframework.org/schema/util/spring-util-4.0.xsd
                           http://www.springframework.org/schema/jee
                           http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
                           http://www.springframework.org/schema/tx
                           http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">

   
    
      <bean 
         class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping" />
 
	
	<bean id="viewResolver"
    	      class="org.springframework.web.servlet.view.InternalResourceViewResolver" >
              <property name="prefix">
                  <value>/WEB-INF/view/</value>
               </property>
              <property name="suffix">
                 <value>.jsp</value>
              </property>
        </bean>
 
            
       <util:properties id="hibernateProperties">
            <prop key="hibernate.dialect">
                org.hibernate.dialect.MySQL5InnoDBDialect
            </prop>
            <prop key="hibernate.show_sql">false</prop>
        </util:properties>  
        
        <bean id="sesionFactory"
        class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
        p:dataSource-ref="dataSource"
        p:packagesToScan="com.xxx.aaa"
        p:hibernateProperties-ref="hibernateProperties"/>
        
        <bean id="transactionManager"
        class="org.springframework.orm.hibernate3.HibernateTransactionManager"
        p:sessionFactory-ref="sessionFactory"/>
        
      
        <context:component-scan
        base-package="com.senfino.yodo.service"/>
        
        <context:property-placeholder
         location="classpath:jdbc.properties"/>
        
        <bean id="dataSource" 
                 class="org.springframework.jdbc.datasource.DriverManagerDataSource">
                <property name="driverClassName" value="${jdbc.driverClassName}" />
                <property name="url" value="${jdbc.url}" />
                <property name="username" value="${jdbc.username}" />
                <property name="password" value="${jdbc.password}" />
        </bean>
       
       <bean class="org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate"
       c:dataSource-ref="dataSource"/>
       <context:component-scan base-package="com.xxx.aaa"/>
        
        
        <bean 
             class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
                <property name="location">
                        <value>database.properties</value>
                </property>
        </bean>
 
</beans>
    

Przepraszam złe oanczenie kodu w kreatorze wiadomosci

0

Gdzie ten błąd ci pokazuje? W którym miejscu tego xmla? I czemu wkleiłeś tylko kawałek?

0

nie wiem w którym miejscu, jedynie blad w logach jest. Ten xml nie miał byc rozdzielony tym "zzzz-servlet.xml " jest to jedna całość

0

Plik wygląda ok, więc zapewne używasz jakiegoś archaicznego Springa który tego nie wspiera. Wiesz że mamy już Spring 4? Czemu używasz jakiejś wersji 2.X?

1 użytkowników online, w tym zalogowanych: 0, gości: 1