dbeaver/dbeaver · error · DBException

Null producer

Error message

Null producer

What it means

Thrown by DataTransferJob.transferData when transferPipe.getProducer() returns null. The pipe is expected to carry both a producer and a consumer before the job runs; a null producer means the pipe was never fully wired. This is a configuration/contract failure, not a runtime data error.

Source

Thrown at plugins/org.jkiss.dbeaver.data.transfer/src/org/jkiss/dbeaver/tools/transfer/DataTransferJob.java:138

                elapsedTime = System.currentTimeMillis() - startTime;
            }
        }
        return Status.OK_STATUS;
    }

    @Override
    protected void canceling() {
        transferCanceled = true;
        super.canceling();
    }

    private void transferData(
        @NotNull DBRProgressMonitor monitor,
        @NotNull DataTransferPipe transferPipe
    ) throws DBException, IOException {
        IDataTransferProducer producer = transferPipe.getProducer();
        if (producer == null) {
            throw new DBException("Null producer");
        }
        IDataTransferConsumer<?, ?> consumer = transferPipe.getConsumer();
        if (consumer == null) {
            throw new DBException("Null consumer");
        }

        String inputName = producer.getObjectFullName(monitor);
        String outputName = consumer.getObjectFullName(monitor);
        monitor.beginTask(
            NLS.bind(DTMessages.data_transfer_wizard_job_container_name,
                CommonUtils.truncateString(inputName, 200),
                CommonUtils.truncateString(outputName, 200)), 1);

        IDataTransferSettings nodeSettings = settings.getNodeSettings(producer);
        try {
            //consumer.initTransfer(producer.getDatabaseObject(), consumerSettings, );

            IDataTransferProcessor processor = settings.getProcessor() == null ? null : settings.getProcessor().getInstance();

View on GitHub (pinned to 1e5ee1042b)

Solutions

  1. Before run(), assert each pipe has a non-null producer: pipe.getProducer() != null.
  2. Re-open the transfer configuration and re-select source objects so producers are regenerated.
  3. If scripting the job, always construct pipes with new DataTransferPipe(producer, consumer).
  4. For saved tasks whose source objects vanished, recreate the task against current containers.

Example fix

// before
DataTransferPipe pipe = new DataTransferPipe(null, consumer);
new DataTransferJob(settings).schedule();

// after
if (pipe.getProducer() == null) {
    throw new IllegalStateException("Pipe missing producer for " + consumer);
}
new DataTransferJob(settings).schedule();
Defensive patterns

Strategy: validation

Validate before calling

for (DataTransferPipe pipe : settings.getDataPipes()) {
    if (pipe.getProducer() == null) {
        throw new DBException("Pipe has no producer; refusing to run transfer");
    }
}

Type guard

static boolean isPipeComplete(DataTransferPipe p) {
    return p != null && p.getProducer() != null;
}

Try / catch

try {
    job.transferData(monitor, pipe);
} catch (DBException e) {
    if ("Null producer".equals(e.getMessage())) {
        // rebuild producer from current source containers
    } else throw e;
}

Prevention

When it happens

Trigger: A DataTransferPipe was constructed/registered with a null producer (e.g. new DataTransferPipe(null, consumer)) and then passed to the transfer job; or setProducer was never called and the consumer-only side of an export lost its producer (tables deleted, see DataTransferSettings recovery logic).

Common situations: Exporting from source containers that were deleted between wizard configuration and job execution; programmatically building pipes without assigning both ends; a deserialized saved task whose producer node class no longer exists.

Related errors


AI-assisted analysis of dbeaver/dbeaver@1e5ee1042b (2026-08-13). Data as JSON: /api/errors/d28dd48f0ffb6a09. Report an issue: GitHub.