{"record":{"id":"20224f073bcc8e60","repo":"flowable/flowable-engine","slug":"sql-exception-when-getting-value-message-e-get","errorCode":null,"errorMessage":"SQL Exception when getting value. Message: ${e.getMessage()}","messagePattern":"SQL Exception when getting value\\. Message: (.+?)","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/AbstractSqlScriptBasedDbSchemaManager.java","lineNumber":202,"sourceCode":"        \n        SchemaManagerDatabaseConfiguration databaseConfiguration = getDatabaseConfiguration();\n\n        if (!databaseConfiguration.isTablePrefixIsSchema()) {\n            tableName = prependDatabaseTablePrefix(tableName);\n        }\n        try (PreparedStatement statement = databaseConfiguration.getConnection()\n                .prepareStatement(\"select VALUE_ from \" + tableName + \" where NAME_ = ?\")) {\n\n            statement.setString(1, propertyName);\n            ResultSet resultSet = statement.executeQuery();\n            if (resultSet.next()) {\n                return resultSet.getString(1);\n            } else {\n                return null;\n            }\n        } catch (SQLException e) {\n            if (!checkPropertyTablePresent && isMissingTablesException(e)) {\n                throw new FlowableException(\"SQL Exception when getting value. Message: \" + e.getMessage(), e);\n            }\n            logger.error(\"Could not get property from table {}\", tableName, e);\n            return null;\n        }\n    }\n    \n    protected String getPropertyTable() {\n        return PROPERTY_TABLE;\n    }\n    \n    public String getResourceForDbOperation(String directory, String operation, String component, String databaseType) {\n        return getResourcesRootDirectory() + directory + \"/flowable.\" + databaseType + \".\" + operation + \".\" + component + \".sql\";\n    }\n    \n    protected abstract String getResourcesRootDirectory();\n    \n    public void executeMandatorySchemaResource(String operation, String component) {\n        String databaseType = getDatabaseConfiguration().getDatabaseType();","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine-common/src/main/java/org/flowable/common/engine/impl/db/AbstractSqlScriptBasedDbSchemaManager.java#L184-L220","documentation":"AbstractSqlScriptBasedDbSchemaManager.getProperty reads a value (e.g. schema.version) from a property table via raw SQL. When the table-check flag is disabled and the SQLException indicates the table is missing, it throws FlowableException. If the exception does not look like a missing-table error it logs and returns null instead.","triggerScenarios":"getProperty called with checkPropertyTablePresent=false against a database where the property table (e.g. ACT_GE_PROPERTY) does not exist and the driver's error is recognized as a missing-table error — typically during schema install before tables exist.","commonSituations":"Fresh database without Flowable tables while a component tries to read schema properties; database user lacking SELECT permission on the property table; manually dropped tables; multi-schema setups where the table lives in another schema.","solutions":["Run the schema creation/upgrade first (databaseSchemaUpdate=true or execute the schema scripts) so the property table exists.","Check the chained SQLException cause for the real SQL error (permissions, wrong schema) and fix it.","Verify the database user can access the schema containing ACT_GE_PROPERTY."],"exampleFix":"// before\n<property name=\"databaseSchemaUpdate\" value=\"false\"/>\n// after\n<property name=\"databaseSchemaUpdate\" value=\"true\"/> <!-- creates missing tables on startup -->","handlingStrategy":"try-catch","validationCode":"// ensure property table exists before reading properties\nDatabaseMetaData md = connection.getMetaData();\nResultSet rs = md.getTables(null, null, \"ACT_GE_PROPERTY\", null);\nboolean present = rs.next();","typeGuard":null,"tryCatchPattern":"try { engineCfg.buildProcessEngine(); } catch (FlowableException e) { if (e.getMessage().contains(\"SQL Exception when getting value\")) { /* run schema creation first */ } throw e; }","preventionTips":["Use databaseSchemaUpdate=true on first boot so tables are created before properties are read","Do not drop ACT_GE_PROPERTY manually; use dbSchemaDrop","Ensure the DB user can SELECT from all Flowable tables","Confirm the connection uses the correct schema/catalog"],"tags":["database","sql","schema-management"],"backgroundTag":"sql-query-failed","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}