Tejas Kamble
08/05/2025, 5:52 AM2025-08-05 11:14:01 source WARN main i.a.i.s.m.c.MongoDbCdcInitializer(logOplogInfo):280 Unable to query for op log stats, exception: {}class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap')
I have given read@local access to the user,
I have also tried creating new connections and still the issue persist.kapa.ai
08/05/2025, 5:52 AMUnable to query for op log stats, exception: {}class java.lang.Integer cannot be cast to class java.lang.Long (java.lang.Integer and java.lang.Long are in module java.base of loader 'bootstrap') is a known issue with the Airbyte MongoDB connector. This error typically occurs when the connector tries to read oplog statistics and encounters a type mismatch in the data returned by MongoDB—specifically, it expects a value as a Long but receives it as an Integer instead. This is unrelated to user permissions if you have already granted read@local access, which is the correct permission for reading oplog stats and is required for the connector to function properly with CDC (Change Data Capture) mode. This issue has been reported by other users as well, even after setting the correct permissions and recreating connections. The root cause appears to be a bug in the connector's handling of the oplog stats response, not a misconfiguration on your part. For example, a similar error is documented here: > 2025-07-07 11:35:51 source WARN main i.a.i.s.m.c.MongoDbCdcInitializer(logOplogInfo):280 Unable to query for op log stats, exception: {}class java.lang.Integer cannot be cast to class java.lang.Long... > — [source-mongodb-v2] Failed syncs due to [config_error] Saved offset is not valid. > [Github Issue #62833](https://github.com/airbytehq/airbyte/issues/62833) What you can do: - There is currently no documented workaround for this specific type-casting bug in the knowledge sources. - You have already taken the correct steps by granting read@local and recreating connections. - The issue may require a fix from the Airbyte engineering team. You may want to follow or comment on the linked GitHub issue to track progress or provide additional details about your environment. Summary: This is a connector bug, not a configuration or permission issue. There is no user-side fix documented in the available knowledge sources. Monitoring the referenced GitHub issue for updates is recommended. If you need to escalate or provide more details, sharing your MongoDB version and connector version in the GitHub issue may help the maintainers address the bug more quickly. [See related issue and discussion](https://github.com/airbytehq/airbyte/issues/62833)