Fixing error in jpa query