java.lang.NullPointerException while running JQL with fixVersion
症状
- java.lang.NullPointerException appears when running a JQL query like : fixVersion >= "2.2.0_00"
The following query returns one or more rows:
select pv.id from projectversion pv left join project p on pv.project = p.id where p.id is null
atlassian-jira.log
に次のエラーが返される。
2011-08-05 17:38:10,941 http-8080-2 ERROR [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
at com.atlassian.jira.jql.util.JqlVersionPredicate$1.evaluate(JqlVersionPredicate.java:23)
at com.atlassian.jira.jql.util.JqlVersionPredicate$1.evaluate(JqlVersionPredicate.java:20)
at com.atlassian.jira.util.EvaluateAllPredicate.evaluate(EvaluateAllPredicate.java:27)2011-08-05 17:38:10,941 http-8080-2 ERROR [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
at com.atlassian.jira.jql.util.JqlVersionPredicate$1.evaluate(JqlVersionPredicate.java:23)
at com.atlassian.jira.jql.util.JqlVersionPredicate$1.evaluate(JqlVersionPredicate.java:20)
at com.atlassian.jira.util.EvaluateAllPredicate.evaluate(EvaluateAllPredicate.java:27)
at com.atlassian.jira.util.collect.CollectionUtil$GCollectPredicate.apply(CollectionUtil.java:475)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:603)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:135)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:130)
at com.atlassian.jira.jql.query.RelationalOperatorIdIndexValueQueryFactory.generateRangeQueryForPredicate(RelationalOperatorIdIndexValueQueryFactory.java:130)
at com.atlassian.jira.util.collect.CollectionUtil$GCollectPredicate.apply(CollectionUtil.java:475)
at com.google.common.collect.Iterators$7.computeNext(Iterators.java:603)
at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:135)
at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:130)
at com.atlassian.jira.jql.query.RelationalOperatorIdIndexValueQueryFactory.generateRangeQueryForPredicate(RelationalOperatorIdIndexValueQueryFactory.java:130)
原因
There is inconsistency in database with respect to fixVersion. There are one or more versions that are not attached to any project. The reason for this could be the result of direct database operations done previously.
ソリューション
Run the following query in the database to remove the inconsistency :
delete from projectversion pro where pro.id in (select pv.id from projectversion pv left join project p on pv.project = p.id where p.id is null);
- Jira を再起動します。
- Re-index JIRA.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.