languagetool-org/languagetool · error · IllegalArgumentException
The AfterTheDeadline mode is not supported anymore in Langua
Error message
The AfterTheDeadline mode is not supported anymore in LanguageTool 3.8 or later
What it means
LanguageTool's HTTP server once supported running in 'AfterTheDeadline' compatibility mode (set via the 'mode' property). This mode was removed in LanguageTool 3.8, and the server configuration now explicitly rejects it with this IllegalArgumentException to fail fast instead of silently misbehaving.
Source
Thrown at languagetool-server/src/main/java/org/languagetool/server/HTTPServerConfig.java:378
setFasttextPaths(fasttextModel, fasttextBinary);
}
maxCheckThreads = Integer.parseInt(getOptionalProperty(props, "maxCheckThreads", "10"));
if (maxCheckThreads < 1) {
throw new IllegalArgumentException("Invalid value for maxCheckThreads, must be >= 1: " + maxCheckThreads);
}
// default value 0 = use maxCheckThreads setting (for compatibility)
maxTextCheckerThreads = Integer.parseInt(getOptionalProperty(props, "maxTextCheckerThreads", "0"));
if (maxTextCheckerThreads < 0) {
throw new IllegalArgumentException("Invalid value for maxTextCheckerThreads, must be >= 1: " + maxTextCheckerThreads);
}
textCheckerQueueSize = Integer.parseInt(getOptionalProperty(props, "textCheckerQueueSize", "8"));
if (textCheckerQueueSize < 0) {
throw new IllegalArgumentException("Invalid value for textCheckerQueueSize, must be >= 1: " + textCheckerQueueSize);
}
boolean atdMode = getOptionalProperty(props, "mode", "LanguageTool").equalsIgnoreCase("AfterTheDeadline");
if (atdMode) {
throw new IllegalArgumentException("The AfterTheDeadline mode is not supported anymore in LanguageTool 3.8 or later");
}
String rulesConfigFilePath = getOptionalProperty(props, "rulesFile", null);
if (rulesConfigFilePath != null) {
rulesConfigFile = new File(rulesConfigFilePath);
if (!rulesConfigFile.exists() || !rulesConfigFile.isFile()) {
throw new RuntimeException("Rules Configuration file cannot be found: " + rulesConfigFile);
}
}
String remoteRulesConfigFilePath = getOptionalProperty(props, "remoteRulesFile", null);
if (remoteRulesConfigFilePath != null) {
remoteRulesConfigFile = new File(remoteRulesConfigFilePath);
if (!remoteRulesConfigFile.exists() || !remoteRulesConfigFile.isFile()) {
throw new RuntimeException("Remote rules configuration file cannot be found: " + remoteRulesConfigFile);
}
}
cacheSize = Integer.parseInt(getOptionalProperty(props, "cacheSize", "0"));
if (cacheSize < 0) {
throw new IllegalArgumentException("Invalid value for cacheSize: " + cacheSize + ", use 0 to deactivate cache");View on GitHub (pinned to 2e990059ce)
Solutions
- Remove the 'mode=AfterTheDeadline' line from the server properties file (default mode 'LanguageTool' needs no explicit setting)
- Upgrade any client integration that relied on the AfterTheDeadline XML API to LanguageTool's native HTTP JSON API
- Pin to LanguageTool <= 3.7 only if ATD compatibility is absolutely mandatory (not recommended, no security fixes)
Example fix
// before (server.properties) mode=AfterTheDeadline // after (server.properties) # line removed - only 'LanguageTool' mode is supported
Defensive patterns
Strategy: validation
Validate before calling
Properties props = loadProps();
if ("AfterTheDeadline".equalsIgnoreCase(props.getProperty("mode", "LanguageTool"))) {
throw new IllegalStateException("mode=AfterTheDeadline is unsupported since LT 3.8; remove the 'mode' property");
} Try / catch
try {
serverConfig = new HTTPServerConfig(props);
} catch (IllegalArgumentException e) {
if (e.getMessage().contains("AfterTheDeadline")) {
props.remove("mode");
serverConfig = new HTTPServerConfig(props);
} else { throw e; }
} Prevention
- Keep server.properties minimal - only set properties you actually need
- Grep deployment configs for 'mode=AfterTheDeadline' when upgrading from LT <= 3.7
- Test server startup in CI after every LanguageTool version upgrade
When it happens
Trigger: Starting the LanguageTool HTTP server with a properties/config file (or server.properties) that contains 'mode=AfterTheDeadline'. HTTPServerConfig constructor reads the 'mode' property, compares it case-insensitively to 'AfterTheDeadline', and throws.
Common situations: Old server.properties files carried over from LanguageTool 3.7 or earlier deployments; Docker images or startup scripts with legacy config; tutorials or blog posts referencing the old ATD mode.
Understand the failure class
Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.
Related errors
- Rules Configuration file cannot be found:
- Remote rules configuration file cannot be found:
- Invalid value for cacheSize: , use 0 to deactivate cache
- Use of cacheTTLSeconds without also setting cacheSize has no
- Cannot use premiumOnly=true with non-premium version
AI-assisted analysis of languagetool-org/languagetool@2e990059ce (2026-09-06).
Data as JSON: /api/errors/74814a17239ec776.
Report an issue: GitHub.