flowable/flowable-engine · error · FlowableObjectNotFoundException

no apps deployed with key = '' and version = ''

Error message

no apps deployed with key = '' and version = ''

What it means

FlowableObjectNotFoundException thrown by AppDeploymentManager.findDeployedAppDefinitionByKeyAndVersionAndTenantId when the app-engine database contains no app definition row matching the given key, version and tenant. The message interpolates the queried key and version so you can see exactly what was looked up.

Source

Thrown at modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/deployer/AppDeploymentManager.java:98

        }
        appDefinition = resolveAppDefinition(appDefinition).getAppDefinition();
        return appDefinition;
    }

    public AppDefinition findDeployedLatestAppDefinitionByKeyAndTenantId(String appDefinitionKey, String tenantId) {
        AppDefinition appDefinition = appDefinitionEntityManager.findLatestAppDefinitionByKeyAndTenantId(appDefinitionKey, tenantId);
        if (appDefinition == null) {
            throw new FlowableObjectNotFoundException("no apps deployed with key '" + appDefinitionKey + "' for tenant identifier '" + tenantId + "'", AppDefinition.class);
        }
        appDefinition = resolveAppDefinition(appDefinition).getAppDefinition();
        return appDefinition;
    }

    public AppDefinition findDeployedAppDefinitionByKeyAndVersionAndTenantId(String appDefinitionKey, Integer appDefinitionVersion, String tenantId) {
        AppDefinition appDefinition = (AppDefinitionEntity) appDefinitionEntityManager
                .findAppDefinitionByKeyAndVersionAndTenantId(appDefinitionKey, appDefinitionVersion, tenantId);
        if (appDefinition == null) {
            throw new FlowableObjectNotFoundException("no apps deployed with key = '" + appDefinitionKey + "' and version = '" + appDefinitionVersion + "'", AppDefinition.class);
        }
        appDefinition = resolveAppDefinition(appDefinition).getAppDefinition();
        return appDefinition;
    }

    public AppDefinitionCacheEntry resolveAppDefinition(AppDefinition appDefinition) {
        String appDefinitionId = appDefinition.getId();
        String deploymentId = appDefinition.getDeploymentId();

        AppDefinitionCacheEntry cachedAppDefinition = appDefinitionCache.get(appDefinitionId);

        if (cachedAppDefinition == null) {
            AppDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);
            deployment.setNew(false);
            deploy(deployment, null);
            cachedAppDefinition = deployment.getAppDefinitionCacheEntry(appDefinitionId);

            if (cachedAppDefinition == null) {

View on GitHub (pinned to d6d39ce1c6)

Solutions

  1. Verify the app definition was actually deployed (check ACT_APP_APPDEF / list via repositoryService.createAppDefinitionQuery().list())
  2. Confirm the exact key and integer version exist; try the latest by key without version first
  3. Check tenantId matches the one used at deployment (empty string vs null differences)
  4. Re-deploy the .app/.zip archive if the deployment was deleted or the DB was recreated

Example fix

// before
AppDefinition def = repoService.getAppDefinitionByKeyAndVersionAndTenantId("myApp", 3, "tenant-1");
// after
AppDefinition def = repoService.createAppDefinitionQuery().appDefinitionKey("myApp").latestVersion().singleResult();
if (def == null) { throw new IllegalStateException("App 'myApp' not deployed"); }
Defensive patterns

Strategy: try-catch

Validate before calling

long n = repoService.createAppDefinitionQuery().appDefinitionKey(key).appDefinitionVersion(version).appDefinitionTenantId(tenantId).count();
if (n == 0) throw new IllegalStateException("App definition not deployed: " + key + " v" + version);
AppDefinition def = repoService.getAppDefinitionByKeyAndVersionAndTenantId(key, version, tenantId);

Try / catch

try {
    AppDefinition def = repoService.getAppDefinitionByKeyAndVersionAndTenantId(key, version, tenantId);
} catch (FlowableObjectNotFoundException e) {
    // log key/version/tenant, deploy the app archive or fall back to a default
}

Prevention

When it happens

Trigger: Calling RepositoryService.getAppDefinition... / AppRepositoryService APIs (e.g. getAppDefinitionByKeyAndVersionAndTenantId) with a key/version/tenant combination that has no deployed app definition, or calling it before the app archive was deployed.

Common situations: Typo in the app definition key; querying a version that was never deployed or was removed via deleteDeployment; querying with an empty or wrong tenantId in multi-tenant setups; running against a fresh database where deployments were not imported.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/27ad1b3bb7b024a3. Report an issue: GitHub.