You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Uma Maheswara Rao G (JIRA)" <ji...@apache.org> on 2018/11/16 23:39:00 UTC

[jira] [Commented] (HADOOP-15941) [JDK 11] Compilation failure: package com.sun.jndi.ldap is not visible

    [ https://issues.apache.org/jira/browse/HADOOP-15941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16690136#comment-16690136 ] 

Uma Maheswara Rao G commented on HADOOP-15941:
----------------------------------------------

to make that package visible, we may need to add compiler Args with --add-exports

Adding the following snippet make things works.

in hadoop-project/pom.xml:

 

 

 

<plugin>
 <groupId>org.apache.maven.plugins</groupId>
 <artifactId>maven-compiler-plugin</artifactId>
 <version>3.8.0</version>
 <configuration>
 <source>${javac.version}</source>
 <target>${javac.version}</target>
 <useIncrementalCompilation>false</useIncrementalCompilation>
 <!-- add flags to generate native headers -->
 <compilerArgs combine.children="append">
 <arg>-h</arg>
 <arg>${project.build.directory}/native/javah/</arg>
*<arg>--add-exports</arg>*
 *<arg>java.naming/com.sun.jndi.ldap=ALL-UNNAMED</arg>*
 </compilerArgs>
 </configuration>
 
 </plugin>

> [JDK 11] Compilation failure: package com.sun.jndi.ldap is not visible
> ----------------------------------------------------------------------
>
>                 Key: HADOOP-15941
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15941
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: common
>    Affects Versions: 3.3.0
>            Reporter: Uma Maheswara Rao G
>            Priority: Major
>
> With JDK 11: Compilation failed because package com.sun.jndi.ldap is not visible.
>  
> {noformat}
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project hadoop-common: Compilation failure
> /C:/Users/umgangum/Work/hadoop/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/LdapGroupsMapping.java:[545,23] package com.sun.jndi.ldap is not visible
>  (package com.sun.jndi.ldap is declared in module java.naming, which does not export it){noformat}
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org