Page 1 of 1

ERROR: null value in column "amd_id" violates not-null const

PostPosted:Thu May 09, 2013 8:09 am
by armber
Hi,
using OpenKM Community 6.2.4-DEV (Build 8051) when I attempt to enable Automation executing the JDBC statement (specified at Guide page http://wiki.openkm.com/index.php/Enable_automation )
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.validation.PathContains', 'PathContains', 'validation', 
'text', 'okm:folder', 'String', '', '', '');
I receive error "ERROR: null value in column "amd_id" violates not-null constraint".
Can someone provide clues about how overcome this problem?
Many thanks,
Armando

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Fri May 10, 2013 7:20 am
by armber
Hi,
I might think to explicitly set "amd_id" value, but I am not sure it is safe for system integrity...
Any help?
Many thanks,
Armando

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Sat May 11, 2013 9:57 am
by jllort
Which database are you using ? amb_id in major databases is set automatically in others not.

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Mon May 13, 2013 8:29 am
by armber
Hi jllort,
database we use is PostgreSQL 9.1.

Armando

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Wed May 15, 2013 5:47 am
by jllort
Try with it:
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_ID, AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01) VALUES (4, 'post', 'com.openkm.automation.validation.PathContains', 'PathContains', 'validation', 'text', 'okm:folder', 'String', '', '', '');

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Wed May 15, 2013 9:52 am
by armber
jllort,
many thanks for your feedback.

I see you are suggesting to set "4" as AMD_ID value.
The preliminary (JDBC) check I ececute
Code: Select all
select * from OKM_AUTO_METADATA;
returns no rows
Is this correct as initial OpenKM system status?

Please, kindly confirm how the statement to enable automation validation should be executed
and how the subsequent statement to enable automation actions should be, if it is the case, modified:
Code: Select all
INSERT INTO OKM_AUTO_METADATA (AMD_AT, AMD_CLASS_NAME, AMD_NAME, AMD_GROUP, AMD_TYPE00, AMD_SRC00, AMD_DESC00, AMD_TYPE01, AMD_SRC01, AMD_DESC01 ) VALUES ('post','com.openkm.automation.action.ExecuteScripting', 'ExecuteScripting', 'action', 'textarea', '', 'Script', '', '', '');


Many thanks,
Armando

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Thu May 16, 2013 9:30 pm
by jllort
I put number four but can be other. Some database will create automatically AMD_ID others not. I think the second is your case, simply add some number, there's no relevant the number which will be used as primary key in your installation.

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Fri May 17, 2013 2:50 pm
by armber
Hi jillort,
thank you for your feedback.
I was able to successfully insert the two rows of definitions in the OKM_AUTO_METADATA table providing explicitly the values for the "AMD_ID" field as you suggested. This, thus, resolves the question I raised.

Frankly speaking, since this error seems related to some fault or incompleteness in the database configuration performed by the installation script in our PostgreSQL 9.1 RDBMS, I would appreciate a comment from you about whether we can consider PostgreSQL 9.1 completely compliant with OpenKM or we should better choose a different RDBMS.
We use PostgreSQL for other applications; however, if it is advisable, we can use a different RDBMS for OpenKM.

Many thanks,
Armando

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Mon May 20, 2013 8:20 am
by jllort
For your peacifull state. We have a customer with one milion and half stored in PostgresSQL. It's full compliance. I'm not sure if it's on latest 8.x version or in 9.x, but I think that should not be a problem, any time I upgrade from lower version to upper I have not got problems.

Re: ERROR: null value in column "amd_id" violates not-null c

PostPosted:Tue May 21, 2013 6:35 am
by armber
jllort,
your statements are definitely reassuring about use of PostgreSQL.
Many thanks for your help and for your time,
Armando