apache/seatunnel · warning
Invalid hiveSitePath
Error message
Invalid hiveSitePath {} What it means
buildHiveConf optionally adds a user-provided hive-site.xml via its path. If that path is not a valid URL (MalformedURLException), the file cannot be added to the HiveConf; the warning names the invalid path and initialization continues without it, so hive-site settings will be missing from the client configuration.
Solutions
- Provide an absolute, properly-formed path to hive-site.xml (e.g. /etc/hive/conf/hive-site.xml)
- Check the path for spaces or illegal URI characters and quote/rename accordingly
- Verify the file exists and is readable before launching the job
- Alternatively place hive-site.xml on the classpath so it is picked up automatically
Example fix
// before "hive_site_path" = "~/conf/hive site.xml" // after "hive_site_path" = "/etc/hive/conf/hive-site.xml"
Defensive patterns
Strategy: validation
Validate before calling
java.io.File f = new java.io.File(hiveSitePath);
if (!f.isAbsolute() || !f.isFile()) throw new IllegalArgumentException("hive_site_path must be an absolute existing file: " + hiveSitePath);
java.net.URL u = f.toURI().toURL(); // throws MalformedURLException before the job Try / catch
try {
hiveConf.addResource(new File(hiveSitePath).toURI().toURL());
} catch (MalformedURLException e) {
throw new IllegalArgumentException("Invalid hive_site_path: " + hiveSitePath, e);
} Prevention
- Pass an absolute filesystem path for hive_site_path, not a URL or relative path
- Avoid spaces/illegal URI characters in config paths
- Ensure the file exists and is readable at job launch
- Alternatively ship hive-site.xml on the classpath instead of a path option
When it happens
Trigger: buildHiveConf() (called from initializeClient) calls hiveConf.addResource(new File(hiveSitePath).toURI().toURL()) and the string is malformed — e.g. relative path with bad characters, or a URI-incompatible string passed as hive_site_path.
Common situations: Typo in hive_site_path option, passing a URL string with illegal characters, using a relative path when an absolute one is required.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- Error adding Hadoop config
- Agent config file not found
- AmazonDocumentDB option '' must be a valid BSON/JSON…
- AmazonDocumentDB option '' must not be blank
- AmazonDocumentDB option 'tls_ca_file' is required when TLS…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/996846361f766df0.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveMetaStoreCatalog.java:391
hiveConf.setInt("hive.metastore.failure.retries", 3);
if (StringUtils.isNotBlank(hadoopConfDir)) {
for (String fileName : HADOOP_CONF_FILES) {
Path path = Paths.get(hadoopConfDir, fileName);
if (Files.exists(path)) {
try {
hiveConf.addResource(path.toUri().toURL());
} catch (IOException e) {
log.warn("Error adding Hadoop config {}", path, e);
}
}
}
}
if (StringUtils.isNotBlank(hiveSitePath)) {
try {
hiveConf.addResource(new File(hiveSitePath).toURI().toURL());
} catch (MalformedURLException e) {
log.warn("Invalid hiveSitePath {}", hiveSitePath, e);
}
}
hadoopProperties.forEach(hiveConf::set);
log.debug("Hive client configuration initialized");
return hiveConf;
}
private IMetaStoreClient loginWithKerberos(HiveConf hiveConf) throws Exception {
Configuration authConf = new Configuration();
authConf.set("hadoop.security.authentication", "kerberos");
return HadoopLoginFactory.loginWithKerberos(
authConf,
krb5Path,
principal,
keytabPath,
(conf, ugi) -> {
this.userGroupInformation = ugi;
return createClient(hiveConf);View on GitHub (pinned to cf67b549a7)