Performing Action Results in 'Column ID Cannot be Null'
Symptoms
When performing any action in JIRA, an error is returned. Messages like the following appear in the logs:
org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:ChangeGroup][id,null][author,jcurry][created,2010-02-22 12:00:00.000][issue,10001] (SQL Exception while executing the following:INSERT INTO changegroup (ID, issueid, AUTHOR, CREATED) VALUES (?, ?, ?, ?) (Column 'ID' cannot be null))
Cause
Database Communitcation:
- The connection between JIRA and the MySQL database has been closed.
JIRA running into datatype errors
2013-09-04 14:54:01,589 http-8080-21 WARN anonymous 894x76552x1 - 172.22.50.64 /rpc/soap/jirasoapservice-v2 [ofbiz.core.entity.SequenceUtil] '2.14748369E9' in column '1' is outside valid range for the datatype INTEGER.
2013-09-04 14:54:01,589 http-8080-21 ERROR anonymous 894x76552x1 - 172.22.50.64 /rpc/soap/jirasoapservice-v2 [ofbiz.core.entity.SequenceUtil] [SequenceUtil.SequenceBank.getNextSeqId] Fill bank failed, returning null
- Basically JIRA assigns the unique IDs that are stored in the database. In the above error, the ID count had reached an extremely high number, resulting into datatype errors.
Resolution
If the cause is due to database communication issues:
In order to prevent this problem from happening in future, add a validation query which JIRA will use when communicating with its database. For more details on how to set the validation query, see:
- Surviving Connection Closures (in the documentation for JIRA 4.4.x and later) or
- Surviving Connection Closures (in the documentation for JIRA 4.3.x and earlier).
If the cause is due to JIRA running into datatype errors:
The ID counter will need to be reset, but this may be difficult depending on the table. Please create a ticket with Atlassian Support