I could fix it using below steps.(GlassFish server3.1.2.2 and eclipse Luna 4.4.1)
- Help > Eclipse Marketplace > Search GlassFish > you will see
GlassFish Tools > Select appropriate one and install it.
- Restart eclipse
- Windows > Open Views > Other > Server > Servers > GlassFish 3.1
- You will need jdk1.7.0 added to Installed JRE. Close the previous window to take effect of new default jdk1.7.0.