Java EE security annotations are used in Enterprise Java Beans and JPA to protect user access to methods exposed in entities and the session façade. Creating a new EJB project in Oracle JDeveloper, or using the Java EE Web Application template to build a web application using EJB and ADF Faces, does not add the classes of the javax.annotation.security package to the project class path.
To solve this issue, and to make security annotations like @DenyAll available in the code editor, you need to add the WebLogic 10.3. Remote Client library as follows:
- Open the Model project properties by double clicking onto the project node or using the context menu
- Select Libraries and Classpath
- Click the Add Library button
- Search for and add the WebLogic 10.3. Remote Client entry.