Unable to clone, delete or link issues. (LexoRankIntegrityException)

Yiannis Koukouras February 1, 2018

We are getting the following error whenever we are trying to clone, delete or link issues.

Error Title:

Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]

 

We searched in KB and we run the following mysql query:

"SELECT * FROM "AO_60DB71_LEXORANKBALANCER" WHERE "FIELD_ID" = 10005;" 

and returns empty rows, no results.

 

5 answers

1 accepted

1 vote
Answer accepted
Yiannis Koukouras February 1, 2018

Fixed:

INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, RANK, TYPE) VALUES (DEFAULT, 10005, -9223372036854775808, '0|000000:', 0);
INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, RANK, TYPE) VALUES (DEFAULT, 10100, -9223372036854775808, '0|000000:', 0);
INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, RANK, TYPE) VALUES (DEFAULT, 10005, 9223372036854775807, '0|zzzzzz:', 2);
INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, RANK, TYPE) VALUES (DEFAULT, 10100, 9223372036854775807, '0|zzzzzz:', 2);
Yiannis Koukouras February 1, 2018
select id from customfield where customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-lexo-rank';
Logistics1520 November 30, 2022

That solved the problem, thank you.

But for MYSQL 8 RANK chould be quoted with ` or you will receive:

"ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RANK, TYPE) VALUES (DEFAULT, 10005, -9223372036854775808, '0|000000:', 0)' at line 1"

so in my case right commands are:

INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, `RANK`, TYPE) VALUES (DEFAULT, 10005, -9223372036854775808, '0|000000:', 0);
INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, `RANK`, TYPE) VALUES (DEFAULT, 10100, -9223372036854775808, '0|000000:', 0);
INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, `RANK`, TYPE) VALUES (DEFAULT, 10005, 9223372036854775807, '0|zzzzzz:', 2);
INSERT INTO AO_60DB71_LEXORANK (ID, FIELD_ID, ISSUE_ID, `RANK`, TYPE) VALUES (DEFAULT, 10100, 9223372036854775807, '0|zzzzzz:', 2);
0 votes
martin55 December 29, 2018

Hi all! I have some issue and my jira using DB in h2․ How can i fix that. And how can i connect DB. In jira system information i see this.


Database JNDI address     h2 jdbc:h2:file:/var/atlassian/application-data/jira/database/h2db
Database URL     jdbc:h2:file:/var/atlassian/application-data/jira/database/h2db


log number: ee96ec09-019d-4331-ac83-553e6f315ef3


Referer URL: my jira url

com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2



com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10011]
    at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.getMaximumMarkerRowAndPreviousRow(LexoRankDaoImpl.java:399) [?:?]
    at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.rankInitially(LexoRankOperation.java:165) [?:?]
    at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.execute(LexoRankOperation.java:114) [?:?]
    at com.atlassian.greenhopper.manager.lexorank.LexoRankManagerImpl.performRankOperation(LexoRankManagerImpl.java:300) [?:?]
    at com.atlassian.greenhopper.manager.lexorank.LexoRankManagerImpl.getRankOrRankInitially(LexoRankManagerImpl.java:86) [?:?]
    at com.atlassian.greenhopper.customfield.lexorank.LexoRankCFType.getValueFromIssue(LexoRankCFType.java:121) [?:?]
    at com.atlassian.greenhopper.customfield.lexorank.LexoRankCFType.getValueFromIssue(LexoRankCFType.java:29) [?:?]
    at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:350) [classes/:?]
    at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper$DeletedIssueEventData.collectCustomFieldValues(DefaultIssueDeleteHelper.java:288) [classes/:?]
    at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper$DeletedIssueEventData.<init>(DefaultIssueDeleteHelper.java:275) [classes/:?]
    at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper.deleteIssue(DefaultIssueDeleteHelper.java:120) [classes/:?]
    at com.atlassian.jira.issue.managers.DefaultIssueManager.deleteIssue(DefaultIssueManager.java:723) [classes/:?]
    at com.atlassian.jira.issue.managers.RequestCachingIssueManager.deleteIssue(RequestCachingIssueManager.java:232) [classes/:?]
    at com.atlassian.jira.bc.issue.DefaultIssueService.delete(DefaultIssueService.java:402) [classes/:?]
    at com.atlassian.jira.bc.issue.DefaultIssueService.delete(DefaultIssueService.java:378) [classes/:?]
    at com.atlassian.jira.web.action.issue.DeleteIssue.doExecute(DeleteIssue.java:23) [classes/:?]
    at webwork.action.ActionSupport.execute(ActionSupport.java:165) [webwork-1.4-atlassian-30.jar:?]
    at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) [jira-api-7.11.2.jar:?]
    at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) [webwork-1.4-atlassian-30.jar:?]
    at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) [webwork-1.4-atlassian-30.jar:?]
    at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) [webwork-1.4-atlassian-30.jar:?]
    at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:35) [webwork-1.4-atlassian-30.jar:?]
    at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:225) [webwork-1.4-atlassian-30.jar:?]
    at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:154) [webwork-1.4-atlassian-30.jar:?]
    at com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:138) [classes/:?]

0 votes
Yiannis Koukouras February 1, 2018

Error details:

 

com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]
com.atlassian.greenhopper.manager.lexorank.LexoRankIntegrityException: Expected exactly 2 rows; the maximum marker row and the lowest ranked row for rank field[id=10005]
at com.atlassian.greenhopper.manager.lexorank.LexoRankDaoImpl.getMaximumMarkerRowAndPreviousRow(LexoRankDaoImpl.java:399) [?:?]
at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.rankInitially(LexoRankOperation.java:180) [?:?]
at com.atlassian.greenhopper.service.lexorank.LexoRankOperation.execute(LexoRankOperation.java:119) [?:?]
at com.atlassian.greenhopper.manager.lexorank.LexoRankManagerImpl.performRankOperation(LexoRankManagerImpl.java:300) [?:?]
at com.atlassian.greenhopper.manager.lexorank.LexoRankManagerImpl.getRankOrRankInitially(LexoRankManagerImpl.java:86) [?:?]
at com.atlassian.greenhopper.customfield.lexorank.LexoRankCFType.getValueFromIssue(LexoRankCFType.java:121) [?:?]
at com.atlassian.greenhopper.customfield.lexorank.LexoRankCFType.getValueFromIssue(LexoRankCFType.java:29) [?:?]
at com.atlassian.jira.issue.fields.ImmutableCustomField.getValue(ImmutableCustomField.java:350) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper$DeletedIssueEventData.collectCustomFieldValues(DefaultIssueDeleteHelper.java:288) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper$DeletedIssueEventData.<init>(DefaultIssueDeleteHelper.java:275) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueDeleteHelper.deleteIssue(DefaultIssueDeleteHelper.java:120) [classes/:?]
at com.atlassian.jira.issue.managers.DefaultIssueManager.deleteIssue(DefaultIssueManager.java:719) [classes/:?]

Yiannis Koukouras February 1, 2018

Find missing ranks:

select id from customfield where customfieldtypekey = 'com.pyxis.greenhopper.jira:gh-lexo-rank';
0 votes
Yiannis Koukouras February 1, 2018

Also tried the following:

 

insert into AO_60DB71_LEXORANK values (DEFAULT,10005,10,9223372036854775807,NULL,NULL,'0|zzzzzz:',2);

 

insert into AO_60DB71_LEXORANK values (DEFAULT,10005,9,-9223372036854775808,NULL,NULL,'0|000000:',0);
0 votes
Yiannis Koukouras February 1, 2018

We also tried the following:

 update AO_60DB71_LEXORANK set FIELD_ID=10005 where ID=8;

and

  update AO_60DB71_LEXORANK set FIELD_ID=10005 where ID=7;

but with no success.

Suggest an answer

Log in or Sign up to answer