{"record":{"id":"1cd6e8c63ae90ce3","repo":"OtterMind/Chat2DB","slug":"unsupported-oracle-varchar-unit-unit","errorCode":null,"errorMessage":"Unsupported Oracle VARCHAR unit: {unit}","messagePattern":"Unsupported Oracle VARCHAR unit: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"chat2db-community-server/chat2db-community-plugins/chat2db-community-oracle/src/main/java/ai/chat2db/plugin/oracle/OracleSqlGuards.java","lineNumber":61,"sourceCode":"    public static String requireColumnTypeExpression(String typeName) {\n        if (StringUtils.isBlank(typeName)) {\n            throw invalid(\"column type\", typeName);\n        }\n        scanExpression(typeName.trim(), true, \"column type\");\n        return typeName;\n    }\n\n    /**\n     * Backward-compatible name retained for the existing Oracle call sites.\n     */\n    public static String requireSafeTypeName(String typeName) {\n        return requireColumnTypeExpression(typeName);\n    }\n\n    public static String requireUnit(String unit) {\n        String trimmed = StringUtils.trimToEmpty(unit);\n        if (!\"CHAR\".equalsIgnoreCase(trimmed) && !\"BYTE\".equalsIgnoreCase(trimmed)) {\n            throw new IllegalArgumentException(\"Unsupported Oracle VARCHAR unit: \" + unit);\n        }\n        return trimmed;\n    }\n\n    public static String requireAscOrDesc(String value) {\n        String trimmed = StringUtils.trimToEmpty(value);\n        if (\"ASC\".equalsIgnoreCase(trimmed)) {\n            return \"ASC\";\n        }\n        if (\"DESC\".equalsIgnoreCase(trimmed)) {\n            return \"DESC\";\n        }\n        throw new IllegalArgumentException(\"Invalid Oracle index sort direction: \" + value);\n    }\n\n    /**\n     * Returns the raw hex digits represented by {@code value}. Non-hex input is\n     * replaced with the caller-provided base16 encoding, which is verified too.","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/OtterMind/Chat2DB/blob/5ee1e990e73fbcae1969dc554be254fedb3ab888/chat2db-community-server/chat2db-community-plugins/chat2db-community-oracle/src/main/java/ai/chat2db/plugin/oracle/OracleSqlGuards.java#L43-L79","documentation":"Error \"Unsupported Oracle VARCHAR unit: {unit}\" thrown in OtterMind/Chat2DB.","triggerScenarios":"An Oracle VARCHAR column definition used a length unit other than BYTE or CHAR.","commonSituations":"See trigger scenarios.","solutions":["Use BYTE or CHAR as the VARCHAR length unit for Oracle.","Remove the unit or correct it in the column definition."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ee1e990e73fbcae1969dc554be254fedb3ab888","analyzedAt":"2026-08-14T07:05:03.077Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}