{"record":{"id":"39c7b9ab23284b1f","repo":"mybatis/mybatis-3","slug":"error-parsing-sql-mapper-configuration-cause-ca","errorCode":null,"errorMessage":"Error parsing SQL Mapper Configuration. Cause: {cause}","messagePattern":"Error parsing SQL Mapper Configuration\\. Cause: (.+?)","errorType":"exception","errorClass":"BuilderException","httpStatus":null,"severity":"error","filePath":"src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java","lineNumber":133,"sourceCode":"    try {\n      // issue #117 read properties first\n      propertiesElement(root.evalNode(\"properties\"));\n      Properties settings = settingsAsProperties(root.evalNode(\"settings\"));\n      loadCustomVfsImpl(settings);\n      loadCustomLogImpl(settings);\n      typeAliasesElement(root.evalNode(\"typeAliases\"));\n      pluginsElement(root.evalNode(\"plugins\"));\n      objectFactoryElement(root.evalNode(\"objectFactory\"));\n      objectWrapperFactoryElement(root.evalNode(\"objectWrapperFactory\"));\n      reflectorFactoryElement(root.evalNode(\"reflectorFactory\"));\n      settingsElement(settings);\n      // read it after objectFactory and objectWrapperFactory issue #631\n      environmentsElement(root.evalNode(\"environments\"));\n      databaseIdProviderElement(root.evalNode(\"databaseIdProvider\"));\n      typeHandlersElement(root.evalNode(\"typeHandlers\"));\n      mappersElement(root.evalNode(\"mappers\"));\n    } catch (Exception e) {\n      throw new BuilderException(\"Error parsing SQL Mapper Configuration. Cause: \" + e, e);\n    }\n  }\n\n  private Properties settingsAsProperties(XNode context) {\n    if (context == null) {\n      return new Properties();\n    }\n    Properties props = context.getChildrenAsProperties();\n    // Check that all settings are known to the configuration class\n    MetaClass metaConfig = MetaClass.forClass(Configuration.class, localReflectorFactory);\n    for (Object key : props.keySet()) {\n      if (!metaConfig.hasSetter(String.valueOf(key))) {\n        throw new BuilderException(\n            \"The setting \" + key + \" is not known.  Make sure you spelled it correctly (case sensitive).\");\n      }\n    }\n    return props;\n  }","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/mybatis/mybatis-3/blob/008069adb1b089579b5dcba87ee591908b263274/src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java#L115-L151","documentation":"Error \"Error parsing SQL Mapper Configuration. Cause: {cause}\" thrown in mybatis/mybatis-3.","triggerScenarios":"Thrown at src/main/java/org/apache/ibatis/builder/xml/XMLConfigBuilder.java:133 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the nested cause for the specific XML problem (malformed XML, unknown element, invalid attribute).","Validate mybatis-config.xml against the MyBatis DTD or schema.","Ensure referenced resources, mapper files, and classes exist and are on the classpath."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"008069adb1b089579b5dcba87ee591908b263274","analyzedAt":"2026-08-14T13:07:10.264Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}