languagetool-org/languagetool · error · NotImplementedException

This server does not support username/password

Error message

This server does not support username/password

What it means

DatabaseAccessOpenSource is the open-source (non-premium) implementation of the DatabaseAccess interface. getUserInfoWithPassword() unconditionally throws NotImplementedException with NON_PREMIUM_MSG because username/password-based user lookup is a premium-only feature backed by the paid infrastructure. The open-source build simply cannot serve this operation.

Source

Thrown at languagetool-server/src/main/java/org/languagetool/server/DatabaseAccessOpenSource.java:129

  @Override
  boolean deleteWordBatch(List<String> words, Long userId, String groupName) {
    boolean deleted = false;
    for (String word : words) {
      if (deleteWord(word, userId)) {
        deleted = true;
      }
    }
    return deleted;
  }

  @Override
  void addWordBatch(List<String> words, Long userId, String groupName) {
    words.forEach(w -> addWord(w, userId));
  }

  @Override
  UserInfoEntry getUserInfoWithPassword(String username, String password) {
    throw new NotImplementedException(NON_PREMIUM_MSG);
  }

  @Override
  ExtendedUserInfo getExtendedUserInfo(String user) {
    throw new NotImplementedException(NON_PREMIUM_MSG);
  }

  @Override
  ExtendedUserInfo getExtendedUserInfo(long userId) {
    throw new NotImplementedException(NON_PREMIUM_MSG);
  }

  @Override
  UserInfoEntry getUserInfoWithApiKey(String username, String apiKey) {
    Long userId = getUserId(username, apiKey);
    UserInfoEntry user = new UserInfoEntry(userId, username, null, null, null, null, null, null, null, null, apiKey, null, null, null);
    return user;
  }

View on GitHub (pinned to 2e990059ce)

Solutions

  1. Use username + apiKey (token) authentication instead of username/password, which the open-source server supports when configured with a database.
  2. Point your client at the premium endpoint api.languagetoolplus.com if you need password-based authentication.
  3. If self-hosting, accept that password login is unavailable and use API-key auth or no auth.

Example fix

// before
POST /v2/user  { "username": "bob", "password": "secret" } // NotImplementedException on basic server
// after
POST /v2/user  { "username": "bob", "apiKey": "lt-api-key" } // or use api.languagetoolplus.com
Defensive patterns

Strategy: validation

Validate before calling

if (serverIsOpenSource && credentials.containsPassword()) {
  throw new UnsupportedOperationException("Password auth requires api.languagetoolplus.com");
}

Try / catch

try {
  userInfo = api.getUserInfoWithPassword(user, pass);
} catch (NotImplementedException e) {
  // switch to apiKey auth or premium endpoint
}

Prevention

When it happens

Trigger: Calling the server API endpoint that authenticates a user with username + password (getUserInfoWithPassword) against a standard languagetool-server (open-source) deployment instead of api.languagetoolplus.com.

Common situations: Pointing a client that was built for the premium API at a self-hosted basic server; deploying the open-source server and assuming password auth is supported; older integrations using password credentials after switching to the free server.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of languagetool-org/languagetool@2e990059ce (2026-09-06). Data as JSON: /api/errors/d627dc78a1574bde. Report an issue: GitHub.