Courseiva
Java I/O API and Securing ApplicationseasyMultiple ChoiceObjective-mapped

1Z0-829 Java I/O API and Securing Applications Practice Question

You are developing a Java application that processes sensitive user data. The application runs on a server with strict security policies. You need to read configuration properties from a file located at /etc/app/config.properties. The application uses a SecurityManager. During testing, you get a security exception: java.security.AccessControlException: access denied (java.io.FilePermission /etc/app/config.properties read). You have already added a file permission grant in the policy file for the application codebase. However, the exception persists. What is the most likely cause?

⚠ Common exam trap

It's easy for candidates to assume granting permission to the application codebase alone is sufficient, forgetting that the SecurityManager checks all callers on the execution stack, not just the top-level application code.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

A library or caller on the execution stack does not have the required FilePermission.

Even if the application's own codebase has the required FilePermission, any library or caller on the execution stack that does not have the permission will cause an AccessControlException. The SecurityManager performs stack inspection: every class on the call stack must have the required permission. If a library or framework method invoked by your code lacks the grant, the check fails.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The application codebase URL in the policy file is incorrect.

    Why it's wrong here

    It's already granted, so likely correct.

  • A library or caller on the execution stack does not have the required FilePermission.

    Why this is correct

    SecurityManager requires all callers in the chain to have permission.

  • The file path is relative and needs to be resolved against user.dir.

    Why it's wrong here

    Path is absolute, so no resolution needed.

  • The policy file is not being loaded because the JVM was not started with -Djava.security.policy.

    Why it's wrong here

    The policy can be specified via security properties file as well.

About these practice questions

One of 513 original 1Z0-829 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This 1Z0-829 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-829 exam.