This may be caused by many reasons, the following is solution for the one that I faced
- Set max perm size
-Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m
You should modify the value as long as suitable for your situation
- Using higher jdk version
In this case I update my jdk version to 8