Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-5781

Visor throws ClassCastException if cache store implementation is other than CacheJdbcPojoStore

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.3
    • Component/s: visor
    • Labels:
      None

      Description

      Issue is reported on user list: http://apache-ignite-users.70518.x6.nabble.com/Problem-with-Visor-and-Cassandra-Cache-Store-td15076.html

      There is an obvious bug in the code. VisorCacheJdbcType#list method checks the type of store factory like this:

      if (factory != null || factory instanceof CacheJdbcPojoStoreFactory) {
          CacheJdbcPojoStoreFactory jdbcFactory = (CacheJdbcPojoStoreFactory) factory;
      

      It should be && instead of ||, because otherwise condition will be true for any factory that is not null. Even better if factory != null is removed completely as instanceof returns false for null values anyway.

      However, it's not clear to me why this scenario is reproduced only in certain conditions (see mailing list thread for details). It's possible that there is another hidden bug, this needs to be investigated.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ameterko Aleksandr Meterko
                Reporter:
                vkulichenko Valentin Kulichenko
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: