Skip to end of metadata
Go to start of metadata

JID and PostgreSQL

JID and its JobScheduler jobs (/sos/dailyschedule/CheckDaysSchedule and /sos/dailyschedule/CreateDaysSchedule) use Hibernate for database transactions.

If you use the PostgreSQL DBMS then you might face the following error due to a problem between Hibernate and PostgreSQL:

ERROR [main] (JDBCExceptionReporter.java:234) - Unzulässiger Wert für den Typ int : \037\213\010\000\000\000\000\000\000\003m\217\
313\212\302@\020E\367~E-\023\230\264\325\025|\005\\\210#\014"\263P\\\3110\264\246\214\001\247K\252[\305\277\267\027\003\272\310\24
6\270\\\270\207S\204\226\012\213\205%\260T\225X!\032\244!\354Z\177\224\037\000\330\314\277\026\237\333\325b]L\354\030 D\027y\232\2
56\306\3267\220\2718\365|c\315{\324A\032\021\276H\306\230p\0219\263\376^T\016\034B\326\265\262\246\034\014^\253\021\001\253\212\00
6\310<\337+\314?\240\234\020\334\235\372$\360\337\002\346p\224\253\257\273y\3037\213\245\354\341\3335\255\204~\212\233\303\211\353
kRZI3\363\356\374\010\254\020Y\377Z\237\376\254M\357\011G\272\273\363 \001\000\000.

The reason is, that the Hibernate dialect for PosgreSQL does not handle the byte[] type with @LOB annotation correctly. For this, whe added the following code modification to JobScheduler:

All DBMS:

 private byte[] log;
 
 @Lob
 @Column(name="`LOG`", nullable=true)
 public byte[] getLog() {
   return this.log;
 }


PostgreSql DBMS:

 private byte[] log; 
 
 @Column(name="`LOG`", nullable=true)
 public byte[] getLog() {
   return this.log;
 } 

 

We provided a workaround:

 ...
 [java]
 class_path = ${SCHEDULER_HOME}/lib/com.sos.hibernate_pgsql.jar;${SCHEDULER_HOME}/lib/*.jar;${SCHEDULER_HOME}/lib/hibernate/*.jar;${SCHEDULER_HOME}/lib/jetty_ext/*.jar ...

Modifications to the file factory.ini take effect after restarting the JobScheduler.

 

Write a comment…