{"record":{"id":"422a2fd556e4b500","repo":"flowable/flowable-engine","slug":"no-app-resource-found-for-deployment-deploym","errorCode":null,"errorMessage":"No .app resource found for deployment '\" + deploymentId + \"'","messagePattern":"No \\.app resource found for deployment '\" \\+ deploymentId \\+ \"'","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java","lineNumber":159,"sourceCode":"        Object appResourceObject = appResourceCache.get(deploymentId);\n\n        if (appResourceObject == null) {\n            boolean appResourcePresent = false;\n            List<String> deploymentResourceNames = getDeploymentEntityManager().getDeploymentResourceNames(deploymentId);\n            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;","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/persistence/deploy/DeploymentManager.java#L141-L177","documentation":"Flowable throws FlowableException when resolving an app resource for a deployment that contains no resource ending in .app. getAppResourceObject checks whether the deployment holds an .app resource before (re)deploying and populating the app resource cache; without one it cannot build an AppModel.","triggerScenarios":"repositoryService getAppResource APIs called with a deploymentId of a plain BPMN deployment (no app archive), or an app deployment uploaded with a wrong extension.","commonSituations":"Passing a process deployment id where an app deployment id is expected; renaming app archives and losing the .app extension; mixed Flowable 5/6 deployments queried with the 6.x app API.","solutions":["Pass the id of a deployment that actually contains an .app resource (list via repositoryService.getDeploymentResourceNames)","Rename the archive to end with .app and redeploy","Only call app-resource APIs for app deployments; guard the call by inspecting resource names first"],"exampleFix":"// before\nAppModel model = repositoryService.getAppResourceModel(anyDeploymentId);\n// after\nif (repositoryService.getDeploymentResourceNames(anyDeploymentId).stream()\n        .anyMatch(n -> n.endsWith(\".app\"))) {\n    AppModel model = repositoryService.getAppResourceModel(anyDeploymentId);\n}","handlingStrategy":"validation","validationCode":"boolean isAppDeployment = repositoryService.getDeploymentResourceNames(deploymentId)\n    .stream().anyMatch(n -> n.endsWith(\".app\"));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only call app APIs on app deployments","Keep the .app extension intact in build pipelines","Separate app deployments from plain BPMN deployments in naming"],"tags":["flowable","app-deployment","not-found"],"backgroundTag":"file-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}