{"record":{"id":"e1ef4bb7dbeff3f2","repo":"apache/seatunnel","slug":"load-driver-failed","errorCode":"LOAD_DRIVER_FAILED","errorMessage":"Fail to create driver of class ","messagePattern":"Fail to create driver of class ","errorType":"error_code","errorClass":"TDengineConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-tdengine/src/main/java/org/apache/seatunnel/connectors/seatunnel/tdengine/utils/TDengineUtil.java","lineNumber":52,"sourceCode":"            DriverManager.getDriver(jdbcUrl);\n        } catch (SQLException e) {\n            log.warn(\"no available driver found for this {}, waiting for it to load\", jdbcUrl);\n        }\n\n        String driverName;\n        if (jdbcUrl.startsWith(\"jdbc:TAOS-RS://\")) {\n            driverName = \"com.taosdata.jdbc.rs.RestfulDriver\";\n        } else {\n            driverName = \"com.taosdata.jdbc.TSDBDriver\";\n        }\n\n        try {\n            Class<?> clazz =\n                    Class.forName(driverName, true, Thread.currentThread().getContextClassLoader());\n            Driver driver = (Driver) clazz.getDeclaredConstructor().newInstance();\n            DriverManager.registerDriver(driver);\n        } catch (Exception ex) {\n            throw new TDengineConnectorException(\n                    TDengineConnectorErrorCode.LOAD_DRIVER_FAILED,\n                    \"Fail to create driver of class \" + driverName,\n                    ex);\n        }\n    }\n}\n","sourceCodeStart":34,"sourceCodeEnd":59,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-tdengine/src/main/java/org/apache/seatunnel/connectors/seatunnel/tdengine/utils/TDengineUtil.java#L34-L59","documentation":"checkDriverExist() in TDengineUtil fails to load and register the TDengine JDBC driver class. The driver class could not be found via the context ClassLoader or could not be instantiated/registered with DriverManager.","triggerScenarios":"Class.forName(driverName, true, contextClassLoader) throws ClassNotFoundException, or newInstance()/registerDriver throws, because the taos-jdbcdriver jar is absent from the plugin classpath.","commonSituations":"TDengine connector jar installed without the JDBC driver dependency; using $SEATUNNEL_HOME/connectors without running install-plugin.sh; shaded/assembly packaging missing the driver; classloader isolation in cluster deployments.","solutions":["Add taos-jdbcdriver jar to $SEATUNNEL_HOME/connectors/ (or connector plugin dir) or run sh bin/install-plugin.sh.","Confirm the driverName in the message matches a class present in the jar (e.g. com.taosdata.jdbc.TSDBDriver or RSDBDriver).","If using native connectivity, also install TDengine client libraries matching the server version; otherwise use the restful driver.","Rebuild/repackage with the driver dependency included and verify plugin packaging excludes it from shading conflicts."],"exampleFix":"// before\n# ls $SEATUNNEL_HOME/connectors | grep -i taos\n# (no taos-jdbcdriver jar)\n// after\nsh bin/install-plugin.sh\n# or manually copy: cp taos-jdbcdriver-3.x.x-dist.jar $SEATUNNEL_HOME/connectors/","handlingStrategy":"validation","validationCode":"// Verify driver presence before job\nClass.forName(\"com.taosdata.jdbc.TSDBDriver\", true,\n    Thread.currentThread().getContextClassLoader());","typeGuard":null,"tryCatchPattern":"try {\n    source.open();\n} catch (TDengineConnectorException e) {\n    if (e.getErrorCode() == TDengineConnectorErrorCode.LOAD_DRIVER_FAILED) {\n        log.error(\"taos-jdbcdriver missing from classpath: {}\", e.getCause());\n    }\n    throw e;\n}","preventionTips":["Run sh bin/install-plugin.sh or copy taos-jdbcdriver into the connectors directory","Verify the driver jar exists on all cluster nodes, not just the client","Match driver major version to TDengine server version","Avoid excluding/shading the driver out of the connector assembly"],"tags":["tdengine","jdbc","driver","classpath"],"backgroundTag":"missing-dependency","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}