PortalKit: fix bug that null pointer exception thrown when only deploy war fiels