my sql: Cannot invoke "io.airbyte.integrations.sou...
# replication-ask-ai
r
my sql: Cannot invoke "io.airbyte.integrations.source.relationaldb.TableInfo.getFields()" because "table" is null
k
MySQL NullPointerException: TableInfo.getFields() because table is null This is a known issue with the source-mysql connector. Based on the GitHub issue, here are the key findings: Root Cause The error occurs when a table that was previously part of your connection schema no longer exists (or can't be matched) in the source database. Specifically, the connector tries to look up a table by name, but the lookup returns
null
— causing the NPE when
.getFields()
is called on it. A related root cause (reported for MSSQL but affecting the same CDK code) is a name collision between a table and a view: if you have both a table named
Activity_Index
and a view named
Activity Index
, the JDBC metadata query returns both, and
.firstOrNull()
may pick the wrong one (the view), which then doesn't match the expected table name — resulting in
null
. [GitHub Issue] Workarounds 1. Refresh your connection schema — Go to your connection settings in Airbyte and update/refresh the schema. This is the most commonly reported fix. If a table was dropped from your database, removing it from the configured streams resolves the error. [GitHub Issue] 2. Check for table/view name conflicts — If you have a view and a table with similar names (differing only by spaces vs. underscores), this can cause the wrong object to be returned by the JDBC metadata query. 3. Proposed code fix — A contributor suggested adding a
.filter { ti -> ti.name == tableName }
before
.firstOrNull()
in
AbstractJdbcSource.discoverTable()
to ensure the correct table is matched, but this fix has not yet been confirmed as merged. [GitHub Issue] Summary If refreshing the schema doesn't resolve it, check whether there are any views or tables in your database with names that could conflict (e.g., spaces vs. underscores). 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help., with interactive elements