alibaba/DataX · error · AdsException
-100
-100
Error message
ADS JDBC connection URL was not set.
What it means
Second guard in getTableInfo: AdsHelper.adsURL must be set before querying metadata; null adsURL raises AdsException code -100 (ADS_CONN_URL_NOT_SET). It indicates the ADS JDBC endpoint was never configured on the helper.
Source
Thrown at adswriter/src/main/java/com/alibaba/datax/plugin/writer/adswriter/load/AdsHelper.java:93
public void setSchema(String schema) {
this.schema = schema;
}
/**
* Obtain the table meta information.
*
* @param table The table
* @return The table meta information
* @throws com.alibaba.datax.plugin.writer.adswriter.AdsException
*/
public TableInfo getTableInfo(String table) throws AdsException {
if (table == null) {
throw new AdsException(AdsException.ADS_TABLEMETA_TABLE_NULL, "Table is null.", null);
}
if (adsURL == null) {
throw new AdsException(AdsException.ADS_CONN_URL_NOT_SET, "ADS JDBC connection URL was not set.", null);
}
if (userName == null) {
throw new AdsException(AdsException.ADS_CONN_USERNAME_NOT_SET,
"ADS JDBC connection user name was not set.", null);
}
if (password == null) {
throw new AdsException(AdsException.ADS_CONN_PASSWORD_NOT_SET, "ADS JDBC connection password was not set.",
null);
}
if (schema == null) {
throw new AdsException(AdsException.ADS_CONN_SCHEMA_NOT_SET, "ADS JDBC connection schema was not set.",
null);
}
Connection connection = null;View on GitHub (pinned to 80ec23d5c5)
Solutions
- Set the 'url' key in the adswriter parameter to the ADS JDBC endpoint (e.g. jdbc:mysql://ads-host:3306/db).
- Check the key name against the plugin's Key constants for your version.
- If constructing AdsHelper programmatically, call the URL setter before getTableInfo.
Example fix
// before
{"parameter":{"table":"t","username":"u"}}
// after
{"parameter":{"url":"jdbc:mysql://ads-xxx.ads.aliyuncs.com:3306/mydb","table":"t","username":"u"}} Defensive patterns
Strategy: validation
Validate before calling
if (config.getString("url") == null) {
throw new IllegalStateException("adswriter 'url' key is required");
} Type guard
boolean isAdsUrlSet(String url) { return url != null && url.startsWith("jdbc:"); } Try / catch
try {
return helper.getTableInfo(table);
} catch (AdsException e) {
if (e.getCode() == AdsException.ADS_CONN_URL_NOT_SET) {
throw new IllegalStateException("job config: ADS 'url' missing", e);
}
throw e;
} Prevention
- Template job JSONs with a required-fields checklist: url, username, password, schema, table.
- Reject empty string as well as null when validating config (blank URL fails later at JDBC anyway).
- Keep the ADS endpoint in one config variable reused by all phases.
When it happens
Trigger: Invoking getTableInfo on an AdsHelper whose adsURL field was never assigned - in the DataX job this maps to a missing/misspelled 'url' key in the adswriter parameter block.
Common situations: Job JSON omits url, uses 'jdbcUrl' instead of 'url', or config is nested under the wrong reader/writer block.
Related errors
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/c6e13542e5969c5a.
Report an issue: GitHub.