From 1c394e16088646ede01342996ecc39e6b7084cb8 Mon Sep 17 00:00:00 2001 From: William Bittles Date: Fri, 24 Jun 2022 14:58:20 +0100 Subject: [PATCH 1/8] Removes sonar scan security problem and a standard java warning Signed-off-by: William Bittles --- .../search/ffdc/SearchIntegratorAuditCode.java | 7 +++++++ .../contextmanager/SearchIntegratorContextManager.java | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java index a18492ff8ab..a4f344063a8 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java @@ -40,6 +40,13 @@ public enum SearchIntegratorAuditCode implements AuditLogMessageSet { "The integration connector is running but does not have a context. This is a timing issue in the integration daemon.", "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help."), + + REGISTER_CATALOG_ISTENER("OMIS-SEARCH-INTEGRATOR-0004", + OMRSAuditLogRecordSeverity.ERROR, + "An Exception was thrown while Egeria was attempting to register a Asset Catalog event listener", + "Resolve the issue preventing the registration of the listener", + "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + + "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help.") ; diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java index f22cea3da99..ac0ee412786 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java @@ -56,6 +56,7 @@ public SearchIntegratorContextManager() { * @param maxPageSize maximum number of results that can be returned on a single REST call * @param auditLog logging destination */ + @Override public void initializeContextManager(String partnerOMASServerName, String partnerOMASPlatformRootURL, String userId, @@ -80,6 +81,7 @@ public void initializeContextManager(String partnerOMASServerName, */ @Override public void createClients() throws InvalidParameterException { + String methodName = "createClients"; AssetCatalog restClient; if (localServerPassword == null) { restClient = new AssetCatalog(partnerOMASServerName, partnerOMASPlatformRootURL); @@ -102,7 +104,7 @@ public void createClients() throws InvalidParameterException { try { assetCatalogEventClient.registerListener(localServerUserId, eventListener); } catch (ConnectionCheckedException | ConnectorCheckedException | PropertyServerException | UserNotAuthorizedException e) { - e.printStackTrace(); + auditLog.logException(methodName,SearchIntegratorAuditCode.REGISTER_CATALOG_ISTENER.getMessageDefinition(),e); } AssetManagerRESTClient assetManagerRestClient; From 0e9e3891bc5af963ceaf21538b955faeb600e443 Mon Sep 17 00:00:00 2001 From: William Bittles Date: Fri, 24 Jun 2022 15:59:31 +0100 Subject: [PATCH 2/8] fix sonar security issue and 2 sonar Lint warnings Signed-off-by: William Bittles --- .../accessservices/subjectarea/fvt/CategoryFVT.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java index ba7ec31c791..1fc4642a4d3 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CategoryFVT.java @@ -45,7 +45,7 @@ public class CategoryFVT { * * Note this FVT is called by other FVTs. Who ever constructs the FVT should run deleteRemainingCategories */ - private Set createdCategoriesSet = new HashSet<>(); + private final Set createdCategoriesSet = new HashSet<>(); public static void main(String[] args) { String url; @@ -53,11 +53,11 @@ public static void main(String[] args) { url = RunAllFVTOn2Servers.getUrl(args); runWith2Servers(url); } catch (IOException e1) { - System.out.println("Error getting user input"); + log.error("Error getting user input"); } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); + log.error("ERROR: ", e ); } catch (InvalidParameterException | PropertyServerException | UserNotAuthorizedException e) { - e.printStackTrace(); + log.error("CategoryFVT RunAllFVTOn2Servers has thrown an exception ", e); } } From 160aa6d955658c1078d6f0b4cf622fd9e619656d Mon Sep 17 00:00:00 2001 From: William Bittles Date: Fri, 24 Jun 2022 17:04:57 +0100 Subject: [PATCH 3/8] fix Sonar Security Error and Sonar lambda errors and sonar log errors Signed-off-by: William Bittles --- .../fvt/CheckSerializationFVT.java | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java index 1d523163a49..93820a714e3 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/CheckSerializationFVT.java @@ -28,7 +28,7 @@ public class CheckSerializationFVT { private final SubjectAreaRelationshipClients subjectAreaRelationship; private final SubjectAreaNodeClient subjectAreaTerm; private final SubjectAreaNodeClient subjectAreaGlossary; - private static Logger log = LoggerFactory.getLogger(CheckSerializationFVT.class); + private static final Logger log = LoggerFactory.getLogger(CheckSerializationFVT.class); public CheckSerializationFVT(String url, String serverName, String userId) throws InvalidParameterException { this.userId = userId; @@ -44,11 +44,12 @@ public static void main(String[] args) { String url = RunAllFVTOn2Servers.getUrl(args); runWith2Servers(url); } catch (IOException e1) { - System.out.println("Error getting user input"); + log.error("Error getting user input", e1); } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage()); + log.error("ERROR: ", e); } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); + log.error("ERROR: ", e); + log.error(" Suggested action: {}", e.getReportedUserAction()); } } @@ -61,13 +62,13 @@ public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedExce public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { try { - System.out.println("CheckSerializationFVT runIt started"); + log.info("CheckSerializationFVT runIt started"); CheckSerializationFVT fvt = new CheckSerializationFVT(url, serverName, userId); fvt.run(); - System.out.println("CheckSerializationFVT runIt stopped"); + log.info("CheckSerializationFVT runIt stopped"); } catch (Exception error) { - error.printStackTrace(); + log.error("CheckSerializationFVT has thrown an exceptrion", error); throw error; } } @@ -106,7 +107,7 @@ public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) t createHasA(oneTermGuid, twoTermGuid); List hasAList = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - hasAList.removeIf(line -> line instanceof TermAnchor); + hasAList.removeIf(TermAnchor.class::isInstance); HasA hasA = checkCastChild(hasAList.get(0), HasA.class); subjectAreaRelationship.hasA().delete(userId, hasA.getGuid()); if (log.isDebugEnabled()) { @@ -115,7 +116,7 @@ public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) t createIsA(oneTermGuid, twoTermGuid); List isAList = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - isAList.removeIf(line -> line instanceof TermAnchor); + isAList.removeIf(TermAnchor.class::isInstance); IsA isA = checkCastChild(isAList.get(0), IsA.class); subjectAreaRelationship.isA().delete(userId, isA.getGuid()); if (log.isDebugEnabled()) { @@ -124,7 +125,7 @@ public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) t createRelatedTerm(oneTermGuid,twoTermGuid); List relatedTerms = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - relatedTerms.removeIf(line -> line instanceof TermAnchor); + relatedTerms.removeIf(TermAnchor.class::isInstance); RelatedTerm relatedTerm = checkCastChild(relatedTerms.get(0), RelatedTerm.class); subjectAreaRelationship.relatedTerm().delete(userId, relatedTerm.getGuid()); if (log.isDebugEnabled()) { @@ -133,7 +134,7 @@ public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) t createTranslation(oneTermGuid, twoTermGuid); List translations = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - translations.removeIf(line -> line instanceof TermAnchor); + translations.removeIf(TermAnchor.class::isInstance); Translation translation = checkCastChild(translations.get(0), Translation.class); subjectAreaRelationship.translation().delete(userId, translation.getGuid()); if (log.isDebugEnabled()) { @@ -142,7 +143,7 @@ public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) t createPreferredTerm(oneTermGuid, twoTermGuid); List preferredTerms = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - preferredTerms.removeIf(line -> line instanceof TermAnchor); + preferredTerms.removeIf(TermAnchor.class::isInstance); PreferredTerm preferredTerm = checkCastChild(preferredTerms.get(0), PreferredTerm.class); subjectAreaRelationship.preferredTerm().delete(userId, preferredTerm.getGuid()); if (log.isDebugEnabled()) { @@ -151,7 +152,7 @@ public void checkChildrenSerialization(String oneTermGuid, String twoTermGuid) t createSynonym(oneTermGuid, twoTermGuid); List synonyms = subjectAreaTerm.getAllRelationships(userId, oneTermGuid); - synonyms.removeIf(line -> line instanceof TermAnchor); + synonyms.removeIf(TermAnchor.class::isInstance); Synonym synonym = checkCastChild(synonyms.get(0), Synonym.class); subjectAreaRelationship.synonym().delete(userId, synonym.getGuid()); if (log.isDebugEnabled()) { From 96380063fed942688f1a29325d89331df9ccab8f Mon Sep 17 00:00:00 2001 From: William Bittles Date: Fri, 24 Jun 2022 18:06:18 +0100 Subject: [PATCH 4/8] fix Sonar Security Error and other Sonar lint warnings Signed-off-by: William Bittles --- .../subjectarea/fvt/ConfigFVT.java | 29 +++++++++---------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java index 9bfab139197..826283d6c84 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/ConfigFVT.java @@ -4,10 +4,7 @@ import org.odpi.openmetadata.accessservices.subjectarea.client.SubjectAreaRestClient; import org.odpi.openmetadata.accessservices.subjectarea.client.configs.SubjectAreaConfigClient; -import org.odpi.openmetadata.accessservices.subjectarea.client.nodes.glossaries.SubjectAreaGlossaryClient; import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.Config; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary; -import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.term.Term; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException; import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; @@ -22,12 +19,12 @@ */ public class ConfigFVT { - private String serverName = null; - private String userId = null; - private String url = null; - private static Logger log = LoggerFactory.getLogger(ConfigFVT.class); + private final String serverName; + private final String userId; + private final String url; + private static final Logger log = LoggerFactory.getLogger(ConfigFVT.class); - public static void main(String args[]) + public static void main(String[] args) { try { @@ -35,15 +32,16 @@ public static void main(String args[]) runWith2Servers(url); } catch (IOException e1) { - System.out.println("Error getting user input"); + log.error("Error getting user input"); } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); + log.error("ERROR: ", e ); } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); + log.error("ERROR: ",e); + log.error(" Suggested action: {}", e.getReportedUserAction()); } } - public ConfigFVT(String url, String serverName, String userId) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException { + public ConfigFVT(String url, String serverName, String userId) { if (log.isDebugEnabled()) { log.debug("Config FVT"); } @@ -56,12 +54,13 @@ public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedExcep runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); } - synchronized public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { + + public static synchronized void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { try { - System.out.println("ConfigFVT runIt started"); + log.info("ConfigFVT runIt started"); ConfigFVT fvt =new ConfigFVT(url, serverName, userId); fvt.run(); - System.out.println("ConfigFVT runIt stopped"); + log.info("ConfigFVT runIt stopped"); } catch (Exception error) { error.printStackTrace(); From 36f17a1c25da11f1adae761825223bbee4e1f3af Mon Sep 17 00:00:00 2001 From: William Bittles Date: Mon, 27 Jun 2022 09:38:28 +0100 Subject: [PATCH 5/8] comment out two sonar high security hotspot warnings Signed-off-by: William Bittles --- .../generichandlers/OpenMetadataAPIMapper.java | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java index bb14712d4ca..edc396e2cef 100644 --- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java +++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIMapper.java @@ -746,11 +746,23 @@ public class OpenMetadataAPIMapper public static final String NOTE_ENTRY_TYPE_NAME = "NoteEntry"; /* from Area 1 */ /* Referenceable */ - public static final String NOTE_LOG_AUTHOR_RELATIONSHIP_TYPE_GUID = "8f798c0c-6769-4a2d-b489-12714d89e0a4"; + /* + The below constants which contain the pattern + ..AUTH..="GUID" + looks exactly like + myAuth = SECURITY_SECRET + which is considered a security risk. + As both constants are currently unused I've commented them out assuming they are intended to be used in the future. + If the contsnats are re enabled in the future they will raise 2 HIGH Security Hotspot errors on SONAR cloud. + NB these warning are not reported by default when running SonarLint locally,currently they are only visible in the cloud version. + newly commented out lines will generate new SONAR warnings, hopefully at a lower SEV. + */ + + /* public static final String NOTE_LOG_AUTHOR_RELATIONSHIP_TYPE_GUID = "8f798c0c-6769-4a2d-b489-12714d89e0a4"; */ public static final String NOTE_LOG_AUTHOR_RELATIONSHIP_TYPE_NAME = "NoteLogAuthorship"; /* End1 = NoteLogAuthor; End 2 = NoteLog */ - public static final String NOTE_LOG_AUTHOR_TYPE_GUID = "3a84d94c-ac6f-4be1-a72a-07dbec7b1fe3"; + /* public static final String NOTE_LOG_AUTHOR_TYPE_GUID = "3a84d94c-ac6f-4be1-a72a-07dbec7b1fe3"; */ public static final String NOTE_LOG_AUTHOR_TYPE_NAME = "NoteLogAuthor"; /* from Area 1 */ /* PersonRole */ From 0f801a8dcd5e6299bc67f2ef3b3968a175736f96 Mon Sep 17 00:00:00 2001 From: William Bittles Date: Mon, 27 Jun 2022 10:56:17 +0100 Subject: [PATCH 6/8] fix sonar scan security hotspot warnings Signed-off-by: William Bittles --- .../subjectarea/fvt/EffectiveDatesFVT.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java index 95bab8896e9..257866ee2ec 100644 --- a/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java +++ b/open-metadata-test/open-metadata-fvt/access-services-fvt/subject-area-fvt/src/main/java/org/odpi/openmetadata/accessservices/subjectarea/fvt/EffectiveDatesFVT.java @@ -24,10 +24,10 @@ public class EffectiveDatesFVT private static final String DEFAULT_TEST_TERM_NAME = "Test term A"; private GlossaryFVT glossaryFVT =null; private TermFVT termFVT=null; - private static Logger log = LoggerFactory.getLogger(EffectiveDatesFVT.class); + private static final Logger log = LoggerFactory.getLogger(EffectiveDatesFVT.class); - public static void main(String args[]) + public static void main(String[] args) { try { @@ -35,11 +35,12 @@ public static void main(String args[]) runWith2Servers(url); } catch (IOException e1) { - System.out.println("Error getting user input"); + log.error("Error getting user input", e1); } catch (SubjectAreaFVTCheckedException e) { - log.error("ERROR: " + e.getMessage() ); + log.error("ERROR: {}", e.getMessage()); } catch (UserNotAuthorizedException | InvalidParameterException | PropertyServerException e) { - log.error("ERROR: " + e.getReportedErrorMessage() + " Suggested action: " + e.getReportedUserAction()); + log.error("ERROR: {}",e.getReportedErrorMessage()); + log.error(" Suggested action: {}", e.getReportedUserAction()); } } @@ -58,17 +59,18 @@ public static void runWith2Servers(String url) throws SubjectAreaFVTCheckedExcep runIt(url, FVTConstants.SERVER_NAME1, FVTConstants.USERID); runIt(url, FVTConstants.SERVER_NAME2, FVTConstants.USERID); } - synchronized public static void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { + + public static synchronized void runIt(String url, String serverName, String userId) throws InvalidParameterException, SubjectAreaFVTCheckedException, PropertyServerException, UserNotAuthorizedException { try { - System.out.println("EffectiveDatesFVT runIt started"); + log.info("EffectiveDatesFVT runIt started"); EffectiveDatesFVT fvt = new EffectiveDatesFVT(url, serverName, userId); fvt.run(); fvt.deleteRemaining(); - System.out.println("EffectiveDatesFVT runIt stopped"); + log.info("EffectiveDatesFVT runIt stopped"); } catch (Exception error) { - error.printStackTrace(); + log.error("EffectiveDatesFVT encountered an exception", error); throw error; } } From 865de2033ebb5fb7671bf68f9fe3bce178c60977 Mon Sep 17 00:00:00 2001 From: William Bittles Date: Tue, 28 Jun 2022 09:10:41 +0100 Subject: [PATCH 7/8] indentation test Signed-off-by: William Bittles --- .../search/ffdc/SearchIntegratorAuditCode.java | 2 +- .../search/contextmanager/SearchIntegratorContextManager.java | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java index a4f344063a8..e85bcbe9ca0 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java @@ -40,7 +40,7 @@ public enum SearchIntegratorAuditCode implements AuditLogMessageSet { "The integration connector is running but does not have a context. This is a timing issue in the integration daemon.", "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help."), - + /*indent hack*/ REGISTER_CATALOG_ISTENER("OMIS-SEARCH-INTEGRATOR-0004", OMRSAuditLogRecordSeverity.ERROR, "An Exception was thrown while Egeria was attempting to register a Asset Catalog event listener", diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java index ac0ee412786..9d5471fcb1f 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java @@ -104,6 +104,7 @@ public void createClients() throws InvalidParameterException { try { assetCatalogEventClient.registerListener(localServerUserId, eventListener); } catch (ConnectionCheckedException | ConnectorCheckedException | PropertyServerException | UserNotAuthorizedException e) { + /* git indent hack */ auditLog.logException(methodName,SearchIntegratorAuditCode.REGISTER_CATALOG_ISTENER.getMessageDefinition(),e); } From 23c02b0a72c6ae2906f556c0ea97258d5c1f1193 Mon Sep 17 00:00:00 2001 From: William Bittles Date: Tue, 28 Jun 2022 10:18:46 +0100 Subject: [PATCH 8/8] typo fix Signed-off-by: William Bittles --- .../search/ffdc/SearchIntegratorAuditCode.java | 2 +- .../search/contextmanager/SearchIntegratorContextManager.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java index e85bcbe9ca0..1a283fccb29 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/ffdc/SearchIntegratorAuditCode.java @@ -41,7 +41,7 @@ public enum SearchIntegratorAuditCode implements AuditLogMessageSet { "Gather information about the connector's configuration, the types of metadata it was integrating, the audit log messages " + "from the integration daemon and its partner metadata server. Then contact the Egeria community to get help."), /*indent hack*/ - REGISTER_CATALOG_ISTENER("OMIS-SEARCH-INTEGRATOR-0004", + REGISTER_CATALOG_LISTENER("OMIS-SEARCH-INTEGRATOR-0004", OMRSAuditLogRecordSeverity.ERROR, "An Exception was thrown while Egeria was attempting to register a Asset Catalog event listener", "Resolve the issue preventing the registration of the listener", diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java index 9d5471fcb1f..e70322003a5 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java @@ -105,7 +105,7 @@ public void createClients() throws InvalidParameterException { assetCatalogEventClient.registerListener(localServerUserId, eventListener); } catch (ConnectionCheckedException | ConnectorCheckedException | PropertyServerException | UserNotAuthorizedException e) { /* git indent hack */ - auditLog.logException(methodName,SearchIntegratorAuditCode.REGISTER_CATALOG_ISTENER.getMessageDefinition(),e); + auditLog.logException(methodName,SearchIntegratorAuditCode.REGISTER_CATALOG_LISTENER.getMessageDefinition(),e); } AssetManagerRESTClient assetManagerRestClient;