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

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. jquery的clone方法bug的修复select,textarea的值丢失

    项目中多次使用了iframe,但是操作起来是比较麻烦,项目中的现实情况是最外面是一个form,里面嵌套一个iframe,下面是一个其他的数据,在form提交的时候将iframe的数据和其他的数据一块提 ...

  2. 【PE结构】恶意代码数字签名验证

    说明 恶意代码数字签名验证功能,WinverityTrust.CryptQueryObject 代码实现 WinVerifyTrust //------------------------------ ...

  3. 谁在call我-backtrace的实现原理【转】

    转自:http://www.xuebuyuan.com/1504689.html 显示函数调用关系(backtrace/callstack)是调试器必备的功能之一,比如在gdb里,用bt命令就可以查看 ...

  4. 安装.NET Framework返回1603错误的解决办法

    昨天正在忙其它事情,实然同事向我反馈TFS上的文档无法浏览查看.第一反映是他的机器环境问题,让他试了下其它项目的文档也无法查看,后来在我电脑上也尝试了一下,果然无法查看项目文档,看来是TFS出了问题. ...

  5. Project Euler Problem4

    Largest palindrome product Problem 4 A palindromic number reads the same both ways. The largest pali ...

  6. css-position属性实例1

    一:position说明 position fixed 实现固定在某个位置 正常情况写两个div是在一层中,通过position属性,可以实现分两层和固定,就像在墙上贴了一层纸,就分了两层了. pos ...

  7. java 缺憾:异常的丢失

    一.java的异常实现也是又缺陷的,异常作为程序出错的标志决不能被忽略,但它还是可能被轻易地忽略.下了可以看到前一个异常还没处理就抛出下一个异常,没有catch捕获异常,它被finally抛出下一个异 ...

  8. PHP 获取某年第几周的开始日期和结束日期的实例

    /** * 获取某年第几周的开始日期和结束日期 * @param int $year * @param int $week 第几周; */ public function weekday($year, ...

  9. HttpClient 详解一《C#高级编程(第9版)》

    1.异步调用 Web 服务 static void Main(string[] args) { Console.WriteLine("In main before call to GetDa ...

  10. Javascript之继承(原型链方式)

    1.原型链 原型链是JavaScript中继承的主要方法. 每个构造函数都拥有一个原型对象,原型对象都包含一个指向构造函数的指针(constructor),实例都包含一个指向原型对象的内部指针(__p ...