{"record":{"id":"83716347f7812486","repo":"MyCATApache/Mycat-Server","slug":"group-should-contain-nodelist","errorCode":null,"errorMessage":"group should contain 'nodeList'","messagePattern":"group should contain 'nodeList'","errorType":"exception","errorClass":"ConfigException","httpStatus":null,"severity":"error","filePath":"src/main/java/io/mycat/config/model/ClusterConfig.java","lineNumber":117,"sourceCode":"        return nodes;\n    }\n\n    private static Map<String, List<String>> loadGroup(Element root, Map<String, MycatNodeConfig> nodes) {\n        Map<String, List<String>> groups = new HashMap<String, List<String>>();\n        NodeList list = root.getElementsByTagName(\"group\");\n        for (int i = 0, n = list.getLength(); i < n; i++) {\n            Node node = list.item(i);\n            if (node instanceof Element) {\n                Element e = (Element) node;\n                String groupName = e.getAttribute(\"name\").trim();\n                if (groups.containsKey(groupName)) {\n                    throw new ConfigException(\"group duplicated : \" + groupName);\n                }\n\n                Map<String, Object> props = ConfigUtil.loadElements(e);\n                String value = (String) props.get(\"nodeList\");\n                if (null == value || \"\".equals(value)) {\n                    throw new ConfigException(\"group should contain 'nodeList'\");\n                }\n\n                String[] sList = SplitUtil.split(value, ',', true);\n\n                if (null == sList || sList.length == 0) {\n                    throw new ConfigException(\"group should contain 'nodeList'\");\n                }\n\n                for (String s : sList) {\n                    if (!nodes.containsKey(s)) {\n                        throw new ConfigException(\"[ node :\" + s + \"] in [ group:\" + groupName + \"] doesn't exist!\");\n                    }\n                }\n                List<String> nodeList = Arrays.asList(sList);\n                groups.put(groupName, nodeList);\n            }\n        }\n        if (!groups.containsKey(\"default\")) {","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/MyCATApache/Mycat-Server/blob/65f8d8beb752f935752f2a0eec0ab017facab9ef/src/main/java/io/mycat/config/model/ClusterConfig.java#L99-L135","documentation":"loadGroup requires each <group> element to provide a non-empty 'nodeList' property listing its member nodes (comma-separated). If props.get(\"nodeList\") is null or empty, ConfigException 'group should contain nodeList' is thrown at ClusterConfig.java:117.","triggerScenarios":"A <group name=\"X\"> element has no <property name=\"nodeList\"> child or its value is empty; thrown during loadGroup.","commonSituations":"Newly added group left empty before members were assigned, deleted nodeList line during editing, or a misspelled property (nodelist vs nodeList).","solutions":["Add a nodeList property naming existing nodes: <property name=\"nodeList\">nodeM1,nodeM2</property>.","Ensure the property name is exactly 'nodeList' (camelCase) and non-empty.","Confirm the referenced node names exist (else the follow-up 'doesn't exist' error fires).","Restart Mycat to reload the config."],"exampleFix":"<!-- before -->\n<group name=\"group1\">\n  <property name=\"weight\">0</property>\n</group>\n<!-- after -->\n<group name=\"group1\">\n  <property name=\"nodeList\">nodeM1,nodeM2</property>\n</group>","handlingStrategy":"validation","validationCode":"var nl = doc.getElementsByTagName(\"group\");\nfor (int i = 0; i < nl.getLength(); i++) {\n  var el = (Element) nl.item(i);\n  String v = propOf(el, \"nodeList\");\n  if (v == null || v.trim().isEmpty()) throw new IllegalStateException(\"group \" + el.getAttribute(\"name\") + \" missing nodeList\");\n}","typeGuard":null,"tryCatchPattern":"try { new ClusterConfig(); } catch (ConfigException e) { if (e.getMessage().contains(\"group should contain 'nodeList'\")) { log.error(\"Add nodeList property to <group> in cluster.xml\"); } throw e; }","preventionTips":["Always populate nodeList when defining a group","Use exact camelCase property name nodeList","Only list node names already defined as <node>","Validate group structure before restart"],"tags":["xml","config","missing-property","cluster","mycat"],"backgroundTag":"missing-required-config-field","analyzedSha":"65f8d8beb752f935752f2a0eec0ab017facab9ef","analyzedAt":"2026-09-11T00:12:21.696Z","contentChangedAt":"2026-09-11T00:12:21.696Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}