I don't have anything using java from rpg anymore, but couple of questions. Does this always run as one user? Do you have other stuff running that invokes a JVM? The reason I ask, is you may can use the system.properties file to do some of this.
On Fri, 2021-09-10 at 13:37 +0000, Blake Butterworth wrote:
[You don't often get email from bbutterworth@xxxxxxxxxxxxxx<mailto:bbutterworth@xxxxxxxxxxxxxx>. Learn why this is important at
http://aka.ms/LearnAboutSenderIdentification.]
Hello All,
We have an RPG application that uses a Java class to perform HTTPS REST requests to an external web API. The connectivity between the systems broke recently (probably due to an update applied on the other side). We’ve determined the problem is that the process needs to establish a TLS 1.2-level connection since by default the Java environment appears to use an older, now unsupported version of TLS. We found a way to enable the Java code to establish a TLS 1.2 connection with the following property:
-Dcom.ibm.jsse2.overrideDefaultTLS=true
When we run a Java test app within QSH from the command line, it causes the Java code to negotiate a connection using TLS 1.2, which fixes our problem.
Java -Dcom.ibm.jsse2.overrideDefaultTLS=true <class>
When we put the property into the RPG program using the QIBM_RPG_JAVA_PROPERTIES environment variable, it fails. The JVM has an error on startup. We tried using ADDENVVAR and then the command line invocation without the property, which doesn’t work either. Lastly, we tried putting the property in a SystemDefault.properties file. It seems the system sees the property, but the JVM fails on startup.
Has anyone else run into something like this? Is there a better/alternate way to configure Java to use TLS 1.2? We are currently running Java 8 on IBM i 7.2. Sorry, this is kind of a cross-over question. I can post it to the RPG side, if need be.
Thanks,
Blake Butterworth
Application Development Manager
Kansas Turnpike Authority
--
This is the Java Programming on and around the IBM i (JAVA400-L) mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxxxxxxxx<mailto:JAVA400-L@xxxxxxxxxxxxxxxxxx>
To subscribe, unsubscribe, or change list options,
visit:
https://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxxxxxxxx<mailto:JAVA400-L-request@xxxxxxxxxxxxxxxxxx>
Before posting, please take a moment to review the archives
at
https://archive.midrange.com/java400-l.
Help support midrange.com by shopping at amazon.com with our affiliate
link:
https://amazon.midrange.com
[
https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
As an Amazon Associate we earn from qualifying purchases.