Hi all,
I am facing an issue regarding a Java error in the CP4I Platform. The code (Sign and Verify) is working fine in the local App Connect toolkit, but whenever I am deploying the same application into a container, it is throwing an error. For your reference, please find the below error message:
Error:
Illegal base64 character d
2023-07-28 15:58:54.752 37 at java.util.Base64$Decoder.decode0(Base64.java:725)
2023-07-28 15:58:54.752 37 at java.util.Base64$Decoder.decode(Base64.java:537)
2023-07-28 15:58:54.753 37 at java.util.Base64$Decoder.decode(Base64.java:560)
2023-07-28 15:58:54.753 37 at com.esb.java.GenerateSignature.getPrivateKey(GenerateSignature.java:65)
2023-07-28 15:58:54.754 37 at com.esb.java.GenerateSignature.getSignature(GenerateSignature.java:76)
Exception in thread "Thread-22" 2023-07-28 15:58:54.754 37 java.lang.NullPointerException
2023-07-28 15:58:54.755 37 at java.util.Base64$Encoder.encode(Base64.java:272)
2023-07-28 15:58:54.755 37 at java.util.Base64$Encoder.encodeToString(Base64.java:326)
2023-07-28 15:58:54.756 37 at com.esb.java.GenerateSignature.getSignature(GenerateSignature.java:94)
Actually, I am storing the cert and key in PEM format on my local drives and providing the same path reference in the code(esql), which is working fine. However, when I deploy it in the CP4I platform using a generic type(created at configuration section) and upload a zip file containing the cert and key in PEM format, and then give a reference to an independent integration server (generic file), I encounter the above error.
Can anyone help me out with this?
Additionally, I would like to know why, when I attach the cert and key to the Java project, it is not being reflected when I deploy it in the CP4I platform. But when I am trying to develop the same in my local App Connect toolkit the code works fine( when I use the names of the cert and key directly in the code). However, during deployment, I encounter an error stating "file not found" as if the attached cert and key are not accessible.
------------------------------
Anusha Pudari
------------------------------