olijaun opened a new issue, #322:
URL: https://github.com/apache/pekko-persistence-jdbc/issues/322

   Hi
   
   I wanted to let you know that we had a problem with Oracle 23ai.
   
   We want to switch from Oracle 19 to Oracle 23 ai. The first step was to 
update the Oracle JDBC driver (Implementation-Version: 23.8.0.25.04) but still 
using Oracle 19 database, so that the database can be switched later at any 
time. Unfortunately this does not work.
   
   The problem seems to be that with Oracle 23 there is a new boolean datatype 
(after only 40+ years ;-) ).
   
   This leads to the following error:
   
   ```
   Caused by: Error : 12899, Position : 232, SQL = insert into "EVENT_JOURNAL" 
("DELETED","PERSISTENCE_ID","SEQUENCE_NUMBER","WRITER","WRITE_TIMESTAMP","ADAPTER_MANIFEST","EVENT_PAYLOAD","EVENT_SER_ID","EVENT_SER_MANIFEST","META_PAYLOAD","META_SER_
   ID","META_SER_MANIFEST")  values (:1 ,:2 ,:3 ,:4 ,:5 ,:6 ,:7 ,:8 ,:9 ,:10 
,:11 ,:12 ) RETURNING ORDERING INTO :13  [SQL INCLUDES EXPRESSIONS ADDED BY THE 
ORACLE JDBC DRIVER], Original SQL = insert into "EVENT_JOURNAL" 
("DELETED","PERSISTENCE_ID","SEQUENCE_NUMBER","
   
WRITER","WRITE_TIMESTAMP","ADAPTER_MANIFEST","EVENT_PAYLOAD","EVENT_SER_ID","EVENT_SER_MANIFEST","META_PAYLOAD","META_SER_ID","META_SER_MANIFEST")
  values (?,?,?,?,?,?,?,?,?,?,?,?) RETURNING ORDERING INTO ?, Error Message = 
ORA-12899: value too large for column "AOO_TESTS"."EVENT_JOURNAL"."DELETED" 
(actual: 5, maximum: 1)
   ```
   
   The reasons seems to be that the 'DELETED' column has the datatype CHAR(1). 
In the code there's ([see 
](https://github.com/apache/pekko-persistence-jdbc/blob/5267ef14971d174d0b90cf22842beef7954604bf/core/src/main/scala/org/apache/pekko/persistence/jdbc/journal/dao/JournalTables.scala#L91):
   
   ```
       val deleted: Rep[Boolean] = 
column[Boolean](journalTableCfg.columnNames.deleted, O.Default(false))
   ```
   
   Somehow with the new Oracle Driver it seems that it tries to write "false" 
to the CHAR column which fails, because the column is specified as one byte.
   
   One solution would be to change the column type to "boolean". However this 
would make the sql-Script only usable with Oracle 23. 
   
   We solved it by using NUMBER(1,0) which works with the old and with the new 
driver.
   
   Regards
   Oliver


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to