You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hadoop.apache.org by Amit Jain <am...@gmail.com> on 2014/01/21 00:05:22 UTC

encountering an error in org.apache.hadoop.security.UserGroupInformation.getOSLoginModuleName(UserGroupInformation.java:303)

Hi,

I am trying to write a map reduce program on a windows machine and I have
imported hadoop-core1.2.1.jar in eclipse on windows

I am getting the following error

Exception in thread "main" java.lang.NoSuchFieldError: IBM_JAVA
at
org.apache.hadoop.security.UserGroupInformation.getOSLoginModuleName(UserGroupInformation.java:303)

This is coming from a hadoop security library and I am not sure if this is
a configuration issue on my side or a code bug in hadoop.

Could you please let me know how to fix this ? I looked at the source code
and this is where the filed is being used , but this should be coming from
hadoop libraries.

Sorry if I am making a rookie mistake

private static String getOSLoginModuleName() {
    if (IBM_JAVA) {
      if (windows) {
        return is64Bit ? "com.ibm.security.auth.module.Win64LoginModule"
            : "com.ibm.security.auth.module.NTLoginModule";
      } else if (aix) {
        return is64Bit ? "com.ibm.security.auth.module.AIX64LoginModule"
            : "com.ibm.security.auth.module.AIXLoginModule";
      } else {
        return "com.ibm.security.auth.module.LinuxLoginModule";
      }
    } else {
      return windows ? "com.sun.security.auth.module.NTLoginModule"
        : "com.sun.security.auth.module.UnixLoginModule";
    }
  }