{"record":{"id":"602378accda0302d","repo":"flowable/flowable-engine","slug":"deployment-deploymentid-didn-t-put-an-ap","errorCode":null,"errorMessage":"deployment '\" + deploymentId + \"' didn't put an app resource in the cache","messagePattern":"deployment '\" \\+ deploymentId \\+ \"' didn't put an app resource in the cache","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":164,"sourceCode":"            for (String deploymentResourceName : deploymentResourceNames) {\n                if (deploymentResourceName.endsWith(\".app\")) {\n                    appResourcePresent = true;\n                    break;\n                }\n            }\n\n            if (appResourcePresent) {\n                DeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);\n                deployment.setNew(false);\n                deploy(deployment, null);\n\n            } else {\n                throw new FlowableException(\"No .app resource found for deployment '\" + deploymentId + \"'\");\n            }\n\n            appResourceObject = appResourceCache.get(deploymentId);\n            if (appResourceObject == null) {\n                throw new FlowableException(\"deployment '\" + deploymentId + \"' didn't put an app resource in the cache\");\n            }\n        }\n\n        return appResourceObject;\n    }\n\n    public AppModel getAppResourceModel(String deploymentId) {\n        Object appResourceObject = getAppResourceObject(deploymentId);\n        if (!(appResourceObject instanceof AppModel)) {\n            throw new FlowableException(\"App resource is not of type AppModel\");\n        }\n\n        return (AppModel) appResourceObject;\n    }\n\n    public void removeDeployment(String deploymentId, boolean cascade) {\n\n        DeploymentEntity deployment = deploymentEntityManager.findById(deploymentId);","sourceCodeStart":146,"sourceCodeEnd":182,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java#L146-L182","documentation":"Flowable throws FlowableException when, after re-deploying an app deployment, the app resource cache still holds no entry for the deployment id. The .app resource was present (the earlier check passed) but the app deployer failed to parse it or register the model — an internal consistency failure during cache rebuild.","triggerScenarios":"getAppResourceObject on a deployment whose .app resource exists but fails to parse into the cache (corrupt app XML, malformed app model), or engine version mismatch where the app deployer cannot handle the resource format.","commonSituations":"Corrupted or hand-edited .app archives; Flowable 5 app resources loaded by a 6.x engine; upgrade leaving old deployments whose resources the new deployer rejects.","solutions":["Validate the .app resource content (open it, check it is valid XML/AppModel)","Redeploy the app archive freshly and use the new deployment id","Restart the engine to clear the app resource cache","Check engine version compatibility of the app resource format"],"exampleFix":"// before\nAppModel model = repositoryService.getAppResourceModel(oldDeploymentId); // stale/corrupt\n// after\nrepositoryService.createDeployment().addClasspathResource(\"myApp.app\").tenantId(\"acme\").deploy();\nAppModel model = repositoryService.getAppResourceModel(newDeploymentId);","handlingStrategy":"try-catch","validationCode":"// ensure resources are parseable before caching: inspect the .app resource content\nString appXml = new String(repositoryService.getResourceAsStream(deploymentId, appName).readAllBytes());\nif (!appXml.contains(\"<app\")) { /* treat as corrupt, redeploy */ }","typeGuard":null,"tryCatchPattern":"try {\n    AppModel model = repositoryService.getAppResourceModel(deploymentId);\n} catch (FlowableException e) {\n    // redeploy the app archive and use the new deployment id\n}","preventionTips":["Validate .app archives in CI before deployment","Avoid hand-editing deployed app resources","Redeploy after engine upgrades"],"tags":["flowable","app-deployment","cache","internal"],"backgroundTag":"internal-invariant-violation","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}