Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil

在使用Java API操作HBase时抛出如下异常:

Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil (file:/C:/Users/RYJ/.m2/repository/org/apache/hadoop/hadoop-auth/2.6.5/hadoop-auth-2.6.5.jar) to method sun.security.krb5.Config.getInstance()

这个异常足足困了我一天,刚开始怀疑是代码问题,最终发现是版本不匹配导致的。

首先我们搭建HBase一定要考虑兼容性问题,即哪个版本的HBase可以和什么版本的JDK匹配,以及可以和什么版本的Hadoop匹配。 我上一篇博客还总结了呢,搭建的时候就忽略了,这也就是学了不知道怎么用吧!汗!  以后实践的时候一定要学会联系学的东西,这样才会避免走很多弯路,不然有数不尽的坑,你就栽吧,时间不允许你这么做的。好了,接下来说解决方案。

解决方法:以前用的JDK8 ,发现不匹配,然后降级为JDK7 就好了。

具体降级步骤:

1.首先登陆JAVA官网下载JDK7到本地

》》打开https://www.oracle.com/technetwork/java/javase/documentation/index.html

》》可以看到有如下版本

》》下载好后,右键项目->Build Path->Configure Build Path... 弹出如下内容,依次按照顺序点击

》》Next

》》点击应用即可,然后重新运行,就发现错误终于消失了。。。

原文地址:https://www.cnblogs.com/shun7man/p/11902212.html

时间: 2024-10-12 18:53:54

Illegal reflective access by org.apache.hadoop.security.authentication.util.KerberosUtil的相关文章

Phoenix 5.0 hbase 2.0 org.apache.hadoop.security.authentication.util.KerberosUtil.hasKerberosKeyTab

<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 htt

kylin cube测试时,报错:org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode=&quot;/user&quot;:hdfs:supergroup:drwxr-xr-x

异常: org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x at org.apache.hadoop.hdfs.server.namenode.DefaultAuthorizationProvider.checkFsPermission(DefaultAuthoriza

Exception in thread &quot;main&quot; org.apache.hadoop.security.AccessControlException: Permission denied: user=Mypc, access=WRITE, inode=&quot;/&quot;:fan:supergroup:drwxr-xr-x

在window上编程提示没有写Hadoop的权限 Exception in thread "main" org.apache.hadoop.security.AccessControlException: Permission denied: user=Mypc, access=WRITE, inode="/":fan:supergroup:drwxr-xr-x 曾经踩过的坑: 保存结果到hdfs上没有写的权限* 通过修改权限将文件写入到指定的目录下* * $HAD

异常-Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=hdfs, access=WRITE, inode=&quot;/hbase&quot;:root:supergroup:drwxr-xr-x

1 详细异常 Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=hdfs, access=WRITE, inode="/hbase":root:supergroup:drwxr-xr-x at org.apache.hadoop.hdfs.server.namenode.DefaultAu

Win下Eclipse提交Hadoop程序出错:org.apache.hadoop.security.AccessControlException: Permission denied: user=D

描述:在Windows下使用Eclipse进行Hadoop的程序编写,然后Run on hadoop 后,出现如下错误: 11/10/28 16:05:53 INFO mapred.JobClient: Running job: job_201110281103_000311/10/28 16:05:54 INFO mapred.JobClient: map 0% reduce 0%11/10/28 16:06:05 INFO mapred.JobClient: Task Id : attemp

org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException)

在运行hadoop的程序时,向hdfs中写文件时候,抛出异常信息如下: Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.AccessControlException): Permission denied: user=Administrator, access=WRITE, inode="/user":root:supergroup:drwxr-xr-x 原因:Hdfs中的/user

Hive JDBC:java.lang.RuntimeException: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.security.authorize.AuthorizationException): User: root is not allowed to impersonate anonymous

今天使用JDBC来操作Hive时,首先启动了hive远程服务模式:hiveserver2 &(表示后台运行),然后到eclipse中运行程序时出现错误: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.182.11:10000/default: Failed to open new session: java.lang.RuntimeException: org.

从 &amp;quot;org.apache.hadoop.security.AccessControlException:Permission denied: user=...&amp;quot; 看Hadoop 的用户登陆认证

假设远程提交任务给Hadoop 可能会遇到?"org.apache.hadoop.security.AccessControlException:Permission denied: user=..." , 当然,假设是spark over YARN, 也相同会遇到相似的问题,比如: ?An error occurred while calling None.org.apache.spark.api.java.JavaSparkContext. : org.apache.hadoop.

org.apache.hadoop.security.AccessControlException

Windows|Eclipse 运行HDFS程序之后,报:org.apache.Hadoop.security.AccessControlException: Permission denied: user=sunqw, access=WRITE, inode="":hadoop:supergroup:rwxr-xr-x. 或者 Windows|Eclipse 运行HDFS程序之后,报:org.apache.hadoop.security.AccessControlException: