jmix icon indicating copy to clipboard operation
jmix copied to clipboard

OffsetDateTime does not work for Oracle

Open dtaimanov opened this issue 11 months ago • 0 comments

Environment

Jmix version: 2.x

Bug Description

  1. Wrong Oracle10Platform.java has been used in io.jmix.eclipselink.impl.dbms.JmixOraclePlatform Should be org.eclipse.persistence.platform.database.oracle.Oracle10Platform instead of org.eclipse.persistence.platform.database.Oracle10Platform

Steps To Reproduce

Steps to reproduce:

  1. Create a project with oracle db and field with type OffsetDateTime.
  2. Run project, edit entity, set value to this field, save. ER: entity saved without any issues AR: Exception
ConversionException: 
Exception Description: The object [oracle.sql.TIMESTAMPTZ@4a924d17], of class [class oracle.sql.TIMESTAMPTZ], from mapping /*...*/ , could not be converted to [class java.time.OffsetDateTime].

Additionally

  1. Check ojdbc driver version (8 or 11) (studio part)
  2. Check timezone conversion for our oracle test server.(+1 hour in db after save)
  3. dig into org.eclipse.persistence.platform.database.oracle.Oracle10Platform and org.eclipse.persistence.platform.database.Oracle10Platform platform differences
  4. Check other time/date datatypes
  5. Maybe use a newer platform (11+ ?)

dtaimanov avatar Mar 21 '24 10:03 dtaimanov