Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8080524

[TESTBUG] java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java fails on compact profiles due to unsatisfied dependencies in jsse.jar

    Details

    • Subcomponent:
    • Resolved In Build:
      b22
    • Verification:
      Fix failed

      Backports

        Description

        The test java/lang/Class/getDeclaredField/FieldSetAccessibleTest.java verifies that all fields returned by getDeclaredFields() can be set accessible (see JDK-8065552). The test attempts to verify all classes from all jar files that can be found in the boot classpath. It works fine on JRE but fails on compacts.

        Here's one of possible failures observed on Compact Profile 1:

        java.lang.NoClassDefFoundError: Ljavax/security/auth/kerberos/KerberosPrincipal;
                at java.lang.Class.getDeclaredFields0(Native Method)
                at java.lang.Class.privateGetDeclaredFields(Unknown Source)
                at java.lang.Class.getDeclaredFields(Unknown Source)
                at FieldSetAccessibleTest.testSetFieldsAccessible(FieldSetAccessibleTest.java:76)
                at FieldSetAccessibleTest.test(FieldSetAccessibleTest.java:90)
                at FieldSetAccessibleTest.test(FieldSetAccessibleTest.java:199)
                at FieldSetAccessibleTest.test(FieldSetAccessibleTest.java:160)
                at FieldSetAccessibleTest.run(FieldSetAccessibleTest.java:144)
                at FieldSetAccessibleTest$TestCase.run(FieldSetAccessibleTest.java:275)
                at FieldSetAccessibleTest.main(FieldSetAccessibleTest.java:135)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
                at java.lang.Thread.run(Unknown Source)
        java.lang.RuntimeException: Test failed for the following classes: [sun/security/ssl/krb5/KerberosClientKeyExchangeImpl$1.class, sun/security/ssl/krb5/KerberosClientKeyExchangeImpl.class]

        This happens because the sun.security.ssl.krb5.KerberosClientKeyExchangeImpl class have a field of type javax.security.auth.kerberos.KerberosPrincipal whereas Compact 1 doesn't include javax.security.auth.kerberos package. Thus the dependency on KerberosPrincipal cannot be satisfied and NoClassDefFoundError exception is raised.

        The class sun.security.ssl.krb5.KerberosClientKeyExchangeImpl is found in jsse.jar. When this jar is simply removed from the boot classpath all tests pass OK.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  igerasim Ivan Gerasimov (Inactive)
                  Reporter:
                  dkononenko Denis Kononenko
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: