SAP GUI launch session ends with generalServerErrorException

I am trying to open SAP GUI session with GuiSessionFactory.launch method. It opens the session successfully but end up with a GenearalServerErrorException : General Error occurred  

Any suggestion on how to get it resolved ?