{"record":{"id":"8a8682a357d38922","repo":"flowable/flowable-engine","slug":"illegal-format-for-version-versionstring-8a8682","errorCode":null,"errorMessage":"Illegal format for version: <versionString>","messagePattern":"Illegal format for version: <versionString>","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java","lineNumber":1031,"sourceCode":"                tables = databaseMetaData.getTables(catalog, schema, tableName, JDBC_METADATA_TABLE_TYPES);\n                return tables.next();\n            } finally {\n                try {\n                    tables.close();\n                } catch (Exception e) {\n                    LOGGER.error(\"Error closing meta data tables\", e);\n                }\n            }\n\n        } catch (Exception e) {\n            throw new ActivitiException(\"couldn't check if tables are already present using metadata: \" + e.getMessage(), e);\n        }\n    }\n\n    protected String getCleanVersion(String versionString) {\n        Matcher matcher = CLEAN_VERSION_REGEX.matcher(versionString);\n        if (!matcher.find()) {\n            throw new ActivitiException(\"Illegal format for version: \" + versionString);\n        }\n\n        String cleanString = matcher.group();\n        try {\n            Double.parseDouble(cleanString); // try to parse it, to see if it is really a number\n            return cleanString;\n        } catch (NumberFormatException nfe) {\n            throw new ActivitiException(\"Illegal format for version: \" + versionString, nfe);\n        }\n    }\n\n    protected String prependDatabaseTablePrefix(String tableName) {\n        return dbSqlSessionFactory.getDatabaseTablePrefix() + tableName;\n    }\n\n    protected String readNextTrimmedLine(BufferedReader reader) throws IOException {\n        String line = reader.readLine();\n        if (line != null) {","sourceCodeStart":1013,"sourceCodeEnd":1049,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/db/DbSqlSession.java#L1013-L1049","documentation":"getCleanVersion extracts the numeric portion of a version string read from the database schema version table. If the string does not match CLEAN_VERSION_REGEX, Flowable cannot determine the schema version and throws this ActivitiException. It guards schema upgrade logic against unparseable version values.","triggerScenarios":"Schema version lookup (e.g. table ACT_GE_PROPERTY / FLW_EV_DATABASECHANGELOG) returns a version string that does not match the expected numeric pattern, e.g. '5.x', empty string, or arbitrary text in the VERSION column.","commonSituations":"Manually edited version rows in the property table, schemas created by a different/incompatible engine, or corrupted/migrated databases left with non-numeric version values.","solutions":["Query the schema version table and fix the VERSION value to a plain numeric string (e.g. '6.7.2')","If the table belongs to another product's schema, point the engine at the correct database/schema","If the schema is in an unknown state, drop and recreate it via databaseSchemaUpdate=true on a clean database","Compare the stored version against your engine version to detect a version mismatch"],"exampleFix":"// before\nUPDATE ACT_GE_PROPERTY SET VALUE_ = 'v6' WHERE NAME_ = 'schema.version';\n// after\nUPDATE ACT_GE_PROPERTY SET VALUE_ = '6.7.2' WHERE NAME_ = 'schema.version';","handlingStrategy":"validation","validationCode":"String v = jdbcTemplate.queryForObject(\n  \"SELECT VALUE_ FROM ACT_GE_PROPERTY WHERE NAME_='schema.version'\", String.class);\nif (v == null || !v.matches(\"\\\\d+(\\.\\\\d+)*\")) {\n  throw new IllegalStateException(\"Unparseable schema version in DB: \" + v);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Never hand-edit the schema version property row","Only run engines against schemas they created or officially migrated","Snapshot the DB before upgrades so corrupted version rows can be restored"],"tags":["database","schema","version","validation"],"backgroundTag":"invalid-identifier-format","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}