Forum to discuss the Web client version of Servoy.


Postby dekumar2 » Fri Jun 02, 2017 2:54 pm

Hi all,
I am getting com.servoy.j2db.dataprocessing.DataException: ERROR: null value in column "jobkey" violates not-null constraint error while saving data by given code please help me.
Posts: 8
Joined: Thu May 11, 2017 6:59 am

Re: com.servoy.j2db.dataprocessing.DataException

Postby mboegem » Fri Jun 02, 2017 5:27 pm

Hi dekumar2,

The error seems pretty clear to me.
You seem to have a column 'jobkey' in the table attached to the formname set in frmObject.
This column does not allow 'null' values (defined in the DB).

While creating a new record, the value of this column is probably null.
So when saving the data, the DB will return an error to Servoy, explaining the column can't have this null value.

In case this 'jobkey' column is your primary key, you should find out why the primary key is not generated.
By default Servoy is generating the key (servoy sequence), but you could choose to have this DB-managed or have Servoy generate a UUID.
I can't provide a straighforward solution/answer for that.

Hope this helps.
Marc Boegem
Solutiative / JBS Group, Partner
• Servoy Certified Developer
• Servoy Valued Professional
• Freelance SAN Developer

User avatar
Posts: 1578
Joined: Sun Oct 14, 2007 1:34 pm
Location: Amsterdam

Re: com.servoy.j2db.dataprocessing.DataException

Postby kwpsd » Fri Jun 02, 2017 5:31 pm

It looks like you are attempting to write a null value to column 'jobkey' which has been set to not allow null values. Check the table definition for this column. If 'jobkey' is the primary key for this table, it must not contain null values.

I hope this helps!
Kim W. Premuda
San Diego, CA USA
User avatar
Posts: 653
Joined: Sat Jul 28, 2007 6:59 pm
Location: San Diego, CA USA

Return to Servoy Web Client

Who is online

Users browsing this forum: No registered users and 1 guest