我的JPA抛出表或视图不存在错误

时间:2013-09-26 06:34:50

标签: jpa eclipselink

我有奇怪的问题。我使用weblogic服务器创建了读写eclipse链接数据源。我已经在像这样的持久性单元中定义了它们

<persistence-unit name="UnitRead" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/READ</jta-data-source>
<class>org.model.Employee</class>
<class>org.model.Department</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes>
<properties>
<property name="eclipselink.target-server" value="WebLogic_10" />
<!-- Logging level is set to INFO, Need to change in Production -->
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.persistence-context.flush-mode" value="COMMIT" />
property name="eclipselink.persistence-context.close-on-commit" value="true" />
<property name="eclipselink.cache.shared.default" value="false" />      
</properties>
</persistence-unit> 
<persistence-unit name="UnitWRITE" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/WRITE</jta-data-source>
<class>org.model.Employee</class>
<class>org.model.Department</class>
<exclude-unlisted-classes>true</exclude-unlisted-classes> 
<properties>
<property name="eclipselink.target-server" value="WebLogic_10" />
<!-- Logging level is set to INFO, Need to change in Production -->
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.persistence-context.flush-mode" value="COMMIT" />
property name="eclipselink.persistence-context.close-on-commit" value="true" />
<property name="eclipselink.cache.shared.default" value="false" />      
</properties>
</persistence-unit>

这里的问题是,如果我给jdbc / read代替写,那么它正在工作,否则我得到表或视图不会退出。

非常奇怪的问题。

0 个答案:

没有答案