Please use logger to print error messages.
Read this please - http://stackoverflow.com/questions/7469316/why-is-exception-printstacktrace-considered-bad-practice