Why would a previously solid, stable, Win2K3 box running CFMX6.1 standard suddenly start throwing a java.lang.NoSuchMethodError on any CFHTTP calls?
(note: this is NOT the box which falls over in the middle of the night with a JRun Guard Page Exception, this is another one!)
This line of code:
<cfhttp method="get" url="http://www.google.com" >
...in fact ANY cfhttp call, to any url, with any combination of parameters...
has just started throwing this error:
here's the stack trace:
at cftest2ecfm1025982501.runPage(«path removed»\test.cfm:11)
The NoSuchMethodError javadoc says the following:
"Thrown if an application tries to call a specified method of a class (either static or instance), and that class no longer has a definition of that method.
Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed."
So this kind of implies that either:
- One or more of the CFMX jar files has changed
- The Java Runtime Environment has changed
yet a quick search shows that neither is the case.
java -version from the command prompty is showing 1.4.2_08-b03
The CF Administrator System Information page shows :
Java VM Version 1.4.2-b28
and this is what I get if I cd into the cfusionmx/runtime/jre/bin directory and run java -version from there.
The only files under CFusionMX that have changed since 1st August are log files, verity collections or in wwwroot/WEB-INF/cfclasses/
My first thought was "has someone been fiddling about with the JVM?" but it appears not. No new code has been released on this box in weeks, nothing has changed in the CF Administrator, and no-one has applied any updates to the box for weeks.... yet it's just started throwing this error on all CHTTP calls.
Maybe it's that marvellous Automatic Updates feature in W2K3?
Anyone else had this problem? Anyone JUST STARTED having this?
If so, maybe we can try to find common elements and track down the cause.
I think I've isolated the cause - we had a custom Java-based CFHTTP replacement on the same box which was built around the HTTPClient lib. In deploying this project, we added a HTTPClient.jar onto the classpath, and it looks like that was causing the issue - a conflict with the httpclient.jar (note case) in the CFusionMX/runtime/lib directory.
When I deleted that second HTTPClient.jar file and restarted the server, the CFHTTP calls started working again.
HOWEVER - the custom-made Java-based CFHTTP replacement calls don't work any more........... it's another one of those "works perfectly on dev, but won't work at all on live" issues that we all know and love so well.