GenericEntityException on startup with MS-SQL database in Jira server
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Symptoms
JIRA startup fails.
A message similar to the following appears in the
atlassian-jira.log
:
1
2
3
4
5
6
7
8
org.ofbiz.core.entity.GenericEntityException: while inserting: [GenericEntity:OSPropertyEntry][id,null][entityId,1][propertyKey,webwork.i18n.encoding][type,5][entityName,jira.properties] (SQL Exception while executing the following:INSERT INTO jiraschema.propertyentry (ID, ENTITY_NAME, ENTITY_ID, PROPERTY_KEY, propertytype) VALUES (?, ?, ?, ?, ?) (Cannot insert the value NULL into column 'ID', table 'JIRA.jiraschema.propertyentry'; column does not allow nulls. INSERT fails.))
at org.ofbiz.core.entity.GenericDAO.singleInsert(GenericDAO.java:200)
at org.ofbiz.core.entity.GenericDAO.singleStore(GenericDAO.java:381)
at org.ofbiz.core.entity.GenericDAO.storeAll(GenericDAO.java:419)
at org.ofbiz.core.entity.GenericHelperDAO.storeAll(GenericHelperDAO.java:246)
at org.ofbiz.core.entity.GenericDelegator.storeAll(GenericDelegator.java:1812)
at org.ofbiz.core.entity.GenericDelegator.storeAll(GenericDelegator.java:1754)
...
Diagnosis
Occurs during the startup of JIRA, usually after a new installation or database change;
Database used is Microsoft SQL Server;
Run the SQL query below to determine the SET NOCOUNT results as per Microsoft article:
1 2 3
DECLARE @NOCOUNT VARCHAR(3) = 'OFF'; IF ( (512 & @@OPTIONS) = 512 ) SET @NOCOUNT = 'ON'; SELECT @NOCOUNT AS NOCOUNT;
Cause
The error is usually caused when the SET NOCOUNT option is set in the Microsoft SQL Server configuration.
Solution
Resolution
Check your MS SQL Server configuration and turn off the SET NOCOUNT option using the following documentation:
If the cause of this issue is not applicable to your situation or if the issue still appears after turning of the SET NOCOUNT option, please reach out to the Atlassian Support for further assistance.
Was this helpful?