I had a very interesting experience today while testing communication between a SOAP client and server. I had Tomcat running with SOAP and was running the following command via DOS:

java za.co.package.soap.client.GetCountApp

I was continually getting the same error related to ClassNotFound errors. I adjusted and re-adjusted my CLASSPATH oover and over again, moved files around all in an attempt to fix this problem. But every time I ran the command again the same problem persisted. After about a hour I got extremely frustrated and just closed the DOS window and took a break.

Now here is the interesting bit…

I did not change a thing, fired up the DOS window and ran the same command again. Hey Presto! It works! Now what this tells me is that DOS had to have been caching the response returned from Tomcat and continually feeding me the same response. Closing the window cleared the cache and the command was sent to Tomcat again which this time responded with the correct response.

This was a big surprise to me and I thought I would share it with everyone. If I am wrong and DOS was not caching what was it doing? Please feel free to leave your comments here.

Cheers!