Hibernate Error from WriteToDB Smart Service in a process even though new row is successfully inserted to the underlying Oracle Table when a service account ( non default schema) is used for DB access

Issue

 

Hibernate Error from WriteToDB Smart Service in a process even though new row is successfully inserted to the underlying Oracle Table. There is no underlying oracle error.

Error  - ( I have renamed CDT & Datstore & JavaClass Names  )

 

An error occurred while trying to write to the entity "PARENTCDT" [id=5933241b-7d12-4cd4-a2e3-6854e5d4b895@2558, type=PARENTCDT(id=4480)] (data store: DATASOURCENAME). Details: org.hibernate.id.IdentifierGenerationException: ids for this class must be manually assigned before calling save(): ParentClassNameDT8243 Data: TypedValue[it=4480,v={<null>,,,,,,<null>,<null>,<null>,<null>,,,,,,,<null>,<null>,<null>,,,,1,<null>,,<null>,,,,,<null>,,<null>,<null>,<null>,<null>,,<null>,<null>,<null>,,<null>,<null>,<null>,,<null>,<null>,<null>,}]

Details

 

This error started appearing in our PRE environment where for the first time we use service account user ( non default schema)  to access the default DB schema. The code works fine in other environments where Appian is connected directly to default schema.

 

I have created public synonyms for all the tables and sequences in the default schema so that  service account user/schema (non default DB schema ) can access them. Probably , hibernate has some problem in seeing the sequences . Or this is case of hibernate inconsistency due to nested CDTs. This is just my thoughts on the issue, in case it is helpful.

CDT Annotations

Parent CDT 

Primary key -    @Id

Relationship to Child CDT - @OneToOne(cascade=CascadeType.ALL)

Child CDT

Primary key - @Id

 

Oracle Version

Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production

Version 19.3.0.0.0

 

Appian Cloud Instance Version

21.2

  Discussion posts and replies are publicly visible