aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--vespaclient-container-plugin/pom.xml5
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/LocalDataVisitorHandler.java6
-rw-r--r--vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java16
3 files changed, 11 insertions, 16 deletions
diff --git a/vespaclient-container-plugin/pom.xml b/vespaclient-container-plugin/pom.xml
index 53e708601d7..9c4b81da806 100644
--- a/vespaclient-container-plugin/pom.xml
+++ b/vespaclient-container-plugin/pom.xml
@@ -62,11 +62,6 @@
</exclusions>
</dependency>
<dependency>
- <groupId>org.apache.commons</groupId>
- <artifactId>commons-lang3</artifactId>
- <version>3.4</version>
- </dependency>
- <dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/LocalDataVisitorHandler.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/LocalDataVisitorHandler.java
index ae8413f226e..325c5492776 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/LocalDataVisitorHandler.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/LocalDataVisitorHandler.java
@@ -5,7 +5,7 @@ import com.yahoo.document.Document;
import com.yahoo.document.DocumentId;
import com.yahoo.document.json.JsonWriter;
import com.yahoo.documentapi.DumpVisitorDataHandler;
-import org.apache.commons.lang3.exception.ExceptionUtils;
+import com.yahoo.exception.ExceptionUtils;
import java.nio.charset.StandardCharsets;
@@ -43,7 +43,7 @@ class LocalDataVisitorHandler extends DumpVisitorDataHandler {
}
} catch (Exception e) {
synchronized (monitor) {
- errors.append(ExceptionUtils.getStackTrace(e)).append("\n");
+ errors.append(ExceptionUtils.getStackTraceAsString(e)).append("\n");
}
}
}
@@ -62,7 +62,7 @@ class LocalDataVisitorHandler extends DumpVisitorDataHandler {
}
} catch (Exception e) {
synchronized (monitor) {
- errors.append(ExceptionUtils.getStackTrace(e)).append("\n");
+ errors.append(ExceptionUtils.getStackTraceAsString(e)).append("\n");
}
}
}
diff --git a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java
index 94a38a9d3db..0485689b15d 100644
--- a/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java
+++ b/vespaclient-container-plugin/src/main/java/com/yahoo/document/restapi/OperationHandlerImpl.java
@@ -21,13 +21,13 @@ import com.yahoo.documentapi.messagebus.protocol.DocumentProtocol;
import com.yahoo.documentapi.metrics.DocumentApiMetrics;
import com.yahoo.documentapi.metrics.DocumentOperationStatus;
import com.yahoo.documentapi.metrics.DocumentOperationType;
+import com.yahoo.exception.ExceptionUtils;
import com.yahoo.messagebus.StaticThrottlePolicy;
import com.yahoo.metrics.simple.MetricReceiver;
import com.yahoo.vespaclient.ClusterDef;
import com.yahoo.vespaxmlparser.FeedOperation;
import com.yahoo.yolean.concurrent.ConcurrentResourcePool;
import com.yahoo.yolean.concurrent.ResourceFactory;
-import org.apache.commons.lang3.exception.ExceptionUtils;
import java.io.ByteArrayOutputStream;
import java.nio.charset.StandardCharsets;
@@ -146,7 +146,7 @@ public class OperationHandlerImpl implements OperationHandler {
} catch (Exception e) {
throw new RestApiException(Response.createErrorResponse(
500,
- "Failed during parsing of arguments for visiting: " + ExceptionUtils.getStackTrace(e),
+ "Failed during parsing of arguments for visiting: " + ExceptionUtils.getStackTraceAsString(e),
restUri,
RestUri.apiErrorCodes.VISITOR_ERROR));
}
@@ -175,7 +175,7 @@ public class OperationHandlerImpl implements OperationHandler {
visitorControlHandler.waitUntilDone(); // VisitorParameters' session timeout implicitly triggers timeout failures.
throwIfFatalVisitingError(visitorControlHandler, restUri);
} catch (InterruptedException e) {
- throw new RestApiException(Response.createErrorResponse(500, ExceptionUtils.getStackTrace(e), restUri, RestUri.apiErrorCodes.INTERRUPTED));
+ throw new RestApiException(Response.createErrorResponse(500, ExceptionUtils.getStackTraceAsString(e), restUri, RestUri.apiErrorCodes.INTERRUPTED));
}
if (localDataVisitorHandler.getErrors().isEmpty()) {
Optional<String> continuationToken;
@@ -214,7 +214,7 @@ public class OperationHandlerImpl implements OperationHandler {
} catch (DocumentAccessException documentException) {
response = createErrorResponse(documentException, restUri);
} catch (Exception e) {
- response = Response.createErrorResponse(500, ExceptionUtils.getStackTrace(e), restUri, RestUri.apiErrorCodes.INTERNAL_EXCEPTION);
+ response = Response.createErrorResponse(500, ExceptionUtils.getStackTraceAsString(e), restUri, RestUri.apiErrorCodes.INTERNAL_EXCEPTION);
} finally {
syncSessions.free(syncSession);
}
@@ -236,7 +236,7 @@ public class OperationHandlerImpl implements OperationHandler {
} catch (DocumentAccessException documentException) {
response = createErrorResponse(documentException, restUri);
} catch (Exception e) {
- response = Response.createErrorResponse(500, ExceptionUtils.getStackTrace(e), restUri, RestUri.apiErrorCodes.INTERNAL_EXCEPTION);
+ response = Response.createErrorResponse(500, ExceptionUtils.getStackTraceAsString(e), restUri, RestUri.apiErrorCodes.INTERNAL_EXCEPTION);
} finally {
syncSessions.free(syncSession);
}
@@ -268,7 +268,7 @@ public class OperationHandlerImpl implements OperationHandler {
response = Response.createErrorResponse(400, documentException.getMessage(), restUri, RestUri.apiErrorCodes.DOCUMENT_EXCEPTION);
}
} catch (Exception e) {
- response = Response.createErrorResponse(500, ExceptionUtils.getStackTrace(e), restUri, RestUri.apiErrorCodes.UNSPECIFIED);
+ response = Response.createErrorResponse(500, ExceptionUtils.getStackTraceAsString(e), restUri, RestUri.apiErrorCodes.UNSPECIFIED);
} finally {
syncSessions.free(syncSession);
}
@@ -297,7 +297,7 @@ public class OperationHandlerImpl implements OperationHandler {
return Optional.of(outputStream.toString(StandardCharsets.UTF_8.name()));
} catch (Exception e) {
- throw new RestApiException(Response.createErrorResponse(500, ExceptionUtils.getStackTrace(e), restUri, RestUri.apiErrorCodes.UNSPECIFIED));
+ throw new RestApiException(Response.createErrorResponse(500, ExceptionUtils.getStackTraceAsString(e), restUri, RestUri.apiErrorCodes.UNSPECIFIED));
} finally {
syncSessions.free(syncSession);
}
@@ -441,7 +441,7 @@ public class OperationHandlerImpl implements OperationHandler {
try {
params.setResumeToken(ProgressToken.fromSerializedString(options.continuation.get()));
} catch (Exception e) {
- throw new RestApiException(Response.createErrorResponse(500, ExceptionUtils.getStackTrace(e), restUri, RestUri.apiErrorCodes.UNSPECIFIED));
+ throw new RestApiException(Response.createErrorResponse(500, ExceptionUtils.getStackTraceAsString(e), restUri, RestUri.apiErrorCodes.UNSPECIFIED));
}
}
return params;