The following article explains the different pitfalls for image scaling with java quite well. And it includes some code how to do it right.
http://today.java.net/pub/a/today/2007/04/03/perils-of-image-getscaledinstance.html
If you use the multistep scaling flag of the provided helper method, ensure that your server has enough memory.