![]() |
Модераторы: LSD, AntonSaburov |
![]() ![]() ![]() |
|
neo03 |
|
|||
Новичок Профиль Группа: Участник Сообщений: 36 Регистрация: 8.6.2011 Репутация: нет Всего: нет |
Привет всем! Читаю книгу Prospring3 Кларенса Хо и Роба Харропа. Дошел до главы16. Там говрится про использование удаленной обработки и рассматривается проект Spring MVC Project. В конфигурационном файле datasource-tx-jpa.xml когда вставляю тег <jpa:repositories base-package="com.apress.prospring3.ch16.repository" entity-manager-factory-ref="emf" transaction-manager-ref="transactionManager"/>, то появляется красная точка и он говорит, что произошел конфликт бинов. Все зависимости, которые есть в книге, я подключил.Если сталкивался, подскажите. Спасибо всем. Вот файл datasource-tx-jpa.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:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:tx="http://www.springframework.org/schema/tx" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/bean...g-beans-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/cont...context-3.1.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc...ng-jdbc-3.1.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data...ing-jpa-1.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/s...p;quot;> <jdbc:embedded-database id="dataSource" type="H2"> <jdbc:script location="classpath:schema.sql"/> <jdbc:script location="classpath:test-data.sql"/> </jdbc:embedded-database> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="emf"/> </bean> <tx:annotation-driven transaction-manager="transactionManager" /> <bean id="emf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="jpaVendorAdapter"> <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" /> </property> <property name="packagesToScan" value="com.apress.prospring3.ch16.domain"/> <property name="jpaProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.H2Dialect</prop> <prop key="hibernate.max_fetch_depth">3</prop> <prop key="hibernate.jdbc.fetch_size">50</prop> <prop key="hibernate.jdbc.batch_size">10</prop> <prop key="hibernate.show_sql">true</prop> </props> </property> </bean> <context:annotation-config/> <jpa:repositories base-package="com.apress.prospring3.ch16.repository" entity-manager-factory-ref="emf" transaction-manager-ref="transactionManager"/> </beans> Вот сообщение: Multiple annotations found at this line: - Referenced file contains errors (jar:file:/home/vasiliy/.m2/repository/org/springframework/spring-beans/3.1.1.RELEASE/spring-beans-3.1.1.RELEASE.jar!/org/springframework/beans/factory/xml/ spring-beans-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (jar:file:/home/vasiliy/.m2/repository/org/springframework/spring-context/3.1.1.RELEASE/spring-context-3.1.1.RELEASE.jar!/org/springframework/context/config/ spring-context-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." - Referenced file contains errors (jar:file:/home/vasiliy/.m2/repository/org/springframework/spring-beans/3.1.1.RELEASE/spring-beans-3.1.1.RELEASE.jar!/org/springframework/beans/factory/xml/ spring-tool-3.0.xsd). For more information, right click on the message in the Problems View and select "Show Details..." Это сообщение отредактировал(а) neo03 - 31.1.2013, 11:09 |
|||
|
||||
neo03 |
|
|||
Новичок Профиль Группа: Участник Сообщений: 36 Регистрация: 8.6.2011 Репутация: нет Всего: нет |
Уже решил. Там вместо бина spring-data-jpa версии 1.0.1.RELEASE нужно поставить версию 1.2.0.RELEASE
|
|||
|
||||
![]() ![]() ![]() |
Правила форума "Java" | |
|
Если Вам помогли, и атмосфера форума Вам понравилась, то заходите к нам чаще! С уважением, LSD, AntonSaburov, powerOn, tux. |
0 Пользователей читают эту тему (0 Гостей и 0 Скрытых Пользователей) | |
0 Пользователей: | |
« Предыдущая тема | Java tools & IDE's | Следующая тема » |
|
По вопросам размещения рекламы пишите на vladimir(sobaka)vingrad.ru
Отказ от ответственности Powered by Invision Power Board(R) 1.3 © 2003 IPS, Inc. |