Resolved. It was my problem. Actually the ApplicationException class was using log4j. And it was not added to the classpath.
Thanks to all for helping me.