{"record":{"id":"c7fa13164841f8dd","repo":"flowable/flowable-engine","slug":"no-deployment-id-available","errorCode":null,"errorMessage":"No deployment id available","messagePattern":"No deployment id available","errorType":"exception","errorClass":"FlowableException","httpStatus":500,"severity":"error","filePath":"modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResourceDataResource.java","lineNumber":67,"sourceCode":"    \n    @Autowired(required=false)\n    protected AppRestApiInterceptor restApiInterceptor;\n\n    @ApiOperation(value = \"Get an app definition resource content\", nickname = \"getAppDefinitionContent\", tags = { \"App Definitions\" })\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates both app definition and resource have been found and the resource data has been returned.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested app definition was not found or there is no resource with the given id present in the app definition. The status-description contains additional information.\")\n    })\n    @GetMapping(value = \"/app-repository/app-definitions/{appDefinitionId}/resourcedata\", produces = \"application/json\")\n    @ResponseBody\n    public byte[] getAppDefinitionResource(@ApiParam(name = \"appDefinitionId\") @PathVariable String appDefinitionId, HttpServletResponse response) {\n        AppDefinition appDefinition = appRepositoryService.getAppDefinition(appDefinitionId);\n\n        if (appDefinition == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find an app definition with id '\" + appDefinitionId);\n        }\n        if (appDefinition.getDeploymentId() == null) {\n            throw new FlowableException(\"No deployment id available\");\n        }\n        if (appDefinition.getResourceName() == null) {\n            throw new FlowableException(\"No resource name available\");\n        }\n        \n        if (restApiInterceptor != null) {\n            restApiInterceptor.accessAppDefinitionInfoById(appDefinition);\n        }\n\n        // Check if deployment exists\n        AppDeployment deployment = appRepositoryService.createDeploymentQuery().deploymentId(appDefinition.getDeploymentId()).singleResult();\n        if (deployment == null) {\n            throw new FlowableObjectNotFoundException(\"Could not find a deployment with id '\" + appDefinition.getDeploymentId());\n        }\n\n        List<String> resourceList = appRepositoryService.getDeploymentResourceNames(appDefinition.getDeploymentId());\n\n        if (resourceList.contains(appDefinition.getResourceName())) {","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-app-engine-rest/src/main/java/org/flowable/app/rest/service/api/repository/AppDefinitionResourceDataResource.java#L49-L85","documentation":"Thrown by HistoricTaskInstanceQuery.taskNameLikeIgnoreCase(String) when the argument is null. Despite the generic message ('Task name is null'), this is the null guard for the case-insensitive LIKE pattern parameter. A null pattern cannot be lowercased or converted into a SQL LIKE predicate, so the builder fails fast.","triggerScenarios":"Calling taskNameLikeIgnoreCase(null), typically when a nullable search string from a request or config is passed straight through.","commonSituations":"Optional search box left empty resolves to null and is forwarded unconditionally; a Map/JSON lookup returns null for a missing 'nameLike' key and is passed directly to the builder.","solutions":["Check for null before calling and only apply the filter when a pattern is present.","Default the pattern to a non-null value (e.g., \"\" won't help — better to skip the filter) via Optional.ofNullable(pattern).ifPresent(query::taskNameLikeIgnoreCase).","Fix the upstream source so a defined pattern is always supplied when this filter is intended."],"exampleFix":"// before\nquery.taskNameLikeIgnoreCase(searchTerm); // may be null\n\n// after\nif (searchTerm != null) {\n    query.taskNameLikeIgnoreCase(searchTerm);\n}","handlingStrategy":"validation","validationCode":"if (pattern == null || pattern.isBlank()) { /* skip filter */ }\nelse { query.taskNameLikeIgnoreCase(pattern); }","typeGuard":"static boolean hasPattern(String s) { return s != null && !s.isBlank(); }","tryCatchPattern":"try {\n    query.taskNameLikeIgnoreCase(pattern);\n} catch (FlowableIllegalArgumentException e) {\n    LOG.warn(\"Missing task name pattern: {}\", e.getMessage());\n}","preventionTips":["Use Optional.ofNullable(pattern).ifPresent(query::taskNameLikeIgnoreCase)","Treat blank/absent search input as 'no filter', not as a null argument","Extract request search parameters defensively before query building"],"tags":["flowable","query-builder","null-argument","validation"],"backgroundTag":"null-argument","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"}