{"record":{"id":"c0dbd476fed67ddc","repo":"t8y2/dbx","slug":"unsupported-firebird-parameter-type-parametertyp","errorCode":null,"errorMessage":"Unsupported Firebird parameter type: {parameterType}","messagePattern":"Unsupported Firebird parameter type: (.+?)","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java","lineNumber":108,"sourceCode":"                        ProcedureParameter parameter = new ProcedureParameter(\n                            parameterName,\n                            trimToNull(resultSet.getString(\"FIELD_SOURCE\")),\n                            trimToNull(resultSet.getString(\"PARAMETER_DEFAULT\")),\n                            nullableInt(resultSet, \"PARAMETER_NULL_FLAG\"),\n                            nullableInt(resultSet, \"FIELD_TYPE\"),\n                            nullableInt(resultSet, \"FIELD_SUB_TYPE\"),\n                            nullableInt(resultSet, \"FIELD_PRECISION\"),\n                            nullableInt(resultSet, \"FIELD_SCALE\"),\n                            nullableInt(resultSet, \"FIELD_LENGTH\"),\n                            nullableInt(resultSet, \"CHAR_COUNT\")\n                        );\n                        int parameterType = resultSet.getInt(\"PARAMETER_TYPE\");\n                        if (parameterType == 0) {\n                            inputs.add(parameter);\n                        } else if (parameterType == 1) {\n                            outputs.add(parameter);\n                        } else {\n                            throw new IllegalStateException(\"Unsupported Firebird parameter type: \" + parameterType);\n                        }\n                    }\n                }\n            }\n\n            String source = !found || body == null || body.isBlank()\n                ? \"\"\n                : buildProcedureDdl(name, inputs, outputs, body);\n            return new ObjectSource(name, normalizedType, schema, source, false);\n        });\n    }\n\n    static String normalizeObjectSourceType(String objectType) {\n        if (objectType == null) {\n            throw new IllegalArgumentException(\"Unsupported object type: null\");\n        }\n        String normalized = objectType.trim().toUpperCase(Locale.ROOT);\n        if (!\"PROCEDURE\".equals(normalized)) {","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/firebird/src/main/java/com/dbx/agent/firebird/FirebirdAgent.java#L90-L126","documentation":"While building a Firebird procedure source, the driver reads RDB$PARAMETER_TYPE from the procedure parameter metadata and only expects 0 (input) or 1 (output). Any other value means the metadata is in an unexpected form, so the agent aborts with IllegalStateException rather than emitting a parameter into the wrong list.","triggerScenarios":"Iterating the procedure-parameter result set in getObjectSource when PARAMETER_TYPE holds a value other than 0 or 1 (e.g. a driver/JDBC metadata quirk or newer Firebird metadata returning additional parameter kinds).","commonSituations":"Using a Jaybird/driver version whose metadata mapping differs from what the agent expects; unusual procedure definitions or system-generated procedures; corrupted or third-party-altered system tables producing nonstandard PARAMETER_TYPE values.","solutions":["Inspect the procedure's parameters: SELECT PARAMETER_NAME, PARAMETER_TYPE FROM rdb$procedure_parameters WHERE rdb$procedure_name = ... to find the offending value.","Recreate the procedure with a standard definition so parameters are plain IN/OUT.","Update or align the Jaybird JDBC driver version so PARAMETER_TYPE values match the agent's expectations.","If a legitimate new parameter kind is found, patch the driver agent to handle that PARAMETER_TYPE value."],"exampleFix":"// before\n} else {\n    throw new IllegalStateException(\"Unsupported Firebird parameter type: \" + parameterType);\n}\n// after\n} else {\n    LOG.warn(\"Skipping parameter \" + parameter + \" with unknown PARAMETER_TYPE \" + parameterType);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    src = agent.getObjectSource(conn, schema, procName, \"PROCEDURE\");\n} catch (IllegalStateException e) {\n    if (e.getMessage() != null && e.getMessage().startsWith(\"Unsupported Firebird parameter type\")) {\n        LOG.warn(\"Procedure {} has nonstandard parameter metadata; falling back to raw DDL\", procName, e);\n        src = fetchRawProcedureDdl(conn, procName); // manual rdb$procedure_source query\n    } else { throw e; }\n}","preventionTips":["Use a Jaybird JDBC driver version consistent with the agent's tested metadata mapping.","Audit custom procedures for non-standard parameter definitions on Firebird upgrades.","Verify RDB$PARAMETER_TYPE values (only 0/1 expected) when migrating from other Firebird versions.","Keep a fallback that reads rdb$procedure_source directly for procedures the agent cannot process."],"tags":["metadata","firebird","unexpected-value"],"backgroundTag":"unsupported-metadata-value","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}