
EC-CouncilCertified Application Security Engineer (Java)
Domain 7Objective 1
Secure Exception/Error Handling CASEJAVA Practice Questions (Page 2)
Part of the Secure Coding: Error Handling and Logging domain, which makes up ~11% of our current practice bank. EC-Council does not publish an official question count, but from its 120-minute exam (~50–80 total, ~6–9 in this domain), expect 3–5 from this objective — we provide 45 practice questions to prepare you well beyond it. (estimate)
45questions here
9free pages
6concepts
Questions 6–10
- 6
A Java method opens a file, reads data, and then closes the file in a finally block. If an exception occurs during reading, the finally block closes the file, but the exception is not logged or rethrown. What is the primary security concern with this approach?
Select an answer first - 7
A Java application's logging framework is configured to log at DEBUG level in production. The logs contain full stack traces, including SQL queries with parameter values. The security team wants to reduce the risk of sensitive data exposure while maintaining the ability to troubleshoot issues. What is the best approach?
Select an answer first - 8
A Java application has a centralized exception handler that logs every exception with a stack trace. The application experiences a high volume of exceptions from a brute-force attack on the login form, causing the log to fill up rapidly and potentially impacting disk space. What is the best approach to handle this while maintaining security?
Select an answer first - 9
In a Spring MVC application, which annotation is commonly used to create a centralized exception handler?
Select an answer first - 10
Which of the following is a best practice for logging security events in a Java application?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by EC-Council. “CASEJAVA” is a trademark of its owner, used for identification only.