Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] binding to wrong database platform.(default instead my one). (repost with subscription)

As I mentioned on your StackOverflow posting, this is somehow related to the TomEE default datasource. I'd wager a guess that TomEE is giving you a default datasource and EclipseLink is ignoring your javax.persistence.jdbc properties.


On Wed, Jul 9, 2014 at 4:15 PM, scaddenp <p.scadden@xxxxxxxxxx> wrote:
While trying to run a JPA application, I get:
[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). 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).

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>myDB</non-jta-data-source>
    <class>.. etc..</class>
       etc
    <properties>
      <property name="javax.persistence.jdbc.driver"
value="oracle.jdbc.OracleDriver"/>
      <property name="javax.persistence.jdbc.url"
value="jdbc:oracle:thin:myuser@//myserver:1521/myinstance"/>
      <property name="javax.persistence.jdbc.user" value="usrname"/>
      <property name="javax.persistence.jdbc.password" value="pwd"/>
      <property name="eclipselink.logging.level" value="FINEST"/>
    </properties>
  </persistence-unit>
</persistence>
What am I missing??





--
View this message in context: http://eclipse.1072660.n5.nabble.com/binding-to-wrong-database-platform-default-instead-my-one-repost-with-subscription-tp168558.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipselink-users



--
Rick Curtis

Back to the top