diff --git a/common-authentication/src/main/java/org/alfresco/hxi_connector/common/adapters/auth/DefaultAuthenticationClient.java b/common-authentication/src/main/java/org/alfresco/hxi_connector/common/adapters/auth/DefaultAuthenticationClient.java index da418eff..a3eac4e7 100644 --- a/common-authentication/src/main/java/org/alfresco/hxi_connector/common/adapters/auth/DefaultAuthenticationClient.java +++ b/common-authentication/src/main/java/org/alfresco/hxi_connector/common/adapters/auth/DefaultAuthenticationClient.java @@ -35,7 +35,9 @@ import static org.alfresco.hxi_connector.common.util.ErrorUtils.UNEXPECTED_STATUS_CODE_MESSAGE; import java.net.URI; +import java.util.Collections; import java.util.Map; +import java.util.Optional; import java.util.Set; import lombok.RequiredArgsConstructor; @@ -47,6 +49,7 @@ import org.apache.camel.model.dataformat.JsonLibrary; import org.alfresco.hxi_connector.common.adapters.auth.config.properties.AuthProperties; +import org.alfresco.hxi_connector.common.config.properties.Retry; import org.alfresco.hxi_connector.common.util.EnsureUtils; import org.alfresco.hxi_connector.common.util.ErrorUtils; @@ -136,7 +139,7 @@ private String createEncodedBody(String providerId) private void wrapErrorIfNecessary(Exchange exchange) { Exception cause = exchange.getProperty(Exchange.EXCEPTION_CAUGHT, Exception.class); - Set> retryReasons = authProperties.getRetry().reasons(); + Set> retryReasons = Optional.ofNullable(authProperties.getRetry()).map(Retry::reasons).orElse(Collections.emptySet()); ErrorUtils.wrapErrorIfNecessary(cause, retryReasons); } diff --git a/prediction-applier-extension/pom.xml b/prediction-applier-extension/pom.xml index 7a1072c2..a3c7effa 100644 --- a/prediction-applier-extension/pom.xml +++ b/prediction-applier-extension/pom.xml @@ -157,7 +157,7 @@ org.apache.camel:camel-http-base org.apache.camel:camel-http-common org.apache.camel:camel-http - org.apache.httpcomponents.client5:httpclient5 + org.apache.httpcomponents.core5:httpcore5 diff --git a/prediction-applier-extension/src/main/resources/alfresco/module/alfresco-hxinsight-connector-prediction-applier-extension/context/service-context.xml b/prediction-applier-extension/src/main/resources/alfresco/module/alfresco-hxinsight-connector-prediction-applier-extension/context/service-context.xml index feb7efb7..fdad86f4 100644 --- a/prediction-applier-extension/src/main/resources/alfresco/module/alfresco-hxinsight-connector-prediction-applier-extension/context/service-context.xml +++ b/prediction-applier-extension/src/main/resources/alfresco/module/alfresco-hxinsight-connector-prediction-applier-extension/context/service-context.xml @@ -103,21 +103,6 @@ - - - - - org.alfresco.hxi_connector.common.exception.EndpointServerErrorException - java.net.UnknownHostException - java.net.MalformedURLException - com.fasterxml.jackson.core.io.JsonEOFException - com.fasterxml.jackson.databind.exc.MismatchedInputException - org.apache.hc.core5.http.NoHttpResponseException - org.apache.hc.core5.http.MalformedChunkCodingException - - - -