{"record":{"id":"8e309262624e19e6","repo":"alibaba/spring-cloud-alibaba","slug":"sentinel-starter-datasource-datasourcename-dat","errorCode":null,"errorMessage":"[Sentinel Starter] DataSource {dataSourceName} dataType: {propertyValue} is not support now. please using these types: {dataTypeList}","messagePattern":"\\[Sentinel Starter\\] DataSource (.+?) dataType: (.+?) is not support now\\. please using these types: (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/custom/SentinelDataSourceHandler.java","lineNumber":180,"sourceCode":"\t\t\t\t\t\tbuilder.addPropertyReference(\"converter\", customConvertBeanName);\n\t\t\t\t\t}\n\t\t\t\t\tcatch (ClassNotFoundException e) {\n\t\t\t\t\t\tlog.error(\"[Sentinel Starter] DataSource \" + dataSourceName\n\t\t\t\t\t\t\t\t+ \" handle \"\n\t\t\t\t\t\t\t\t+ dataSourceProperties.getClass().getSimpleName()\n\t\t\t\t\t\t\t\t+ \" error, class name: \"\n\t\t\t\t\t\t\t\t+ dataSourceProperties.getConverterClass());\n\t\t\t\t\t\tthrow new RuntimeException(\"[Sentinel Starter] DataSource \"\n\t\t\t\t\t\t\t\t+ dataSourceName + \" handle \"\n\t\t\t\t\t\t\t\t+ dataSourceProperties.getClass().getSimpleName()\n\t\t\t\t\t\t\t\t+ \" error, class name: \"\n\t\t\t\t\t\t\t\t+ dataSourceProperties.getConverterClass(), e);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif (!dataTypeList.contains(\n\t\t\t\t\t\t\tStringUtils.trimAllWhitespace(propertyValue.toString()))) {\n\t\t\t\t\t\tthrow new RuntimeException(\"[Sentinel Starter] DataSource \"\n\t\t\t\t\t\t\t\t+ dataSourceName + \" dataType: \" + propertyValue\n\t\t\t\t\t\t\t\t+ \" is not support now. please using these types: \"\n\t\t\t\t\t\t\t\t+ dataTypeList.toString());\n\t\t\t\t\t}\n\t\t\t\t\t// converter type now support xml or json.\n\t\t\t\t\t// The bean name of these converters wrapped by\n\t\t\t\t\t// 'sentinel-{converterType}-{ruleType}-converter'\n\t\t\t\t\tif (dataSourceProperties.getRuleType() != null) {\n\t\t\t\t\t\tbuilder.addPropertyReference(\"converter\",\n\t\t\t\t\t\t\t\t\"sentinel-\" + propertyValue.toString() + \"-\"\n\t\t\t\t\t\t\t\t\t\t+ dataSourceProperties.getRuleType().getName()\n\t\t\t\t\t\t\t\t\t\t+ \"-converter\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!CONVERTER_CLASS_FIELD.equals(propertyName)) {\n\t\t\t\t\t// wired properties","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/alibaba/spring-cloud-alibaba/blob/115d5901102009492e05d5ec18c3f79cad4077d0/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-sentinel/src/main/java/com/alibaba/cloud/sentinel/custom/SentinelDataSourceHandler.java#L162-L198","documentation":"For non-custom data types, Sentinel validates the configured value against a known list (json, xml). If the trimmed data-type is not in that list, this RuntimeException is thrown, listing the supported types. It guards against silently falling back to a default converter for an unrecognized format.","triggerScenarios":"Setting spring.cloud.sentinel.datasource.xxx.data-type to an unsupported value such as 'yaml', 'JSON' (case mismatch handled by trim only, not lowercasing), 'properties', or a typo like 'jso'.","commonSituations":"Assuming YAML/properties are supported. Case-sensitive typo. Upgrading and not noticing the supported set differs from a fork.","solutions":["Use one of the supported data types exactly: 'json' or 'xml'.","If you need another format, implement a custom Converter and set data-type=custom with converter-class.","Copy the value from the error message's supported list to avoid spelling mistakes."],"exampleFix":"# before\nspring.cloud.sentinel.datasource.ds1.data-type=yaml\n# after\nspring.cloud.sentinel.datasource.ds1.data-type=json","handlingStrategy":"validation","validationCode":"private static final Set<String> SUPPORTED = Set.of(\"json\", \"xml\");\nvoid validateDataType(String t) {\n  if (!SUPPORTED.contains(t == null ? null : t.trim().toLowerCase(Locale.ROOT)))\n    throw new IllegalArgumentException(\"Unsupported data-type \" + t + \"; use one of \" + SUPPORTED);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use exactly 'json' or 'xml'.","Implement a custom converter for other formats.","Copy supported values from the docs to avoid typos."],"tags":["sentinel","datasource","config-validation","data-type"],"backgroundTag":null,"analyzedSha":"115d5901102009492e05d5ec18c3f79cad4077d0","analyzedAt":"2026-08-14T04:47:13.900Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}