1Z0-829 Java Platform Overview and Packaging Practice Question
A company runs a Java 17 microservice that reads stock market data from a WebSocket and processes it. The application is packaged as an executable JAR using Maven Shade Plugin. Recently, after a dependency update, the application started throwing 'javax.net.ssl.SSLHandshakeException: PKIX path building failed' when connecting to the WebSocket. The security team insists that no certificates should be imported into the default truststore. The application already includes a custom truststore file 'certs.jks' in the resources folder. The developer had been loading it programmatically but the new dependency uses a different SSL context. The application must trust the WebSocket server without modifying JVM defaults. Which action should be taken?
⚠ Common exam trap
Many candidates think the system properties only affect the default SSLContext, but in practice, many libraries rely on the default SSLContext, making this a global and effective solution without modifying JVM defaults.
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
✓
Set the system property 'javax.net.ssl.trustStore' to the path of 'certs.jks' and 'javax.net.ssl.trustStorePassword' to its password.
Setting the system properties 'javax.net.ssl.trustStore' and 'javax.net.ssl.trustStorePassword' overrides the default JVM truststore globally for all SSL contexts within the application. This allows the custom 'certs.jks' file to be used without modifying the JVM's default truststore, satisfying the security team's requirement. The new dependency causing the issue likely uses the default SSL context, which will now pick up the custom truststore via these system properties.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Set the system property 'javax.net.ssl.trustStore' to the path of 'certs.jks' and 'javax.net.ssl.trustStorePassword' to its password.
Why this is correct
This tells the JVM to use the custom truststore globally.
- ✗
Add the certificate to the default truststore using keytool and restart the application.
Why it's wrong here
The security team prohibits modifying the default truststore.
- ✗
Use the jlink tool to create a custom runtime image that includes the certificate.
Why it's wrong here
jlink does not handle truststore configuration; certificates still need to be placed.
- ✗
Create a custom TrustManager that bypasses all certificate validation.
Why it's wrong here
This would compromise security and is not a best practice.
Go deeper
Related to this question
About these practice questions
This 1Z0-829 question is part of Courseiva's 513-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
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.