{"record":{"id":"321a75ef0d78340b","repo":"pentaho/pentaho-kettle","slug":"joinrows-log-errorcreatingtemporaryfiles","errorCode":"JoinRows.Log.ErrorCreatingTemporaryFiles","errorMessage":"JoinRows.Log.ErrorCreatingTemporaryFiles","messagePattern":"JoinRows\\.Log\\.ErrorCreatingTemporaryFiles","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/joinrows/JoinRows.java","lineNumber":116,"sourceCode":"        if ( directoryName != null ) {\n          file = new File( directoryName );\n        }\n        data.file[i] = File.createTempFile( meta.getPrefix(), \".tmp\", file );\n\n        data.size[i] = 0;\n        data.rs[i] = inputRowSets.get( i );\n        data.cache[i] = null;\n        // data.row[i] = null;\n        data.position[i] = 0;\n\n        data.dataInputStream[i] = null;\n        data.dataOutputStream[i] = null;\n\n        data.joinrow[i] = null;\n        data.restart[i] = false;\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"JoinRows.Log.ErrorCreatingTemporaryFiles\" ), e );\n    }\n  }\n\n  /**\n   * Get a row of data from the indicated rowset or buffer (memory/disk)\n   *\n   * @param filenr\n   *          The rowset or buffer to read a row from\n   * @return a row of data\n   * @throws KettleException\n   *           in case something goes wrong\n   */\n  public Object[] getRowData( int filenr ) throws KettleException {\n    data.restart[filenr] = false;\n\n    Object[] rowData = null;\n\n    // Do we read from the first rowset or a file?","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/joinrows/JoinRows.java#L98-L134","documentation":"JoinRows.initialize() throws this KettleException when creating or opening the temporary files/buffers the Join Rows step needs to cache incoming row streams fails. The step spools all rows except the main stream to temp files so it can cross-join them; any I/O exception while creating those files or streams is wrapped in this error. The transformation cannot proceed because the step's data buffers are unusable.","triggerScenarios":"processRow calls initialize() which invokes data.getBuffer() / file creation logic for the join; this throws when java.io.File.createTempFile or FileOutputStream creation fails in data.dir/tempFilePrefix configuration.","commonSituations":"KETTLE_TEMP_DIR / java.io.tmpdir points to a read-only or non-existent directory; disk is full on the execution host; the OS temp dir has wrong permissions for the runtime user; very restrictive security managers or containers with read-only /tmp.","solutions":["Check java.io.tmpdir (or KETTLE_TEMP_DIR) points to an existing, writable directory for the user running the transformation.","Free disk space or point the temp dir to a volume with capacity for the full row spool.","Fix directory permissions (chmod/chown) on the temp directory.","Re-run the transformation; temp file creation is transient-environment dependent, not data dependent."],"exampleFix":"// before\nexport KETTLE_TEMP_DIR=/mnt/ro-tmp\n./kitchen.sh -file job.kjb\n\n// after\nexport KETTLE_TEMP_DIR=/var/tmp/pdi   # must exist and be writable\nmkdir -p $KETTLE_TEMP_DIR\n./kitchen.sh -file job.kjb","handlingStrategy":"validation","validationCode":"File tmp = new File( System.getProperty( \"java.io.tmpdir\" ) );\nif ( !tmp.isDirectory() || !tmp.canWrite() || tmp.getUsableSpace() < 64L * 1024 * 1024 ) {\n  throw new IllegalStateException( \"Temp dir unusable for JoinRows spooling: \" + tmp );\n}","typeGuard":null,"tryCatchPattern":"try {\n  trans.execute( null );\n} catch ( KettleException e ) {\n  if ( e.getMessage() != null && e.getMessage().contains( \"ErrorCreatingTemporaryFiles\" ) ) {\n    System.setProperty( \"java.io.tmpdir\", \"/var/tmp/pdi\" ); // or export KETTLE_TEMP_DIR\n    throw new IllegalStateException( \"Fix temp dir and re-run\", e );\n  }\n  throw e;\n}","preventionTips":["Set KETTLE_TEMP_DIR/java.io.tmpdir to a dedicated writable volume with ample free space on execution hosts.","Monitor disk usage on temp partitions before large join transformations.","Avoid read-only container filesystems for /tmp; mount an writable tmpfs volume.","Remember JoinRows spools all non-main streams — size the temp area for full input volumes."],"tags":["kettle","join-rows","temp-files","io"],"backgroundTag":"file-write-failed","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"}