简体   繁体   English

Eclipselink将错误的数据库平台

[英]Eclipselink going to wrong database platform

While trying to run a JPA application, I get: 尝试运行JPA应用程序时,我得到:

[EL Fine]: 2014-07-09   16:55:52.532--Thread(Thread[http-bio-8080-exec-6,5,main])--Detected database platform: org.eclipse.persistence.platform.database.HSQLPlatform

Which is NOT the correct platform. 这不是正确的平台。 (should be an Oracle thin client). (应该是Oracle瘦客户端)。 The same project when checked out on a different machine works fine. 在其他计算机上签出时,同一项目可以正常工作。 Only difference that we can detect is the jdk version (13 versus 60 on mine). 我们可以检测到的唯一区别是jdk版本(我的版本是13 vs 60)。

My Persistance.xml looks like:


<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" 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">
  <persistence-unit name="JPA_DatabasePU" transaction-type="RESOURCE_LOCAL">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <non-jta-data-source>wellsDB</non-jta-data-source>
    <class>my.domain.jpaDatabase.entities.Fred.Feature</class>
    <properties>
      <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.OracleDriver"/>
      <property name="javax.persistence.jdbc.url"     value="jdbc:oracle:thin:user@//db.domain.my:1521/inst"/>
      <property name="javax.persistence.jdbc.user" value="username"/>
      <property name="javax.persistence.jdbc.password" value="password"/>
      <property name="eclipselink.logging.level" value="FINEST"/>
    </properties>
  </persistence-unit>
</persistence>

What am I missing?? 我想念什么?

您可以尝试设置目标数据库吗?

<property name="eclipselink.target-database" value="Oracle"/>

Well the answer was to replace the Tomee 1.5 install with a fresh install of Tomee 1.6. 答案是将Tomee 1.5安装替换为全新的Tomee 1.6安装。 I cant see difference in the conf files but there you are. 我看不到conf文件中的差异,但是您在那里。 From my point of view, the important thing is that this fixed the issue. 从我的角度来看,重要的是这解决了这个问题。 The created war deploys without a problem on the production Tomee as well. 所产生的战争也毫无问题地部署在生产Tomee上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM