mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fix server startup issues
This commit is contained in:
parent
175205b959
commit
572e93a357
@ -123,9 +123,15 @@ public class DeviceTypeManager implements DeviceManager {
|
|||||||
//add license to registry.
|
//add license to registry.
|
||||||
this.licenseManager = new MetaRepositoryBasedLicenseManager();
|
this.licenseManager = new MetaRepositoryBasedLicenseManager();
|
||||||
try {
|
try {
|
||||||
licenseManager.getLicense(deviceType, DeviceTypePluginConstants.LANGUAGE_CODE_ENGLISH_US);
|
if (deviceTypeConfiguration.getLicense() != null) {
|
||||||
|
License defaultLicense = new License();
|
||||||
|
defaultLicense.setLanguage(deviceTypeConfiguration.getLicense().getLanguage());
|
||||||
|
defaultLicense.setVersion(deviceTypeConfiguration.getLicense().getVersion());
|
||||||
|
defaultLicense.setText(deviceTypeConfiguration.getLicense().getText());
|
||||||
|
licenseManager.addLicense(deviceType, defaultLicense);
|
||||||
|
}
|
||||||
} catch (LicenseManagementException e) {
|
} catch (LicenseManagementException e) {
|
||||||
String msg = "Error occurred while loading license of device type: " + deviceType;
|
String msg = "Error occurred while adding default license of device type: " + deviceType;
|
||||||
throw new DeviceTypeDeployerPayloadException(msg, e);
|
throw new DeviceTypeDeployerPayloadException(msg, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -117,6 +117,5 @@ public class MetaRepositoryBasedLicenseManager implements LicenseManager {
|
|||||||
log.error(msg, e);
|
log.error(msg, e);
|
||||||
throw new LicenseManagementException(msg, e);
|
throw new LicenseManagementException(msg, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user