-
Bug
-
Resolution: Unresolved
-
None
-
certsys-11.0
Description of problem:
The error message should be optimized coming at PKI 'ca-profile-add asdf' command
Version-Release number of selected component (if applicable):
redhat-pki-10.11.1-3.module+el8pki+12951+5b86c4f5.src.rpm
How reproducible:
Always
Steps to Reproduce:
1. Execute the below command:
- pki -d /opt/pki/certdb/ -c SECret.123 -p 20443 -n 'PKI CA Administrator for Example.Org' ca-profile-add asdf
java.nio.file.NoSuchFileException: asdf
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
at java.base/java.nio.file.Files.newByteChannel(Files.java:371)
at java.base/java.nio.file.Files.newByteChannel(Files.java:422)
at java.base/java.nio.file.Files.readAllBytes(Files.java:3206)
at java.base/java.nio.file.Files.readString(Files.java:3284)
at java.base/java.nio.file.Files.readString(Files.java:3243)
at com.netscape.cmstools.profile.ProfileCLI.readProfileFromFile(ProfileCLI.java:135)
at com.netscape.cmstools.profile.ProfileAddCLI.execute(ProfileAddCLI.java:68)
at org.dogtagpki.cli.CommandCLI.execute(CommandCLI.java:58)
at org.dogtagpki.cli.CLI.execute(CLI.java:357)
at org.dogtagpki.cli.CLI.execute(CLI.java:357)
at com.netscape.cmstools.cli.SubsystemCLI.execute(SubsystemCLI.java:79)
at org.dogtagpki.cli.CLI.execute(CLI.java:357)
at com.netscape.cmstools.cli.MainCLI.execute(MainCLI.java:656)
at com.netscape.cmstools.cli.MainCLI.main(MainCLI.java:694)
Actual results:
It is generating the non-readable exception and it does not look like a user-friendly error.
Expected results:
The error message should be optimized and it should generate the proper user-friendly exception like it was generating in RHEL8 as below:
- pki -d /root/nssdb -c SECret.123 -p 8443 -n 'PKI Administrator for example.com' ca-profile-add asdf
FileNotFoundException: asdf (No such file or directory)
Additional info: