Home » Tools » Eclipse IDE Error : Access restriction: The type Provider is not accessible due to restriction on required library

1 Flares Twitter 0 Facebook 1 Google+ 0 LinkedIn 0 Email -- Filament.io 1 Flares ×

This is a common error occurs when you use any deprecated library in Eclipse IDE project settings.The reason behind this error can be,

  • Classpath conflict.
  • Using old versions of jre/libs
  • Forbidden reference – Deprecated and restricted API

Try to configure the latest jars possible to avoid deprecated libs. Resolve the classpath conflict by checking duplicate library entries in the classpath.

If the above steps are not working, you can configure the IDE to resolve this error as follows.

Open  Windows -> Preferences -> Java -> Compiler -> Errors/Warnings
Go to (Project) Properties -> Java Compiler -> Errors/Warnings

Locate the “Forbidden reference (access rules)” option under “Deprecated and restricted API” section in the dialog box. This option decides how to handle access rules defined inside Eclipse. By default it is set to “Error” which causes Eclipse to complain about references to any restricted classes. Choosing option Warning or Ignore will remove these error messages.

But be careful when you change this settings. It is better not to set the value to ‘Ignore’. If you keep the value as ‘Ignore’ will hide any potential issue in the project and you will not be aware of that. The safest way to handle is to set the value as ‘Warning’.

1 Flares Twitter 0 Facebook 1 Google+ 0 LinkedIn 0 Email -- Filament.io 1 Flares ×

About Binu George

Leave a Reply

Your email address will not be published. Required fields are marked *

Paged comment generated by AJAX Comment Page

Google+ Plus Follow on Twitter Like On Facebook Linked Follow

Popular post

JAX-WS Web Services and Clients Java JAX-WS Tutorial: Develop Web Services and Clients (Consumers) Using JAX-WS
jax-ws usernametoken example JAX-WS and Secure Java Web Services using UsernameToken : WS-Security with Metro and WSIT
How to Fix : java.security.cert.CertificateException: No name matching localhost found
JAX-WS exception fault handling example JAX-WS Exceptions and Faults: Annotation, Exception and Fault Handling Examples
SOAP Binding: Difference between Document and RPC Style Web Services

Subscribe to Enterprise Java newsletter
Subscribe
Get Enterprise Java Newsletter

Enter your email and stay on top of things,