Fix broken GlassFish 3.1.2
Fix for #823