Absolute number one reason for problems arising in the manufacturing process, but not in development, Environment .
Your production machine is most likely configured quite differently than your development machine. For example, you can develop your Java application on a Windows PC when deployed to a Linux server.
It is important to try and develop the same applications and libraries that you will implement in production. Here is a quick checklist:
- Make sure that the version of the JVM you are using in development is the same on the production machine (
java -version ). - Make sure that the application server (e.g. Tomcat, Resin) is the same version as during development.
- Make sure that the version of the database you are using is the same as during development.
- Ensure that the libraries (such as the database driver) installed on the production computer are the same versions as in development.
- Verify that the user has the correct permissions on the production server.
Of course, you cannot always get the same thing - many Linux servers now work in a 64-bit environment, while this is not always the case (for now!) With standard development machines. But, the rule remains that if you can get your environment as close as possible, you will minimize such problems.
Ideally, you should create an intermediate server (which can be a virtual machine, not a real server) that has (or as close as possible) to the same environment as the production server.
If you can afford an intermediate server, the deployment process should look something like this:
- Ensure that the application runs locally during the development process and ensures that all unit and functional tests are passed into development
- Deploy on an intermediate server. Make sure all tests pass.
- Once you are happy, turn around to production
source share