{"record":{"id":"02670158e4f03a17","repo":"quarkusio/quarkus","slug":"one-of-groupid-or-artifactid-is-missing-from-st","errorCode":null,"errorMessage":"One of groupId or artifactId is missing from '${str.substring(0, fromIndex)}'","messagePattern":"One of groupId or artifactId is missing from '(.+?)'","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/dependency/GACT.java","lineNumber":104,"sourceCode":"            if (i == fromIndex - 1) {\n                parts[2] = ArtifactCoords.DEFAULT_CLASSIFIER;\n            } else {\n                parts[2] = str.substring(i + 1, fromIndex);\n            }\n\n            fromIndex = i;\n            i = str.lastIndexOf(':', fromIndex - 1);\n            if (i < 0) {\n                parts[0] = str.substring(0, fromIndex);\n                if ((parts[1] = parts[2]).isEmpty()) {\n                    throw new IllegalArgumentException(\"ArtifactId is empty in `\" + str + \"`\");\n                }\n                parts[2] = parts[3];\n                parts[3] = null;\n                return parts;\n            }\n            if (i == fromIndex - 1) {\n                throw new IllegalArgumentException(\n                        \"One of groupId or artifactId is missing from '\" + str.substring(0, fromIndex) + \"'\");\n            }\n\n            parts[0] = str.substring(0, i);\n            parts[1] = str.substring(i + 1, fromIndex);\n            if (parts[3].isEmpty()) {\n                parts[3] = null;\n            }\n            return parts;\n        }\n\n        parts[0] = str.substring(0, fromIndex);\n        if ((parts[1] = parts[3]).isEmpty()) {\n            throw new IllegalArgumentException(\"ArtifactId is empty in `\" + str + \"`\");\n        }\n        parts[2] = ArtifactCoords.DEFAULT_CLASSIFIER;\n        parts[3] = null;\n        return parts;","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/independent-projects/bootstrap/app-model/src/main/java/io/quarkus/maven/dependency/GACT.java#L86-L122","documentation":"GACT.split throws IllegalArgumentException when the ':' immediately precedes the substring boundary, meaning one of groupId or artifactId is missing (the string starts with ':' or has '::' at the split point). The message includes the offending prefix substring.","triggerScenarios":"Calling GACT.split with input like \":app:1.0\" or \"com.acme:::...\" where the character just before fromIndex is ':' — leaving either the groupId or artifactId slot empty.","commonSituations":"Coords with a leading colon copied from CLI output; consecutive colons from joining an empty variable; typos when hand-editing quarkus dependency configuration.","solutions":["Ensure the prefix before the parsed segment is exactly groupId:artifactId with both non-empty","Collapse or fix double/leading colons in the coordinate string","Pre-validate that str.charAt(0) != ':' and the string contains no \"::\""],"exampleFix":"// before\nGACT.split(\":app:1.0.0\", new String[5], 8); // throws\n// after\nGACT.split(\"com.acme:app:1.0.0\", new String[5], 14);","handlingStrategy":"validation","validationCode":"boolean hasGa(String s) {\n    return s != null && s.charAt(0) != ':' && !s.contains(\"::\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    GACT.split(str, parts, fromIndex);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().startsWith(\"One of groupId or artifactId is missing\")) {\n        throw new IllegalArgumentException(\"Coordinate must start with groupId:artifactId: \" + str);\n    }\n}","preventionTips":["Reject coordinate strings that start with ':' or contain '::'","Validate with regex ^[^:]+:[^:]+.* before parsing","Strip leading colons introduced by copy-paste from CLI output","Interpolate variables defensively and check for emptiness before joining"],"tags":["parsing","maven-coordinates","format-validation"],"backgroundTag":"invalid-coordinate-format","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}