插件重构的时候 遇到这个问题

Access restriction: The method setDefaultAutoCommit(boolean) from the type BasicDataSource is not accessible due to restriction on required library com.XXX.ro.studio.debug/lib/commons-dbcp-1.2.1.jar

开始以为是插件包之间依赖问题,但是查看一下却没有问题。

后来发现是eclipse本身设置的问题

它默认把这些受访问限制的API设成了ERROR,只要把Windows-Preferences-Java-Complicer-Errors/Warnings

里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过了。

Access restriction: The method XXX from the type XXX is not accessible due to restriction XXX的更多相关文章

  1. Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not accessible due to restriction on required library

    异常: Access restriction: The method typeNameToClass(String) from the type ObjectHandler is not access ...

  2. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar

    解决方法: Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入. ===== ...

  3. 解决:高版本jdk编译低版本代码时eclipse提示Access restriction:The type 'Unsafe' is not accessible due to restriction on required library

    在Eclipse中采用高版本jdk编译一些低版本的源码时,由于源码中使用了一些高版本中过时的API,可能就会报错,类似于: Access restriction:The type 'Unsafe' i ...

  4. 报错: Access restriction: The type JPEGImageEncoder is not accessible due to restriction on required library

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  5. Access restriction:The type JPEGCodec is not accessible due to restriction on required library C:\Program Files\Java\jre6\lib\rt.jar 报错

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  6. Access restriction: The type JPEGImageEncoder is not accessible due to restriction

    转: 解决办法:Access restriction: The type JPEGImageEncoder is not accessible due to restriction 2011年11月2 ...

  7. (Error) The type AESKeyGenerator is not accessible due to restriction on required library.

    error for 'Access restriction: The type AESKeyGenerator is not accessible due to restriction on requ ...

  8. 使用myeclipse开发java,解决java中继承JFrame类出现The type JFrame is not accessible due to restriction的问题

    在java中创建窗体,导入了java中的JFrame类,之后会出现错误: Access restriction: The type QName is not accessible due to res ...

  9. 报错: The type ByteInputStream is not accessible due to restriction on required library

    报错: Access restriction:The type JPEGCodec is not accessible due to restriction on required library C ...

  10. Access restriction: The type VerticalTextSpinner is not accessible due to restriction on required library........

    查了下竟然是编译器报错,orz了. Access restriction: 访问限制 on required library: 在依赖库(第三方包) 那就简单了,取消限制就好, eclipse的Win ...

随机推荐

  1. Oracle Logminer 分析重做日志RedoLog和归档日志ArchiveLog

    在实际开发过程中,有时我们很有可能需要某个表的操作痕迹,或通过记录的SQL语句进行有目的性的数据恢复(此时POINT-IN-TIME恢复已经满足不了更细的粒度).或仅仅是查看: 据说Oracle8i之 ...

  2. linux 如何删除文件夹下面的文件和文件夹,只保留两个文件

    # 删除目录下那两个文件之外的所有文件 find dir/ -type f ! -name file1 -a ! -name file2 | xargs rm -f   # 删除所有空目录(非空目录不 ...

  3. linux下cpu物理个数、多核、超线程判断解析

    在Linux体系中,供给了proc文件体系显示体系的软硬件信息.若是想懂得体系中CPU的供给商和相干设备信息,则可以经由过程/proc/cpuinfo文件获得.本文章针对该文件进行简单的总结. 基于指 ...

  4. Java中关于HashMap源码的研究

    1.基础知识 1.数组 数组存储区间是连续的,占用内存严重,故空间复杂的很大.但数组的二分查找时间复杂度小,为O(1):数组的特点是:寻址容易,插入和删除困难. 2.链表 链表存储区间离散,占用内存比 ...

  5. java 轨迹栈

    printStackTrace()方法所提供的信息可以通过getStackTrace()方法直接访问. getStackTrace()方法返回一个由根轨迹中的元素所构成的数组,每一个元素都表示栈中的一 ...

  6. python过滤 Kubernetes api数据

    一.需求分析 Kubernetes endpoints api地址 http://ip地址:端口/api/v1/namespaces/default/endpoints services api地址 ...

  7. Intellij Idea 使用时总是打开上次的项目

    Appearance&Behaviour-->>System Settings-->>Startup&Shutdown-->>Reopen last ...

  8. hdu 5441 (2015长春网络赛E题 带权并查集 )

    n个结点,m条边,权值是 从u到v所花的时间 ,每次询问会给一个时间,权值比 询问值小的边就可以走 从u到v 和从v到u算不同的两次 输出有多少种不同的走法(大概是这个意思吧)先把边的权值 从小到大排 ...

  9. word2vec 中的数学原理三 背景知识 语言模型

    主要参考:    word2vec 中的数学原理详解                 自己动手写 word2vec

  10. Spring中AOP实现

    1.什么是SpringAOP 什么是aop:Aspect Oriented Programming的缩写,面向切面编程,通过预编译和动态代理实现程序功能的 统一维护的一种技术 主要功能:日志记录,性能 ...