SVT: Improve error handling when DB2 password cannot be decrypted #29617
Labels
in:JPA
release bug
This bug is present in a released version of Open Liberty
serviceability
Label used to track serviceability related issues
team:Core Security
Describe the bug
A clear and concise description of what the bug is.
I am testing custom AES key as the feature is added to WebSphere/Open Liberty Operator.
I tried incorrect AES password which is not encrypted with provided AES key and I see exceptions during startup (defect). This defect is about the exceptions which happen when application is accessed and DB2 call is made. We need to handle this exceptions better than NullPointerException.
If there is a stack trace, please include the FULL stack trace (without any
[internal classes]
lines in it). To find the full stack trace, you may need to check in$WLP_OUTPUT_DIR/messages.log
Steps to Reproduce
Steps to reproduce the bug
I saw the problem for Liberty application deployed in OCP cluster but it is equivalent to below steps:
[9/9/24, 20:56:39:771 UTC] 00000056 eclipselink I CWWJP9990I: [eclipselink] EclipseLink, version: Eclipse Persistence Services - 3.0.3.v202208190922 [9/9/24, 20:56:39:772 UTC] 00000056 eclipselink.ejb E CWWJP9992E: java.lang.NullPointerException: Cannot invoke "java.lang.String.toCharArray()" because "this.password" is null [9/9/24, 20:56:39:774 UTC] 00000056 SystemErr R jakarta.persistence.PersistenceException: java.lang.NullPointerException: Cannot invoke "java.lang.String.toCharArray()" because "this.password" is null [9/9/24, 20:56:39:776 UTC] 00000056 SystemErr R at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:853)
Expected behavior
A clear and concise description of what you expected to happen.
Clear exception when password cannot be decrypted rather than
CWWJP9992E: java.lang.NullPointerException: Cannot invoke "java.lang.String.toCharArray()" because "this.password" is null
Diagnostic information:
java -version
]$WLP_OUTPUT_DIR/messages.log
Liberty version 24.0.0.8
Eclipse OpenJ9 VM, version 17.0.8.1+1 (en_US)
Additional context
Add any other context about the problem here.
Refer to defect: #29616
The text was updated successfully, but these errors were encountered: