JIRA Throw Error When Trying To Export Search Result Into Excel(All fields)

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When user try to export search result into Excel while selecting All Fields, JIRA throw the following trace:

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 'hasValue' in class com.atlassian.jira.issue.fields.CustomFieldImpl threw exception class java.lang.RuntimeException : java.lang.reflect.InvocationTargetException 

 

Diagnosis

  1. JIRA version 4.4.x
  2. GreenHopper Plugin is installed
  3. If entered the Plugin Safe Mode, the error no longer persist
  4. If GreenHopper plugin is enabled, and user try to add the Global Rank to the default Column in the Issue Navigator, JIRA will throw another trace:

    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 'getSortComparatorSource' in class com.atlassian.jira.issue.fields.CustomFieldImpl threw exception class java.lang.NoClassDefFoundError : com/atlassian/greenhopper/customfield/rank/RankLuceneFieldSorter
    

    In the JIRA logs, the following trace can be found:

    2011-09-04 17:43:43,040 http-8082-4 ERROR admin 1063x232x1 1fbk5gm 127.0.0.1 /secure/ViewUserIssueColumns!default.jspa [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    	at com.atlassian.activeobjects.tx.TransactionalProxy$1.doInTransaction(TransactionalProxy.java:47
    ...
    Caused by: java.lang.RuntimeException: Entry to update not found: issueId=13081, nextValue=15001
    	at com.atlassian.greenhopper.service.rank.RankDaoImpl.setNextForIssue(RankDaoImpl.java:94)
    

Cause

A bug reported at https://jira.atlassian.com/browse/JRA-25808 . The rank index in the Database is broken. In this example, issue with ID 13081 is referenced as "next" by 13082, but 13081 is not in the index (it should be last, having "null" as next). This causes the next "rank last" operation (the default initial action for previously unranked issues) to fail.

Resolution

  1. Update the database manually. The steps are as follow:

    1. shutdown JIRA
    2. backup JIRA's database
    3. check if there a table that is started with AO and end with RANK_ISSUE_LINK. Please replace the XXXX with hash name exist in the JIRA database
    4. then run the following SQL query to check if there any entry that has issue with NEXT_ID 13081:

      SELECT * FROM AO_XXXX_RANK_ISSUE_LINK where NEXT_ID=13081;
      

      Replace the "13081" with the "issueID" value reported in the logs.

    5. Then, check if there any any ISSUE_ID with 13081

      SELECT * FROM AO_XXXX_RANK_ISSUE_LINK where ISSUE_ID=13081;
      
    6. Then, insert an entry to the table manually:

      insert into AO_XXXX_RANK_ISSUE_LINK (ISSUE_ID) values (13081);
      
    7. restart JIRA

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Last modified on Feb 26, 2016

Was this helpful?

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