try{
GatewayResource gateway = (GatewayResource)ResourceUtils.createGateway(ServerSettings.getSystemUserGateway());
gateway.save();
UserResource user = ResourceUtils.createUser(ServerSettings.getSystemUser(), ServerSettings.getSystemUserPassword());
user.save();
WorkerResource workerResource = (WorkerResource)gateway.create(ResourceType.GATEWAY_WORKER);
workerResource.setUser(user.getUserName());
workerResource.save();
ProjectResource projectResource = workerResource.createProject(DEFAULT_PROJECT_NAME);
projectResource.setName(DEFAULT_PROJECT_NAME);
projectResource.setGateway(gateway);
projectResource.save();
} catch (ApplicationSettingsException e) {
logger.error("Unable to read airavata-server properties...", e.getMessage());