GenericEntityException on startup with MS-SQL database in Jira server

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

  • JIRA startup fails.
  • A message similar to the following appears in the atlassian-jira.log:
     
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:

    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.

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.

Last modified on Apr 5, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.