How To: Diagnose issues related to Jive version updates

Version 2

    This probably won't affect many people, but in v7.0.3, (and in most updates), a number of Spring bean definitions have changed - adding/removing constructor arguments and required properties.

     

    If you are developing plugins and are overriding any of these beans, or have a custom class that derives from one of these beans, you should check to make sure that you won't be affected before upgrading.  In my most recent case, I was overriding the behavior of the com.jivesoftware.community.RefererHelper helper class to support post-login redirect behavior in a custom SSO implementation.  Version 7.0.3 added a new required property and after the plugin was installed, the entire instance was hosed and wouldn't start up properly.  The fix was just to modify my Spring bean definition in the plugin.


    This is my method for diagnosing these sorts of issues:


    1. Navigate to https://maven-secure.jivesoftware.com/archiva/repository/jive.internal/com/jivesoftware/jive-core/

    2. Log in using the Jive credentials in your Maven settings file (~/.m2/settings.xml).

    3. Find the folder for version that you have already tested against

    4. In that folder, download the <version>-sources.jar file

    5. Find the folder for the new version that you have not tested against

    6. In that folder, download the <version>-sources.jar file

    7. Rename both files from .jar to .zip and unzip them

    8. Use a tool like BeyondCompare (Download Beyond Compare) to diff the two source directories

    9. Compare the highlighted (changes detected) spring-*.xml files in the root of each folder to see if they are different.

    10.  If you are extending a Jive-authored base class, diff the two versions of those source files as well to see if there will be any issues.


    (This process also works well for upgrading custom themes)


    PRO TIP: Here's a handy grep command you can use to find class references in the Spring configurations files.

    compare-6.png


    PERSONAL NOTE: I find BeyondCompare to be one of the most indispensable tools in my developer tool belt.  As a matter of fact, before they had a Mac version, I wrote a Wine wrapper for it so I could run the Windows version on the Mac.  You can (and should) also use it as your diff/merge tool in SourceTree (git) or TortoiseSVN (svn) and probably with most other source control UIs.


    Here are some screenshots using BeyondCompare  (there are both Mac and PC versions):

     

    > Select the folders (or files) to compare

    compare-1.png


    > Find spring bean definition file containing the bean you are overriding:

    compare-2.png


    > Look for the bean in question, did it change?

    compare-3.png


    > Find the class you are extending, did it change?

    compare-4.png


    > Review the changes - do they affect you?

    compare-5.png



    Hope that helps some folks out!!


    You can thank Matt Nevill for asking me to post about this.