{"record":{"id":"27ad1b3bb7b024a3","repo":"flowable/flowable-engine","slug":"no-apps-deployed-with-key-and-version","errorCode":null,"errorMessage":"no apps deployed with key = '' and version = ''","messagePattern":"no apps deployed with key = '' and version = ''","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":404,"severity":"error","filePath":"modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/deployer/AppDeploymentManager.java","lineNumber":98,"sourceCode":"        }\n        appDefinition = resolveAppDefinition(appDefinition).getAppDefinition();\n        return appDefinition;\n    }\n\n    public AppDefinition findDeployedLatestAppDefinitionByKeyAndTenantId(String appDefinitionKey, String tenantId) {\n        AppDefinition appDefinition = appDefinitionEntityManager.findLatestAppDefinitionByKeyAndTenantId(appDefinitionKey, tenantId);\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"no apps deployed with key '\" + appDefinitionKey + \"' for tenant identifier '\" + tenantId + \"'\", AppDefinition.class);\n        }\n        appDefinition = resolveAppDefinition(appDefinition).getAppDefinition();\n        return appDefinition;\n    }\n\n    public AppDefinition findDeployedAppDefinitionByKeyAndVersionAndTenantId(String appDefinitionKey, Integer appDefinitionVersion, String tenantId) {\n        AppDefinition appDefinition = (AppDefinitionEntity) appDefinitionEntityManager\n                .findAppDefinitionByKeyAndVersionAndTenantId(appDefinitionKey, appDefinitionVersion, tenantId);\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"no apps deployed with key = '\" + appDefinitionKey + \"' and version = '\" + appDefinitionVersion + \"'\", AppDefinition.class);\n        }\n        appDefinition = resolveAppDefinition(appDefinition).getAppDefinition();\n        return appDefinition;\n    }\n\n    public AppDefinitionCacheEntry resolveAppDefinition(AppDefinition appDefinition) {\n        String appDefinitionId = appDefinition.getId();\n        String deploymentId = appDefinition.getDeploymentId();\n\n        AppDefinitionCacheEntry cachedAppDefinition = appDefinitionCache.get(appDefinitionId);\n\n        if (cachedAppDefinition == null) {\n            AppDeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);\n            deployment.setNew(false);\n            deploy(deployment, null);\n            cachedAppDefinition = deployment.getAppDefinitionCacheEntry(appDefinitionId);\n\n            if (cachedAppDefinition == null) {","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine/src/main/java/org/flowable/app/engine/impl/deployer/AppDeploymentManager.java#L80-L116","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Verify the app definition was actually deployed (check ACT_APP_APPDEF / list via repositoryService.createAppDefinitionQuery().list())","Confirm the exact key and integer version exist; try the latest by key without version first","Check tenantId matches the one used at deployment (empty string vs null differences)","Re-deploy the .app/.zip archive if the deployment was deleted or the DB was recreated"],"exampleFix":"// before\nAppDefinition def = repoService.getAppDefinitionByKeyAndVersionAndTenantId(\"myApp\", 3, \"tenant-1\");\n// after\nAppDefinition def = repoService.createAppDefinitionQuery().appDefinitionKey(\"myApp\").latestVersion().singleResult();\nif (def == null) { throw new IllegalStateException(\"App 'myApp' not deployed\"); }","handlingStrategy":"try-catch","validationCode":"long n = repoService.createAppDefinitionQuery().appDefinitionKey(key).appDefinitionVersion(version).appDefinitionTenantId(tenantId).count();\nif (n == 0) throw new IllegalStateException(\"App definition not deployed: \" + key + \" v\" + version);\nAppDefinition def = repoService.getAppDefinitionByKeyAndVersionAndTenantId(key, version, tenantId);","typeGuard":null,"tryCatchPattern":"try {\n    AppDefinition def = repoService.getAppDefinitionByKeyAndVersionAndTenantId(key, version, tenantId);\n} catch (FlowableObjectNotFoundException e) {\n    // log key/version/tenant, deploy the app archive or fall back to a default\n}","preventionTips":["Deploy app archives as part of environment bootstrap before any lookup","Verify existence with createAppDefinitionQuery().count() before resolving","Keep a registry of deployed keys/versions per environment"],"tags":["flowable","not-found","deployment","app-definition"],"backgroundTag":"resource-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}