Daniel Stevenson
05/26/2024, 9:01 PMabctl install
๐ Error Message from airbyte-server-container output from `crictl logs `container-id``
2024-05-26 18:03:01 ERROR i.a.s.e.UncaughtExceptionHandler(handle):31 - Uncaught exception
java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.fieldNames()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null
at io.airbyte.commons.server.validation.CatalogValidator.fieldCount(CatalogValidator.kt:39) ~[io.airbyte-airbyte-commons-server-0.61.0.jar:?]
at io.airbyte.commons.server.handlers.ConnectionsHandler.validateCatalogSize(ConnectionsHandler.java:1172) ~[io.airbyte-airbyte-commons-server-0.61.0.jar:?]
at io.airbyte.commons.server.handlers.ConnectionsHandler.createConnection(ConnectionsHandler.java:507) ~[io.airbyte-airbyte-commons-server-0.61.0.jar:?]
at io.airbyte.commons.server.handlers.WebBackendConnectionsHandler.webBackendCreateConnection(WebBackendConnectionsHandler.java:564) ~[io.airbyte-airbyte-commons-server-0.61.0.jar:?]
at io.airbyte.server.apis.WebBackendApiController.lambda$webBackendCreateConnection$1(WebBackendApiController.java:88) ~[io.airbyte-airbyte-server-0.61.0.jar:?]
at io.airbyte.server.apis.ApiHelper.execute(ApiHelper.java:28) ~[io.airbyte-airbyte-server-0.61.0.jar:?]
at io.airbyte.server.apis.WebBackendApiController.webBackendCreateConnection(WebBackendApiController.java:86) ~[io.airbyte-airbyte-server-0.61.0.jar:?]
at io.airbyte.server.apis.$WebBackendApiController$Definition$Exec.dispatch(Unknown Source) ~[io.airbyte-airbyte-server-0.61.0.jar:?]
at io.micronaut.context.AbstractExecutableMethodsDefinition$DispatchedExecutableMethod.invokeUnsafe(AbstractExecutableMethodsDefinition.java:461) ~[micronaut-inject-4.4.8.jar:4.4.8]
at io.micronaut.context.DefaultBeanContext$BeanContextUnsafeExecutionHandle.invokeUnsafe(DefaultBeanContext.java:4232) ~[micronaut-inject-4.4.8.jar:4.4.8]
at io.micronaut.web.router.AbstractRouteMatch.execute(AbstractRouteMatch.java:271) ~[micronaut-router-4.4.8.jar:4.4.8]
at io.micronaut.http.server.RouteExecutor.executeRouteAndConvertBody(RouteExecutor.java:488) ~[micronaut-http-server-4.4.8.jar:4.4.8]
at io.micronaut.http.server.RouteExecutor.lambda$callRoute$6(RouteExecutor.java:465) ~[micronaut-http-server-4.4.8.jar:4.4.8]
at io.micronaut.core.execution.ExecutionFlow.lambda$async$1(ExecutionFlow.java:87) ~[micronaut-core-4.4.8.jar:4.4.8]
at io.micronaut.core.propagation.PropagatedContext.lambda$wrap$3(PropagatedContext.java:211) ~[micronaut-core-4.4.8.jar:4.4.8]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[?:?]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[?:?]
at java.base/java.lang.Thread.run(Thread.java:1583) [?:?]
See thread for source connector YAML
๐ Call to action: Has anyone experienced this 500 error (null value instead of json) output from airbyte-server-container when setting up a new custom source connector?
(could it be related to the fact that little or no data is available at some of the source API endpoints ?) ... IDK
๐ any comments, thoughts, suggstions welcome! THANK YOU!!kapa.ai
05/26/2024, 9:01 PMNullPointerException when trying to finish and sync a custom source connector built with the low-code builder UI. The error message indicates that the issue arises because a JsonNode is null when the code attempts to invoke fieldNames() on it. ### Possible Cause The error might be due to the fact that some of the source API endpoints are returning little or no data, which results in a null JsonNode. This is consistent with the error message you provided: java.lang.NullPointerException: Cannot invoke "com.fasterxml.jackson.databind.JsonNode.fieldNames()" because the return value of "com.fasterxml.jackson.databind.JsonNode.get(String)" is null ### Steps to Troubleshoot 1. Check API Responses: Ensure that the API endpoints you are querying return valid JSON responses. If any endpoint returns an empty response or a response that does not include the expected fields, it could cause this issue. 2. Validate JSON Schema: Make sure that the JSON schema defined for your custom source connector is accurate and matches the structure of the data returned by the API. 3. Add Null Checks: If you have access to the source code of the connector, consider adding null checks before invoking methods on JsonNode objects. This can help prevent NullPointerException errors. 4. Run Local Tests: Since you mentioned that you can run check, discover, and read locally without problems, try to replicate the issue locally by running the same commands that the Airbyte server runs during the "Finish & Sync" step. ### Example Command You can use the following command to run a local check and see if it returns any errors: bash docker run --rm -v $(pwd)/secrets:/secrets airbyte/custom-source-name check --config secrets/config.json ### Related Issues It might also be helpful to look at related issues on GitHub to see if others have encountered similar problems. For example, the issue mentioned in the forum post might be related: [UI "Unknown error occurred" after upgrade ยท Issue #13015 ยท airbytehq/airbyte](https://github.com/airbytehq/airbyte/issues/13015). ### Community Assistance If the issue persists, consider opening a new topic on the Airbyte forum or GitHub to get further assistance from the community and the Airbyte support team. ### Conclusion By ensuring that your API responses are valid and adding necessary null checks, you can likely resolve the NullPointerException you're encountering. If you need further assistance, don't hesitate to reach out to the community or check related issues on GitHub. Feel free to share more details or ask further questions if needed!