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

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #22925  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
 #23044  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', '', '', '');
 #23054  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
 #23075  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.
 #23094  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
 #23114  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.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.