{"record":{"id":"3796277344d89a70","repo":"pentaho/pentaho-kettle","slug":"a-step-in-transformation-transmeta-tostring-doesn-t-have-a","errorCode":null,"errorMessage":"A step in transformation [\" + transMeta.toString() + \"] doesn't have a name.  A step should always have a name to identify it by.","messagePattern":"A step in transformation \\[\" \\+ transMeta\\.toString\\(\\) \\+ \"\\] doesn't have a name\\.  A step should always have a name to identify it by\\.","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java","lineNumber":467,"sourceCode":"   * @param stepDataInterface the data object to store temporary data, database connections, caches, result sets,\n   *                          hashtables etc.\n   * @param copyNr            The copynumber for this step.\n   * @param transMeta         The TransInfo of which the step stepMeta is part of.\n   * @param trans             The (running) transformation to obtain information shared among the steps.\n   */\n  public BaseStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,\n                   Trans trans ) {\n    this.stepMeta = stepMeta;\n    this.stepDataInterface = stepDataInterface;\n    this.stepcopy = copyNr;\n    this.transMeta = transMeta;\n    this.trans = trans;\n    this.stepname = stepMeta.getName();\n    this.socketRepository = trans.getSocketRepository();\n\n    // Set the name of the thread\n    if ( stepMeta.getName() == null ) {\n      throw new RuntimeException( \"A step in transformation [\"\n        + transMeta.toString() + \"] doesn't have a name.  A step should always have a name to identify it by.\" );\n    }\n\n    log = KettleLogStore.getLogChannelInterfaceFactory().create( this, trans );\n\n    first = true;\n    clusteredPartitioningFirst = true;\n\n    running = new AtomicBoolean( false );\n    stopped = new AtomicBoolean( false );\n    safeStopped = new AtomicBoolean( false );\n    paused = new AtomicBoolean( false );\n\n    init = false;\n\n    synchronized ( statusCountersLock ) {\n      linesRead = 0L; // new AtomicLong(0L); // Keep some statistics!\n      linesWritten = 0L; // new AtomicLong(0L);","sourceCodeStart":449,"sourceCodeEnd":485,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/step/BaseStep.java#L449-L485","documentation":"BaseStep's constructor takes the step's name from its StepMeta and throws a RuntimeException if that name is null. Every step must have a name to be identifiable in logging, threading, and the transformation graph. Note it is a RuntimeException, not a KettleException.","triggerScenarios":"Instantiating a step (new SomeStep(StepMeta, StepDataInterface, int, TransMeta, Trans)) when stepMeta.getName() returns null — typically a programmatically built StepMeta that never got setName(), or corrupt .ktr XML where the stepname attribute is missing.","commonSituations":"Building transformations in code (API-based generation) and forgetting step names; hand-edited or truncated .ktr files; loading metadata where the name attribute was lost.","solutions":["Call setName(\"...\") with a unique non-null name on every StepMeta before adding it to the TransMeta.","If loading from XML, repair the .ktr file so each <step> has a name attribute.","Validate all step names (non-null, non-blank, unique) before trans.prepareExecution()/execute."],"exampleFix":"// before\nStepMeta meta = new StepMeta(pluginId, null); // or never named\n// after\nStepMeta meta = new StepMeta(pluginId, \"Read CSV\");","handlingStrategy":"validation","validationCode":"for (StepMeta step : transMeta.getSteps()) {\n  if (step.getName() == null || step.getName().trim().isEmpty())\n    throw new IllegalStateException(\"Step without name: \" + step);\n}","typeGuard":null,"tryCatchPattern":"try { trans.prepareExecution(); }\ncatch (RuntimeException e) { if (e.getMessage() != null && e.getMessage().contains(\"doesn't have a name\")) { nameAllSteps(transMeta); } else throw e; }","preventionTips":["Always pass a name in the StepMeta constructor","Validate step names before prepareExecution","Never hand-edit .ktr XML name attributes"],"tags":["kettle","step","missing-name","runtime-exception"],"backgroundTag":"missing-required-argument","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}