Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service context null pointer #7593

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ protected Path getBaseMetadataDir(ServiceContext context, Path metadataFullDir)
}

private GeonetworkDataDirectory getDataDirectory(ServiceContext context) {
return context.getBean(GeonetworkDataDirectory.class);
return ApplicationContextHolder.get().getBean(GeonetworkDataDirectory.class);
}

/**
Expand Down Expand Up @@ -690,7 +690,7 @@ protected MetadataResourceExternalManagementProperties getMetadataResourceExtern

if (metadataResourceExternalManagementPropertiesUrl.contains("{lang}") || metadataResourceExternalManagementPropertiesUrl.contains("{ISO3lang}")) {
final IsoLanguagesMapper mapper = ApplicationContextHolder.get().getBean(IsoLanguagesMapper.class);
String contextLang = context.getLanguage() == null ? Geonet.DEFAULT_LANGUAGE : context.getLanguage();
String contextLang = context==null || context.getLanguage() == null ? Geonet.DEFAULT_LANGUAGE : context.getLanguage();
String lang;
String iso3Lang;

Expand Down
Loading