- A
Recompile the application without using modules by placing all classes on the classpath instead.
Why wrong: This would break the modular design and might still have class conflicts from legacy JARs; it is not a proper fix.
- B
Remove any classpath entries from the server startup script and rely exclusively on the module path provided by the runtime image.
The runtime image already contains all required modules; adding classpath can cause conflicting class definitions and the NoClassDefFoundError.
- C
Ensure that the module `com.app.util` exports the package containing the missing class in its module-info.java.
Why wrong: If the class were not exported, the error would be an IllegalAccessError, not NoClassDefFoundError. The module already exports the package because it compiles and links without issues.
- D
Add detailed logging in the module's initialization to trace the class loading and identify where the error originates.
Why wrong: While logging helps diagnose, it does not resolve the underlying classpath contamination.
Quick Answer
The answer is to remove any classpath entries from the server startup script and rely exclusively on the module path provided by the runtime image. This corrective action is necessary because a module path classpath conflict arises when legacy scripts add classpath entries that interfere with JPMS module resolution, causing the NoClassDefFoundError even though the class exists in the compiled module. JPMS enforces strict separation between the module path and the classpath; mixing them can create split packages or shadow correct module definitions, which the runtime image built with jlink was designed to avoid. On the Oracle Java Foundations 1Z0-811 exam, this scenario tests your understanding of how jlink creates a self-contained runtime that must be used without external classpath interference—a common trap is assuming compilation success guarantees runtime behavior. Remember the mnemonic: “jlink builds the path; don’t add classpath aftermath.”
1Z0-811 Exception Handling and Development Tools Practice Question
This 1Z0-811 practice question tests your understanding of exception handling and development tools. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
You are a Java developer working on an enterprise application that uses a modular architecture with Java Platform Module System (JPMS). The application consists of several modules: `com.app.core`, `com.app.util`, `com.app.service`, and `com.app.client`. The application runs on a server that has Java 17 installed. Recently, the operations team reported that after a deployment, the application fails to start with a `NoClassDefFoundError` for a class in `com.app.util`, even though the class exists in the compiled module. The deployment process uses a custom script that compiles the modules using `javac` with `--module-source-path`, then uses `jlink` to create a custom runtime image that includes only the required modules. The runtime image is then deployed to the server. The build logs show no errors during compilation or linking. However, on the server, the error occurs. The server has multiple versions of the same library on the classpath due to legacy scripts. You suspect that the error is due to a module resolution issue. Which corrective action should you take?
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
Remove any classpath entries from the server startup script and rely exclusively on the module path provided by the runtime image.
Option B is correct because the `NoClassDefFoundError` occurs when the custom runtime image built with `jlink` is deployed, but legacy scripts add classpath entries that cause module resolution conflicts. JPMS requires that all dependencies be on the module path; mixing classpath entries can lead to split packages or incorrect module resolution, resulting in the error. Removing classpath entries ensures the runtime image's module path is used exclusively, resolving the issue.
Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Recompile the application without using modules by placing all classes on the classpath instead.
Why it's wrong here
This would break the modular design and might still have class conflicts from legacy JARs; it is not a proper fix.
- ✓
Remove any classpath entries from the server startup script and rely exclusively on the module path provided by the runtime image.
Why this is correct
The runtime image already contains all required modules; adding classpath can cause conflicting class definitions and the NoClassDefFoundError.
Related concept
Read the scenario before looking for a memorised answer.
- ✗
Ensure that the module `com.app.util` exports the package containing the missing class in its module-info.java.
Why it's wrong here
If the class were not exported, the error would be an IllegalAccessError, not NoClassDefFoundError. The module already exports the package because it compiles and links without issues.
- ✗
Add detailed logging in the module's initialization to trace the class loading and identify where the error originates.
Why it's wrong here
While logging helps diagnose, it does not resolve the underlying classpath contamination.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often focus on module exports or compilation issues, but the real problem is the interference of classpath entries with JPMS module resolution, which is a subtle runtime behavior tested by Cisco.
Detailed technical explanation
How to think about this question
JPMS uses module resolution based on the module path; when classpath entries are present, the JVM may load classes from the classpath instead of the module path, leading to split packages or missing module dependencies. The `jlink` tool creates a runtime image that includes only the specified modules and their transitive dependencies, but if legacy scripts add classpath entries, the JVM's class loader may prioritize those, causing `NoClassDefFoundError` even though the class exists in the module. This is a common issue in enterprise environments where migration to modules is partial.
KKey Concepts to Remember
- Read the scenario before looking for a memorised answer.
- Find the constraint that changes the correct option.
- Eliminate answers that are true in general but not in this case.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.
Real-world example
How this comes up in practice
A small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.
What to study next
Got this wrong? Here's your next step.
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
- →
Exception Handling and Development Tools — study guide chapter
Learn the concepts, then practise the questions
- →
Exception Handling and Development Tools practice questions
Targeted practice on this topic area only
- →
All 1Z0-811 questions
509 questions across all exam domains
- →
Oracle Java Foundations 1Z0-811 study guide
Full concept coverage aligned to exam objectives
- →
1Z0-811 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related 1Z0-811 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
What is Java practice questions
Practise 1Z0-811 questions linked to What is Java.
Java Basics and Syntax practice questions
Practise 1Z0-811 questions linked to Java Basics and Syntax.
Primitives, Strings and Operators practice questions
Practise 1Z0-811 questions linked to Primitives, Strings and Operators.
Control Flow and Loops practice questions
Practise 1Z0-811 questions linked to Control Flow and Loops.
Arrays and Methods practice questions
Practise 1Z0-811 questions linked to Arrays and Methods.
Object-Oriented Programming practice questions
Practise 1Z0-811 questions linked to Object-Oriented Programming.
Exception Handling and Development Tools practice questions
Practise 1Z0-811 questions linked to Exception Handling and Development Tools.
1Z0-811 fundamentals practice questions
Practise 1Z0-811 questions linked to 1Z0-811 fundamentals.
1Z0-811 scenario practice questions
Practise 1Z0-811 questions linked to 1Z0-811 scenario.
1Z0-811 troubleshooting practice questions
Practise 1Z0-811 questions linked to 1Z0-811 troubleshooting.
Practice this exam
Start a free 1Z0-811 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this 1Z0-811 question test?
Exception Handling and Development Tools — This question tests Exception Handling and Development Tools — Read the scenario before looking for a memorised answer..
What is the correct answer to this question?
The correct answer is: Remove any classpath entries from the server startup script and rely exclusively on the module path provided by the runtime image. — Option B is correct because the `NoClassDefFoundError` occurs when the custom runtime image built with `jlink` is deployed, but legacy scripts add classpath entries that cause module resolution conflicts. JPMS requires that all dependencies be on the module path; mixing classpath entries can lead to split packages or incorrect module resolution, resulting in the error. Removing classpath entries ensures the runtime image's module path is used exclusively, resolving the issue.
What should I do if I get this 1Z0-811 question wrong?
Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.
What is the key concept behind this question?
Read the scenario before looking for a memorised answer.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
This 1Z0-811 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-811 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.