Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6755

SystemCatalogRegionObserver extends BaseRegionObserver which doesn't exist in hbase-2.4 branch.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.1.2
    • 5.2.0, 5.1.3
    • core
    • None

    Description

      One of our downstream services dependent on phoenix failed to startup with this phoenix-5.1 version and hbase-2.4.10 branch. Stack trace is pasted below:

      Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/coprocessor/BaseRegionObserver
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:473)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:365)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.addCoprocessors(ConnectionQueryServicesImpl.java:1177)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.generateTableDescriptor(ConnectionQueryServicesImpl.java:968)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:1419)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1936)
              at org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:3084)
              at org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:1111)
              at org.apache.phoenix.compile.CreateTableCompiler$CreateTableMutationPlan.execute(CreateTableCompiler.java:420)
              at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:415)
              at org.apache.phoenix.jdbc.PhoenixStatement$2.call(PhoenixStatement.java:397)
              at org.apache.phoenix.call.CallRunner.run(CallRunner.java:53)
              at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:396)
              at org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:384)
              at org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:1906)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:3290)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl$12.call(ConnectionQueryServicesImpl.java:3253)
              at org.apache.phoenix.util.PhoenixContextExecutor.call(PhoenixContextExecutor.java:76)
              at org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:3253)
              at org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:255)
      
      Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hbase.coprocessor.BaseRegionObserver
              at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
              at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:365)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
      

      It is throwing NoClassDefFoundError java.lang.NoClassDefFoundError: org/apache/hadoop/hbase/coprocessor/BaseRegionObserver

      ConnectionQueryServicesImpl.java#L1177 is as below:

      if (Arrays.equals(tableName, SchemaUtil.getPhysicalName(SYSTEM_CATALOG_NAME_BYTES, props).getName())) {
      if (!newDesc.hasCoprocessor(SystemCatalogRegionObserver.class.getName()))

      { builder.addCoprocessor( SystemCatalogRegionObserver.class.getName(), null, priority, null); }

      It is trying to load SystemCatalogRegionObserver class.

      Within integration tests, it is loading org/apache/hadoop/hbase/coprocessor/BaseRegionObserver via omid dependency, omid-hbase-shims-hbase2.x

      Attachments

        Issue Links

          Activity

            People

              shahrs87 Rushabh Shah
              shahrs87 Rushabh Shah
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: