more than one row in the ExternalEntity table

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

Symptoms

A user start seeing problems with their account and can no longer login.

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug. Details: -------  org.apache.velocity.exception.MethodInvocationException: Invocation of method 'formatUser' in class com.atlassian.jira.plugin.userformat.DefaultUserFormatManager threw exception class com.atlassian.jira.exception.DataAccessException : There is more than one row in the ExternalEntity table for name: testuser at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:251) at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:220) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:89) at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:55) at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:70) at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:230) at org.apache.velocity.Template.merge(Template.java:256) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:422) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:77) at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:61) ...

Resolution

  • Clear the ExternalEntity of the duplicate listed in the error log then restart JIRA

    ℹ️ In the example case above you'll want to find the entries for testuser and clear one entry

1 SELECT * from external_entities where name = <name>;

Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.