{"record":{"id":"752e3085a072e39e","repo":"alibaba/spring-cloud-alibaba","slug":"please-set-s-groupid","errorCode":null,"errorMessage":"please set %s.groupId","messagePattern":"please set (.+?)\\.groupId","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"critical","filePath":"spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-schedulerx/src/main/java/com/alibaba/cloud/scheduling/schedulerx/service/JobSyncService.java","lineNumber":185,"sourceCode":"\t * @param client pop client\n\t * @return sync app group result\n\t * @throws IOException     sync app group exception.\n\t * @throws ClientException sync app group pop client exception.\n\t */\n\tpublic boolean syncAppGroup(DefaultAcsClient client) throws IOException, ClientException {\n\t\tif (StringUtils.isEmpty(properties.getAppName())) {\n\t\t\tlogger.error(\"please set {}.appName\", SchedulerxProperties.CONFIG_PREFIX);\n\t\t\tthrow new IOException(String.format(\"please set %s.appName\", SchedulerxProperties.CONFIG_PREFIX));\n\t\t}\n\n\t\tif (StringUtils.isEmpty(properties.getAppKey())) {\n\t\t\tlogger.error(\"please set {}.appKey\", SchedulerxProperties.CONFIG_PREFIX);\n\t\t\tthrow new IOException(String.format(\"please set %s.appKey\", SchedulerxProperties.CONFIG_PREFIX));\n\t\t}\n\n\t\tif (StringUtils.isEmpty(properties.getGroupId())) {\n\t\t\tlogger.error(\"please set {}.groupId\", SchedulerxProperties.CONFIG_PREFIX);\n\t\t\tthrow new IOException(String.format(\"please set %s.groupId\", SchedulerxProperties.CONFIG_PREFIX));\n\t\t}\n\n\t\tCreateAppGroupRequest request = new CreateAppGroupRequest();\n\t\trequest.setNamespace(properties.getNamespace());\n\t\trequest.setNamespaceSource(getNamespaceSource());\n\t\trequest.setAppName(properties.getAppName());\n\t\trequest.setGroupId(properties.getGroupId());\n\t\trequest.setAppKey(properties.getAppKey());\n\t\tif (StringUtils.isNotEmpty(properties.getAlarmChannel())) {\n\t\t\tMonitorConfig monitorConfig = new MonitorConfig();\n\t\t\tmonitorConfig.setSendChannel(properties.getAlarmChannel());\n\t\t\trequest.setMonitorConfigJson(JsonUtil.toJson(monitorConfig));\n\t\t}\n\t\tif (!properties.getAlarmUsers().isEmpty()) {\n\t\t\tList<ContactInfo> contactInfos = new ArrayList(properties.getAlarmUsers().values());\n\t\t\trequest.setMonitorContactsJson(JsonUtil.toJson(contactInfos));\n\t\t}\n\t\tCreateAppGroupResponse response = client.getAcsResponse(request);","sourceCodeStart":167,"sourceCodeEnd":203,"githubUrl":"https://github.com/alibaba/spring-cloud-alibaba/blob/115d5901102009492e05d5ec18c3f79cad4077d0/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-schedulerx/src/main/java/com/alibaba/cloud/scheduling/schedulerx/service/JobSyncService.java#L167-L203","documentation":"Thrown by JobSyncService.syncAppGroup(DefaultAcsClient) when SchedulerxProperties.groupId is null or empty. The groupId identifies the SchedulerX2 application group the job belongs to; the CreateAppGroup POP request sets request.setGroupId(properties.getGroupId()), so an empty value is rejected before the call. Aborts with IOException after logging, and because blockAppStart defaults to true the failure stops application startup.","triggerScenarios":"Calling syncAppGroup(client) while properties.getGroupId() returns null or \"\" (StringUtils.isEmpty check at JobSyncService.java:184-185). Reached during auto job sync when spring.cloud.scheduling.schedulerx.jobs is non-empty and the starter is enabled (default).","commonSituations":"groupId is mistaken for appName and only appName is set; groupId is provisioned in the SchedulerX2 console but never copied into config; multi-module project where the property is set in a sibling module's YAML that is not on the classpath.","solutions":["Copy the groupId from the Alibaba SchedulerX2 console and set spring.cloud.scheduling.schedulerx.groupId.","Verify appName, appKey, and groupId are all present and correctly indented together.","If groupId should differ per environment, use a profile-specific application-{profile}.yml and confirm the active profile."],"exampleFix":"# before\nspring:\n  cloud:\n    scheduling:\n      schedulerx:\n        appName: my-app\n        appKey: a1b2c3*******\n\n# after\nspring:\n  cloud:\n    scheduling:\n      schedulerx:\n        appName: my-app\n        appKey: a1b2c3*******\n        groupId: app-123","handlingStrategy":"validation","validationCode":"Assert.hasText(properties.getGroupId(), \"spring.cloud.scheduling.schedulerx.groupId must be set before job sync\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat appName + appKey + groupId as an atomic triple: never commit one without the others.","Add a startup health check (InitializingBean / @EventListener ApplicationReadyEvent) that fails loudly if any of the three is blank."],"tags":["java","spring-cloud-alibaba","schedulerx","configuration","startup"],"backgroundTag":null,"analyzedSha":"115d5901102009492e05d5ec18c3f79cad4077d0","analyzedAt":"2026-08-14T04:47:13.900Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}