Eclipse IDE Error : Access restriction: The type Provider is not accessible due to restriction on required library
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’.
Incoming search terms:
- Access restriction: The constructor \JdbcOdbcDriver()\ is not API (restriction on required library \
- https://yandex ru/clck/jsredir?from=yandex ru;search;web;;&text=&etext=1821 3Z9U-KsE54J1g13c1D-L6G4W6mU9YlceNsOXGfQyQHk_wKO3lb2bxsod6km36r2A f55e2370bd8e2941aeddc9a9a57948495573c914&uuid=&state=_BLhILn4SxNIvvL0W45KSic66uCIg23qh8iRG98qeIXme