com.servoy.j2db.dataprocessing.DataException

Forum to discuss the Web client version of Servoy.

com.servoy.j2db.dataprocessing.DataException

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.
forms[frmObject].foundset.newRecord();
databaseManager.saveData();
dekumar2
 
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

Image
User avatar
mboegem
 
Posts: 1382
Joined: Sun Oct 14, 2007 1:34 pm
Location: Hoofddorp, The Netherlands

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
kwpsd
 
Posts: 566
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