Bug #53845 QUAN gives NullPointerException for query details after upgrade to 2.2
Submitted: 20 May 2010 9:29 Modified: 1 Jul 2010 8:10
Reporter: Mario Beck Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Enterprise Monitor: Server Severity:S2 (Serious)
Version:2.2.0.1709 OS:Solaris (SPARC/64)
Assigned to: Mark Matthews CPU Architecture:Any
Tags: mem, NullPointerException, quan, upgrade

[20 May 2010 9:29] Mario Beck
Description:
After upgrading from 2.1.1 to 2.2 I cannot access query details of queries, that were recorded before the upgrade. I will get an error: 
"An Error Occurred
    * java.lang.NullPointerException com.mysql.etools.monitor.bo.StatementInstance.getSourceLocation(StatementInstance.java:68)"

How to repeat:
Upgrade from 2.1.1 with existing query data in QuAn to 2.2.
Select a time range in Query Analyzer that is before the update.
Click on any query to show the details.
The error will pop up.

If I select a range that includes old and new data, I can select any query and get the details page. Probably because the query details are already available in a new format?

But I cannot inspect any query that ran before the MEM upgrade.

Suggested fix:
It seems that the query details are not correctly upgraded to a new data model of MEM 2.2, and therefore the GUI cannot find the details. So check the upgrade installer for the server. But this is only a speculation.
[24 May 2010 15:20] Enterprise Tools JIRA Robot
Mark Matthews writes: 
Still working (fighting with) a reproducible unit test for this, it's "tricky" because it relies on an environment that doesn't really exist, nor is straightforward to create in our unit test environment. The fix is already pushed though.
[24 May 2010 17:18] Enterprise Tools JIRA Robot
Andy Bang writes: 
In build 2.2.1.1721.
[30 Jun 2010 18:18] Enterprise Tools JIRA Robot
Diego Medina writes: 
Verified fixed on 2.2.1.1721  

a
[1 Jul 2010 8:10] MC Brown
A note has been added to the 2.2.1 changelog: 

        Query Analyzer could fail to operate correctly when upgrading                                                                                      
        from &merlin_server; 2.1 to &merlin_server; 2.2. Accessing the                                                                                     
        details of a query could lead to                                                                                                                   
        a <literal>NullPointerException</literal> error.