I’ve spent the last days tracking down a bug in a Production environment, which I could not for the love of God reproduce locally. For future reference more than anything, I’m leaving here what I understand should be checked when trying to assertain environment differences affecting a Java Web application, sorted by (again in my opinion) relevance.

  • The obvious: JRE version and vendor, Application Server version;
  • Shared libraries versions;
  • Database vendor, version, character sets, collations, and so on;
  • Configuration for services that the application relies on;
  • Application Server startup parameters;
  • A long list of etc’s that may grow in time

The point is that, for this particular issue, I’ve completely overlooked the shared libraries. A buggy implementation of the JavaMail API was deployed in Production, introducing seemingly random encoding problems. It was almost a matter of luck finding this issue. Regarding shared libraries, and in particular those such as JAF and JavaMail, I tend to assume the JARs downloaded from SunOracle Java are deployed. Big and time consuming mistake that I hope I won’t make again.