Jpa facet show 2 datasources
Hi, I have a problem using small window using spring jpa persistence. Shows two datasources when in fact I have one.
I am using xml configuration for the context and persistence.
It's a maven project with web ,spring and jpa facet enabled. Attached image
There's something wrong in my settings?
mvc-context.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:beans="http://www.springframework.org/schema/beans" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd"> <!--<context:annotation-config/>--> <context:component-scan base-package="com.matpala.webtk"/> <!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --> <mvc:resources mapping="/resources/**" location="/resources/" /> <!-- Resolves views selected for rendering by @controllers to .jsp resources in the /WEB-INF/views directory --> <bean > <property name="prefix" value="/WEB-INF/views/" /> <property name="suffix" value=".jsp" /> </bean> <mvc:annotation-driven conversion-service="conversionService"/> <bean id="conversionService" > <property name="converters"> <util:list> <ref bean="stringToProvinciaConverter"/> <ref bean="stringToIProvinciaConverter"/> <ref bean="provinciaConverter"/> </util:list> </property> </bean> <jpa:repositories base-package="com.matpala.webtk"/> <bean id="entityManagerFactory" > <property name="persistenceUnitName" value="jpaPersistenceUnit"/> <property name="jpaVendorAdapter"> <bean /> </property> </bean> <bean id="transactionManager" > <property name="entityManagerFactory" ref="entityManagerFactory" /> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> <!-- Soporte para internacionalizacion !--> <bean id="messageSource" > <property name="basename" value="messages"/> </bean> </beans>
persistence.xml
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0"> <persistence-unit name="jpaPersistenceUnit" transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <properties> <property name="hibernate.hbm2ddl.auto" value="create-drop"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/> <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbc.JDBCDriver"/> <property name="hibernate.connection.url" value="jdbc:hsqldb:mem:webtk;encoding=UTF-8"/> <property name="hibernate.connection.username" value="sa"/> <property name="hibernate.connection.password" value=""/> <property name="hibernate.connection.pool_size" value="8"/> <property name="hibernate.format_sql" value="true"/> <property name="hibernate.connection.CharSet" value="utf8"/> <property name="hibernate.connection.characterEncoding" value="utf8"/> <property name="hibernate.connection.useUnicode" value="true"/> </properties> </persistence-unit> </persistence>
Attachment(s):
persistence.jpg
请先登录再写评论。