{"record":{"id":"bb7279fa52a8f41e","repo":"pentaho/pentaho-kettle","slug":"unable-to-load-job-entry-of-type-mysql-bulk-load-from-xml","errorCode":null,"errorMessage":"Unable to load job entry of type 'Mysql bulk load' from XML node","messagePattern":"Unable to load job entry of type 'Mysql bulk load' from XML node","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/job/entries/mysqlbulkload/JobEntryMysqlBulkLoad.java","lineNumber":158,"sourceCode":"      schemaname = XMLHandler.getTagValue( entrynode, \"schemaname\" );\n      tablename = XMLHandler.getTagValue( entrynode, \"tablename\" );\n      filename = XMLHandler.getTagValue( entrynode, \"filename\" );\n      separator = XMLHandler.getTagValue( entrynode, \"separator\" );\n      enclosed = XMLHandler.getTagValue( entrynode, \"enclosed\" );\n      escaped = XMLHandler.getTagValue( entrynode, \"escaped\" );\n\n      linestarted = XMLHandler.getTagValue( entrynode, \"linestarted\" );\n      lineterminated = XMLHandler.getTagValue( entrynode, \"lineterminated\" );\n      replacedata = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"replacedata\" ) );\n      ignorelines = XMLHandler.getTagValue( entrynode, \"ignorelines\" );\n      listattribut = XMLHandler.getTagValue( entrynode, \"listattribut\" );\n      localinfile = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"localinfile\" ) );\n      prorityvalue = Const.toInt( XMLHandler.getTagValue( entrynode, \"prorityvalue\" ), -1 );\n      String dbname = XMLHandler.getTagValue( entrynode, \"connection\" );\n      addfiletoresult = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( entrynode, \"addfiletoresult\" ) );\n      connection = DatabaseMeta.findDatabase( databases, dbname );\n    } catch ( KettleException e ) {\n      throw new KettleXMLException( \"Unable to load job entry of type 'Mysql bulk load' from XML node\", e );\n    }\n  }\n\n  public void loadRep( Repository rep, IMetaStore metaStore, ObjectId id_jobentry, List<DatabaseMeta> databases,\n    List<SlaveServer> slaveServers ) throws KettleException {\n    try {\n      schemaname = rep.getJobEntryAttributeString( id_jobentry, \"schemaname\" );\n      tablename = rep.getJobEntryAttributeString( id_jobentry, \"tablename\" );\n      filename = rep.getJobEntryAttributeString( id_jobentry, \"filename\" );\n      separator = rep.getJobEntryAttributeString( id_jobentry, \"separator\" );\n      enclosed = rep.getJobEntryAttributeString( id_jobentry, \"enclosed\" );\n      escaped = rep.getJobEntryAttributeString( id_jobentry, \"escaped\" );\n      linestarted = rep.getJobEntryAttributeString( id_jobentry, \"linestarted\" );\n      lineterminated = rep.getJobEntryAttributeString( id_jobentry, \"lineterminated\" );\n      replacedata = rep.getJobEntryAttributeBoolean( id_jobentry, \"replacedata\" );\n      ignorelines = rep.getJobEntryAttributeString( id_jobentry, \"ignorelines\" );\n      listattribut = rep.getJobEntryAttributeString( id_jobentry, \"listattribut\" );\n      localinfile = rep.getJobEntryAttributeBoolean( id_jobentry, \"localinfile\" );","sourceCodeStart":140,"sourceCodeEnd":176,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/job/entries/mysqlbulkload/JobEntryMysqlBulkLoad.java#L140-L176","documentation":"KettleXMLException thrown by JobEntryMysqlBulkLoad.loadXML() when parsing the XML node for a 'Mysql bulk load' job entry fails with a KettleException. It indicates the serialized XML for this entry is unreadable or its tags are missing/misnamed.","triggerScenarios":"Loading a job from XML when reading tags (tablename, filename, localinfile, prorityvalue, connection, addfiletoresult) throws or DatabaseMeta.findDatabase cannot resolve the connection name against the supplied list.","commonSituations":"Corrupt or truncated .kjb; cross-version file incompatibility; connection referenced in XML missing from shared connections.","solutions":["Verify and repair the <entry type='MYSQL_BULK_LOAD'> XML tags with correct names and values.","Recreate the job entry in Spoon to regenerate valid XML.","Add the named connection to the job's databases/shared connections.","Use matching Kettle/Pentaho versions for producing and consuming the file."],"exampleFix":"// before\n<prorityvalue>abc</prorityvalue>\n// after\n<prorityvalue>5</prorityvalue>","handlingStrategy":"try-catch","validationCode":"// before load\nif ( entrynode == null ) throw new KettleXMLException( \"null entry node for MYSQL_BULK_LOAD\" );\nif ( XMLHandler.getTagValue( entrynode, \"connection\" ) == null ) throw new KettleXMLException( \"missing <connection> tag\" );","typeGuard":"boolean ok = (entrynode != null && XMLHandler.getTagValue( entrynode, \"localinfile\" ) != null);","tryCatchPattern":"try { jobEntry.loadXML( entrynode, databases, metaStore ); } catch ( KettleXMLException e ) { logError( \"Cannot parse MYSQL_BULK_LOAD XML: \" + e.getMessage(), e ); }","preventionTips":["Avoid manual XML edits to .kjb files","Align Pentaho/Kettle versions across environments","Register shared connections used by the entry","Validate the XML structure before loading"],"tags":["kettle","xml","job-entry","mysql","deserialization"],"backgroundTag":"xml-parse-error","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"}