title: hadoop configuration error in runtime with openjdk11
body: <p>I am migrating our application to openjdk11 and with this setup my application is throwing below error.
  PLease help on this
  Note : With Jdk 1.8 the same code and configurations are working fine .
  Java version: openjdk 11
  Springboot-hadoop : 2.4.0 RELEASE</p>
  <p>application properties</p>
  <pre><code>        spring.hadoop.fsshell.enabled=false
          #hadoop security properties
          hadoop.config.key=hadoop.security.authentication
          hadoop.config.value=Kerberos
          #Hive connection properties
          hive.datasource.keytab=/config/security/sit.001.keytab
          hive.datasource.drivername=org.apache.hive.jdbc.HiveDriver
          hive.datasource.username=ssit.001
          #hive.datasource.password=password
          hive.truststore.file=/config/security/hivetrust.jks
          hive.krb5.conf=/config/security/krb5.conf
          hive.datasource.url=url
          hive.krb5.conf.debug.prop=sun.security.krb5.debug
          hive.krb5.conf.isdebug=true
              
  </code></pre>
  <p>Java changes</p>
  <pre><code>@Value(&quot;${hive.datasource.drivername}&quot;)
          private String driverName;
      
          @Value(&quot;${hive.datasource.url}&quot;)
          private String jdbcUrl;
      
          @Value(&quot;${hive.datasource.username}&quot;)
          private String userId;
      
          @Value(&quot;${hive.datasource.keytab}&quot;)
          private String keytab;
      
          @Value(&quot;${hive.krb5.conf}&quot;)
          private String kerberosConf;
      
          @Value(&quot;${hadoop.config.key}&quot;)
          public String hadoopConfigKey;
      
          @Value(&quot;${hadoop.config.value}&quot;)
          public String hadoopConfigValue;
      
          @Bean(name = &quot;hiveDS&quot;)
          public DataSource configureHiveDataSource() throws IOException, ClassNotFoundException, SQLException {
              Connection con = null;
      
              // System.setProperty(&quot;hadoop.home.dir&quot;, hadoopHome);
              System.setProperty(&quot;javax.security.auth.useSubjectCredsOnly&quot;, &quot;false&quot;);
              System.setProperty(&quot;java.security.krb5.conf&quot;, kerberosConf);
              org.apache.hadoop.conf.Configuration conf = new org.apache.hadoop.conf.Configuration();
              conf.set(hadoopConfigKey, hadoopConfigValue);
              UserGroupInformation.setConfiguration(conf);
              UserGroupInformation.loginUserFromKeytab(userId, keytab);
      
              Class.forName(driverName);
      
              con = DriverManager.getConnection(jdbcUrl);
              LOGGER.info(&quot;Hive Db Connected&quot;);
      
              DriverManagerDataSource dataSource = new DriverManagerDataSource();
              dataSource.setDriverClassName(driverName);
              dataSource.setUrl(jdbcUrl);
              return dataSource;
          }
          
          @Bean(name = &quot;hiveJdbc&quot;)
          public JdbcTemplate getHiveJdbcTemplate(@Qualifier(&quot;hiveDS&quot;) DataSource hiveDS) {
              return new JdbcTemplate(hiveDS);
          }
          
          @Bean(name = &quot;hiveNamedJdbc&quot;)
          public NamedParameterJdbcTemplate getHiveNamedJdbcTemplate(@Qualifier(&quot;hiveDS&quot;) DataSource hiveNamedDS) {
              return new NamedParameterJdbcTemplate(hiveNamedDS);
          }
      }
      
  </code></pre>
  <p>2021-04-28T21:18:18.829+0530 [main] ERROR o.s.d.h.c.c.a.AbstractConfiguredAnnotationBuilder - Failed to perform build. Returning null
  java.lang.IllegalArgumentException: Bean name must not be null
  at org.springframework.util.Assert.notNull(Assert.java:201)
  <strong>Error creating bean with name 'hadoopConfiguration' defined in class path resource</strong> [org/springframework/data/hadoop/config/annotation/configuration/SpringHadoopConfiguration.class]: Bean instantiation via factory method failed; nested exception is **org.springframework.beans.BeanInstantiationException: Failed to instantiate **[org.apache.hadoop.conf.Configuration]: Factory method 'configuration' threw exception; nested exception is java.lang.NullPointerException</p>