dbeaver/dbeaver · error · DBException
Error starting data transfer
Error message
Error starting data transfer
What it means
Thrown when initializing data transfer pipes or running the transfer jobs fails with an InvocationTargetException. Before throwing, an error dialog is displayed via DBWorkbench.getPlatformUI().showError() containing the root cause (e.getCause()). The original InvocationTargetException is wrapped directly in the DBException.
Source
Thrown at plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/task/DTTaskHandlerTransfer.java:105
@NotNull Locale locale,
@NotNull Log log,
@Nullable PrintStream logStream,
@NotNull DBTTaskExecutionListener listener,
DataTransferSettings settings
) throws DBException {
listener.taskStarted(task);
int indexOfLastPipeWithDisabledReferentialIntegrity = -1;
try {
indexOfLastPipeWithDisabledReferentialIntegrity = initializePipes(runnableContext, settings, task);
Throwable error = runDataTransferJobs(runnableContext, task, locale, log, logStream, listener, settings);
listener.taskFinished(task, null, error, settings);
} catch (InvocationTargetException e) {
DBWorkbench.getPlatformUI().showError(
DTMessages.data_transfer_task_handler_unexpected_error_title,
DTMessages.data_transfer_task_handler_unexpected_error_message,
e.getCause()
);
throw new DBException("Error starting data transfer", e);
} catch (InterruptedException | OperationCanceledException e) {
//ignore
} finally {
restoreReferentialIntegrity(
runnableContext,
settings.getDataPipes().subList(0, indexOfLastPipeWithDisabledReferentialIntegrity + 1)
);
}
}
private int initializePipes(
@NotNull DBRRunnableContext runnableContext,
@NotNull DataTransferSettings settings,
@Nullable DBTTask task
) throws InvocationTargetException, InterruptedException, DBException {
int[] indexOfLastPipeWithDisabledReferentialIntegrity = new int[]{-1};
DBException[] dbException = {null};
List<DataTransferPipe> dataPipes = settings.getDataPipes();View on GitHub (pinned to 1e5ee1042b)
Solutions
- Check the error dialog displayed before this exception — it shows the root cause via e.getCause()
- Verify both source and target datasources are connected and accessible before starting the transfer
- Confirm driver versions are compatible with the transfer engine and the target database
Defensive patterns
Strategy: try-catch
Validate before calling
// Ensure both source and target are connected before transfer
for (DBPDataSourceContainer ds : Arrays.asList(sourceDs, targetDs)) {
if (!ds.isConnected()) {
ds.connect(VoidProgressMonitor.INSTANCE, true, true);
}
} Try / catch
try {
handler.executeWithSettings(ctx, task, locale, log, out, listener, settings);
} catch (DBException e) {
Throwable root = e.getCause(); // InvocationTargetException
if (root instanceof InvocationTargetException ite) {
root = ite.getCause();
}
log.error("Transfer failed", root);
} Prevention
- Verify both source and target datasource connectivity before starting a transfer
- Note that an error dialog is already shown to the user before this exception propagates — avoid duplicate dialogs in your handler
- Unwrap InvocationTargetException to get the true cause for logging
When it happens
Trigger: Calling DTTaskHandlerTransfer.executeWithSettings() when initializePipes() or runDataTransferJobs() throws inside a runnable. Common triggers: source or target datasource unreachable, metadata read error during pipe initialization, or the transfer job itself fails.
Common situations: Target database went offline mid-transfer. Insufficient privileges on source or target. Driver incompatibility causing metadata read failures. Network timeout during pipe setup.
Related errors
- No execution context
- Error opening new connection
- Can't retrieve execution context from data container " + dat
- Not connected to database
- Can't find datasource '{}'
AI-assisted analysis of dbeaver/dbeaver@1e5ee1042b (2026-08-13).
Data as JSON: /api/errors/6d55f0f02ac60504.
Report an issue: GitHub.