Derby
  1. Derby
  2. DERBY-6097

Management test suite fails when JMX is not supported

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: 10.10.1.1
    • Component/s: Test
    • Labels:
      None

      Description

      If the management test suite is run separately on a platform where JMX is not supported (in this case, a compact profile build of Java 8 EA), the suite() method fails:

      java.lang.NoClassDefFoundError: javax/management/ObjectName
      at java.lang.Class.getDeclaredMethods0(Native Method)
      at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
      at java.lang.Class.getDeclaredMethods(Unknown Source)
      at org.apache.derbyTesting.functionTests.tests.management.MBeanTest.suite(MBeanTest.java:72)
      at org.apache.derbyTesting.functionTests.tests.management.JMXTest.suite(JMXTest.java:51)
      at org.apache.derbyTesting.functionTests.tests.management._Suite.suite(_Suite.java:54)
      Caused by: java.lang.ClassNotFoundException: javax.management.ObjectName
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)

      Instead of failing, it should return an empty test suite if the platform doesn't support JMX.

      This is not a problem when running suites.All, as it contains logic to ignore NoClassDefFoundErrors for certain suites.

      1. d6097-1a-skip.diff
        3 kB
        Knut Anders Hatlen

        Activity

        Knut Anders Hatlen created issue -
        Knut Anders Hatlen made changes -
        Field Original Value New Value
        Status Open [ 1 ] In Progress [ 3 ]
        Knut Anders Hatlen made changes -
        Attachment d6097-1a-skip.diff [ 12572062 ]
        Knut Anders Hatlen made changes -
        Issue & fix info Patch Available [ 10102 ]
        Knut Anders Hatlen made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Issue & fix info Patch Available [ 10102 ]
        Fix Version/s 10.10.0.0 [ 12321550 ]
        Resolution Fixed [ 1 ]
        Gavin made changes -
        Workflow jira [ 12769709 ] Default workflow, editable Closed status [ 12802348 ]

          People

          • Assignee:
            Knut Anders Hatlen
            Reporter:
            Knut Anders Hatlen
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development