java.lang.NullPointerException

Atlassian JIRA | Pierre-Etienne Poirot [Atlassian] | 6 years ago
  1. 0

    Exception from [FSH-5283|https://support.atlassian.com/browse/FSH-5283]: {noformat} 08:37:31 ERROR - org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: query [select review from com.cenqua.crucible.model.Review review join review.project proj where () and ( (lower(review.name) like '%trm-34944%' or lower(review.description) like '%trm-34944%' or lower(proj.projKey) like '%trm-34944%' )) and review.stateName <> 'Dead' order by review.id desc] Feb 21, 2011 8:37:31 AM com.sun.jersey.server.impl.application.WebApplicationImpl onException SEVERE: Internal server error java.lang.NullPointerException at java.util.LinkedList.addAll(Unknown Source) at java.util.LinkedList.addAll(Unknown Source) at java.util.LinkedList.<init>(Unknown Source) at com.atlassian.crucible.spi.impl.DefaultSearchService.searchForReviews(DefaultSearchService.java:37) {noformat} This is because of two problems: - the HQL query is malformed because of the empty parenthesis in the {{where}} clause ("{{where ()}}"): {code:sql} select review from com.cenqua.crucible.model.Review review join review.project proj where () and ( (lower(review.name) like '%trm-34944%' or lower(review.description) like '%trm-34944%' or lower(proj.projKey) like '%trm-34944%' )) and review.stateName <> 'Dead' order by review.id desc {code} - any exception causes _DefaultReviewManager#searchReviewForTerms()_ to return a {{null}} instead of an empty collection (regression created in CRUC-3617)

    Atlassian JIRA | 6 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.NullPointerException
  2. 0

    Exception from [FSH-5283|https://support.atlassian.com/browse/FSH-5283]: {noformat} 08:37:31 ERROR - org.hibernate.hql.ast.QuerySyntaxException: unexpected AST node: query [select review from com.cenqua.crucible.model.Review review join review.project proj where () and ( (lower(review.name) like '%trm-34944%' or lower(review.description) like '%trm-34944%' or lower(proj.projKey) like '%trm-34944%' )) and review.stateName <> 'Dead' order by review.id desc] Feb 21, 2011 8:37:31 AM com.sun.jersey.server.impl.application.WebApplicationImpl onException SEVERE: Internal server error java.lang.NullPointerException at java.util.LinkedList.addAll(Unknown Source) at java.util.LinkedList.addAll(Unknown Source) at java.util.LinkedList.<init>(Unknown Source) at com.atlassian.crucible.spi.impl.DefaultSearchService.searchForReviews(DefaultSearchService.java:37) {noformat} This is because of two problems: - the HQL query is malformed because of the empty parenthesis in the {{where}} clause ("{{where ()}}"): {code:sql} select review from com.cenqua.crucible.model.Review review join review.project proj where () and ( (lower(review.name) like '%trm-34944%' or lower(review.description) like '%trm-34944%' or lower(proj.projKey) like '%trm-34944%' )) and review.stateName <> 'Dead' order by review.id desc {code} - any exception causes _DefaultReviewManager#searchReviewForTerms()_ to return a {{null}} instead of an empty collection (regression created in CRUC-3617)

    Atlassian JIRA | 6 years ago | Pierre-Etienne Poirot [Atlassian]
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at java.util.LinkedList.addAll()
    2. Java RT
      LinkedList.<init>
      1. java.util.LinkedList.addAll(Unknown Source)
      2. java.util.LinkedList.addAll(Unknown Source)
      3. java.util.LinkedList.<init>(Unknown Source)
      3 frames
    3. com.atlassian.crucible
      DefaultSearchService.searchForReviews
      1. com.atlassian.crucible.spi.impl.DefaultSearchService.searchForReviews(DefaultSearchService.java:37)
      1 frame