Mam problem z ustawieniami projektu springa.
Pisze project maven'owy. Plik konfiguracyjny applicationContext.xml, wygląda mniej więcej tak
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
">
<context:annotation-config/>
<context:property-placeholder location="classpath*:crudentials.properties" />
<context:component-scan base-package="com.cooperation.db.properties"/>
<!--Hibertnate-->
<jee:jndi-lookup id="dataSource" jndi-name="jdbc/mathcoop" resource-ref="true"/>
<util:property name="hibernateProperties">
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5InnoDBDialect</prop>
<prop key="hibernate.show_sql">false</prop>
</util:property>
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="packagesToScan" value="com.cooperation.db.model"/>
<property name="hibernateProperties" ref="hibernateProperties"/>
</bean>
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="sessionFactory"/>
</bean>
<tx:annotation-driven/>
</beans>
W logach tomcata otrzymuję:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 39 in XML document from ServletContext resource [/WEB-INF/conf/applicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: ...; columnNumber: ...; cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'util:property'
Wydaje mi się, że problem jest z "hibernateProperties". Niby mam klasę "MySQL5InnoDBDialect" znajdującą się w jarce hibernate-3.2.6.ga.jar, ale spring tego nie widzi. Czy możliwe, że mam jakąś niezgodność wersji springa z wersją hibernata?