Skip to main content
Inspiring
May 10, 2021
Answered

CFHTTP Issue & Java Update

  • May 10, 2021
  • 1 reply
  • 1832 views

Recently one of my CFHTTP calls stopped working, the authentication that was working on the calling page is no longer working. I verified with the owners of the page i'm calling that nothing has changed on their end.  I did some googling and found Charlie Arehart's post about CFHTTP issue might have to do with JVM and that JVM should be updated.

 

My ColdFusion 2016 server is on Java version 1.8.0_112 and CF Update 5.  I know both the Java and CF need to be updated, long story short, we lost our server guy and we have no one to keep on top of updates.  

 

Based off the article, I updated the server to Java 1.8.0_281. My CFHTTP issue still hasn't resolved but now I am receiving the following error from another CFHTTP call.  I tried a lower version of Java 1.8.0_271 and Java 1.8.0_121 but still seeing the same error.

 

struct

Charset[empty string]
ErrorDetailI/O Exception: sun.security.validator.ValidatorException: PKIX path building failed: java.security.cert.CertPathBuilderException: Could not build a validated path.
FilecontentConnection Failure
Header[empty string]
MimetypeUnable to determine MIME type of file.
Responseheaderstruct [empty]
StatuscodeConnection Failure. Status code unavailable.
TextYES

 

I know it's probably a chicken and egg thing with the Java update and the CF updates but I am throwing it out to see if anyone has any ideas as how to resolve this issue.  Should I do the CF updates first then the Java update or visa-versa. I'm a programmer doing server updates with limited knowledge of Linux so it's always an adventure!

 

Server Details
Server ProductColdFusion
Version2016,0,05,303689
EditionEnterprise  
Operating SystemUNIX  
OS Version3.10.0-327.36.1.el7.x86_64  
Tomcat Version8.5.11.0  
Java Version1.8.0_112  

 

Thanks in advanced for any help you can give me,

Jennifer

 

This topic has been closed for replies.
Correct answer BKBK

After you install a new Java version, you have to import the security key of the site into the Java key store. The process is something like this:

 

1) Download a copy of the key. If you don't know how, google it. It's easy. 🙂

2) Locate the tool [JAVA_HOME]/bin/keytool of the new Java installation. Run as admin/sudo the command to import the key. It is something like 

 

keytool -import -alias myCertificateAlias -file "\path\to\myCertFile.cer" -keystore "[JAVA_HOME]\lib\security\cacerts" -storepass changeit

 

where

 

  • myCertificateAlias is my custom certificate alias. Choose your own;
  • \path\to\myCertFile.cer is the absolute path to the .cer file obtained in the first step;
  • JAVA_HOME is the path to your new Java installation;
  • changeit is my custom password. Choose your own.

 

Note: Store myCertificateAlias and changeit in a safe place. You will need them if you decide in future to remove the key from the key store.

 

1 reply

BKBK
Community Expert
BKBKCommunity ExpertCorrect answer
Community Expert
May 11, 2021

After you install a new Java version, you have to import the security key of the site into the Java key store. The process is something like this:

 

1) Download a copy of the key. If you don't know how, google it. It's easy. 🙂

2) Locate the tool [JAVA_HOME]/bin/keytool of the new Java installation. Run as admin/sudo the command to import the key. It is something like 

 

keytool -import -alias myCertificateAlias -file "\path\to\myCertFile.cer" -keystore "[JAVA_HOME]\lib\security\cacerts" -storepass changeit

 

where

 

  • myCertificateAlias is my custom certificate alias. Choose your own;
  • \path\to\myCertFile.cer is the absolute path to the .cer file obtained in the first step;
  • JAVA_HOME is the path to your new Java installation;
  • changeit is my custom password. Choose your own.

 

Note: Store myCertificateAlias and changeit in a safe place. You will need them if you decide in future to remove the key from the key store.

 

CF_JenAuthor
Inspiring
May 11, 2021

Thank you BKBK!  I was able to download the .cert file via my broswer for the site and installed it in the new java key store and the CFHTTP call is working as expected. Thank you for your help.