{"record":{"id":"53298719e78fa4f7","repo":"OpenAPITools/openapi-generator","slug":"failed-to-canonicalize-file-testdatacontrolfilest","errorCode":null,"errorMessage":"Failed to canonicalize file {testDataControlFileStr}","messagePattern":"Failed to canonicalize file (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java","lineNumber":1364,"sourceCode":"                    } catch (CacheException e) {\n                        LOGGER.error(\"Unable to load test data file \" + testDataFileStr, e);\n                    }\n                }\n\n                String testDataControlFileStr;\n                if (additionalProperties.containsKey(TEST_DATA_CONTROL_FILE))\n                    testDataControlFileStr = (String) additionalProperties.get(TEST_DATA_CONTROL_FILE);\n                else\n                    testDataControlFileStr = outputFolder() + \"/test-data-control.json\";\n                testDataControlFileStr = testDataControlFileStr.replace('/', File.separatorChar);\n                try {\n                    File testDataControlFile = new File(testDataControlFileStr).getCanonicalFile();\n                    testDataControlFileStr = testDataControlFile.getPath();\n                    additionalProperties.put(TEST_DATA_CONTROL_FILE,\n                            testDataControlFileStr.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\"));\n                    setTestDataControlFile(testDataControlFile);\n                } catch (IOException e) {\n                    throw new RuntimeException(\"Failed to canonicalize file \" + testDataControlFileStr, e);\n                }\n\n                testDataControlCache = JsonCache.Factory.instance.get(\"test-data-control\")\n                        .mergePolicy(MergePolicy.KEEP_EXISTING).child('/' + invokerPackage);\n                if (this.testDataControlFile.exists()) {\n                    try {\n                        testDataControlCache.root().load(this.testDataControlFile);\n                    } catch (CacheException e) {\n                        LOGGER.error(\"Unable to load test data control file \" + testDataControlFileStr, e);\n                    }\n                }\n            }\n        }\n        if (this.generateSpringApplication) {\n            if (supportMultipleSpringServices) {\n                SupportingFile supportingFile = null;\n                for (SupportingFile sf : supportingFiles) {\n                    if (\"server/ApplicationContext.xml.mustache\".equals(sf.getTemplateFile())) {","sourceCodeStart":1346,"sourceCodeEnd":1382,"githubUrl":"https://github.com/OpenAPITools/openapi-generator/blob/fcec517be3cf5b7964296bcba25fbc97541484e7/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavaCXFExtServerCodegen.java#L1346-L1382","documentation":"Error \"Failed to canonicalize file {testDataControlFileStr}\" thrown in OpenAPITools/openapi-generator.","triggerScenarios":"Thrown when the Java CXF-ext server generator cannot canonicalize the configured test data control file path (invalid path or I/O error). Verify the testDataControlFile option points to an existing, readable file.","commonSituations":"See trigger scenarios.","solutions":["Check that the test data control file path exists and is readable; verify the configured testDataControlFile location."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fcec517be3cf5b7964296bcba25fbc97541484e7","analyzedAt":"2026-08-22T11:13:11.613Z","schemaVersion":2},"datasetVersion":"2026-08-22T14:17:55.899Z"}