CMDBuild Forum

Error creating any new entry

Hello,

I have been able to install the application and the database (Version 3.4.1). Everything seems fine, I am able to log in, see the different examples, the admin part works… But when I try to create a new record in any class, or create a new class I get the following error related to the CurrentId field in the database (Hidden attribute in the interface).

In this example I fill all the fields in the GUI and the following happens (It happens in any class).

An example trying to create a new registry in “Office”:

org.cmdbuild.dao.DaoException: error executing insert for entry = CardImpl{id=null, code=test, type=Office}, caused by: org.springframework.dao.DataIntegrityViolationException: StatementCallback; ERROR: null value in column “CurrentId” violates not-null constraint
Detail: Failing row contains (7266, “Office”, test, test, null, null, 2023-05-21 10:51:14.842814+00, null, null, null, null, test, 116).; nested exception is org.postgresql.util.PSQLException: ERROR: null value in column “CurrentId” violates not-null constraint
Detail: Failing row contains (7266, “Office”, test, test, null, null, 2023-05-21 10:51:14.842814+00, null, null, null, null, test, 116)., caused by: org.postgresql.util.PSQLException: ERROR: null value in column “CurrentId” violates not-null constraint
Detail: Failing row contains (7266, “Office”, test, test, null, null, 2023-05-21 10:51:14.842814+00, null, null, null, null, test, 116).

I don´t know what to do, i have tryied to install the db again with same results. Please help!

1 Like

I’m having the same issue.

A new column has been inserted into all/most? of the tables, I think by the patch 3.0.0-07b_class_structure_upgrade.sql. It is set as NOT NULL, but some of these columns have nothing but nulls present. I’ve noticed that the demo database values for CurrentId seem to match the Id column values, so is the solution to copy Id values into CurrentId? I’m wondering if these changes relate to the multi-tenant changes?

Hth.

1 Like

What postgresql version are you using? I got this error when I tried a too old version. cmdbuild 3.4.1 requires postgres 10-12. A user reported solving this by using postgres 13. Similar bugreport on the docker repo:

https://github.com/itmicus/cmdbuild_docker/issues/38