[ 
https://issues.apache.org/jira/browse/HBASE-28341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Rajeshbabu Chintaguntla resolved HBASE-28341.
---------------------------------------------
    Resolution: Fixed

Pushed to master, 3.x and 2.x branches. Thanks for review [~zhangduo].

> [JDK17] Fix Failure TestLdapHttpServer
> --------------------------------------
>
>                 Key: HBASE-28341
>                 URL: https://issues.apache.org/jira/browse/HBASE-28341
>             Project: HBase
>          Issue Type: Sub-task
>         Environment: 
>            Reporter: Rajeshbabu Chintaguntla
>            Assignee: Rajeshbabu Chintaguntla
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.6.0, 2.4.18, 4.0.0-alpha-1, 2.7.0, 2.5.8, 3.0.0-beta-2
>
>
> TestLdapHttpServer is failing with JDK17 because of internal APIs usage.
> {code:java}
> [INFO] Running org.apache.hadoop.hbase.http.TestLdapHttpServer
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 7.18 
> s <<< FAILURE! - in org.apache.hadoop.hbase.http.TestLdapHttpServer
> [ERROR] org.apache.hadoop.hbase.http.TestLdapHttpServer  Time elapsed: 7.165 
> s  <<< ERROR!
> java.lang.IllegalAccessError: class 
> org.apache.directory.server.core.security.CertificateUtil (in unnamed module 
> @0x25bbf683) cannot access class sun.security.x509.X500Name (in module 
> java.base) because module java.base does not export sun.security.x509 to 
> unnamed module @0x25bbf683
>       at 
> org.apache.directory.server.core.security.CertificateUtil.createTempKeyStore(CertificateUtil.java:334)
>       at 
> org.apache.directory.server.factory.ServerAnnotationProcessor.instantiateLdapServer(ServerAnnotationProcessor.java:158)
>       at 
> org.apache.directory.server.factory.ServerAnnotationProcessor.createLdapServer(ServerAnnotationProcessor.java:318)
>       at 
> org.apache.directory.server.factory.ServerAnnotationProcessor.createLdapServer(ServerAnnotationProcessor.java:351)
>       at 
> org.apache.directory.server.core.integ.CreateLdapServerRule$2.evaluate(CreateLdapServerRule.java:112)
>       at 
> org.apache.directory.server.core.integ.CreateDsRule$2.evaluate(CreateDsRule.java:124)
>       at org.junit.rules.RunRules.evaluate(RunRules.java:20)
>       at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
>       at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:316)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:240)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:214)
>       at 
> org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:155)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:385)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:162)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.run(ForkedBooter.java:507)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:495)
> [INFO] 
> [INFO] Results:
> [INFO] 
> [ERROR] Errors: 
> [ERROR]   TestLdapHttpServer ยป IllegalAccess class 
> org.apache.directory.server.core.security.CertificateUtil (in unnamed module 
> @0x25bbf683) cannot access class sun.security.x509.X500Name (in module 
> java.base) because module java.base does not export sun.security.x509 to 
> unnamed module @0x25bbf683
> [INFO] 
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> {code}
> Adding following to jvn flags works.
> {code}
> +      --add-opens java.base/sun.security.x509=ALL-UNNAMED
> +      --add-opens java.base/sun.security.util=ALL-UNNAMED
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to