Prevent StringIndexOutOfBoundsException with GlassFish