Version : 393 /v1/statement returns 404 from trino #13860
Replies: 4 comments
-
Is this your actual code? Or did you replace it with example connection string? |
Beta Was this translation helpful? Give feedback.
-
Updated the problem statement .. I am connecting to trino:8080 where trino is the trino pod or instance runnning on k8 cluster |
Beta Was this translation helpful? Give feedback.
-
I would recommend to verify the connection without JDBC driver first. What happens if you access via web browser? |
Beta Was this translation helpful? Give feedback.
-
/v1/statement is an inbuilt post call in trino (StatementClinetV1.class in trino-jdbc-393.jar) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.sql.SQLException: Error executing query: Error starting query at http://trino:8080/v1/statement returned an invalid response: JsonResponse{statusCode=404, statusMessage=, headers={connection=[keep-alive], content-type=[application/json], date=[Fri, 26 Aug 2022 05:36:16 GMT], keep-alive=[timeout=60], transfer-encoding=[chunked], vary=[Origin, Access-Control-Request-Method, Access-Control-Request-Headers]}, hasValue=false} [Error: {"timestamp":"2022-08-26T05:36:16.749+00:00","status":404,"error":"Not Found","path":"/v1/statement"}]] with root cause
io.trino.jdbc.$internal.jackson.databind.exc.MismatchedInputException: Cannot construct instance of
io.trino.jdbc.$internal.client.QueryError
(although at least one Creator exists): no String-argument constructor/factory method to deserialize from String value ('Not Found')at [Source: (String)"{"timestamp":"2022-08-26T05:36:16.749+00:00","status":404,"error":"Not Found","path":"/v1/statement"}"; line: 1, column: 67] (through reference chain: io.trino.jdbc.$internal.client.QueryResults["error"])
at io.trino.jdbc.$internal.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:63) ~[trino-jdbc-393.jar!/:393]
at io.trino.jdbc.$internal.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1728) ~[trino-jdbc-393.jar!/:393]
at io.trino.jdbc.$internal.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1353) ~[trino-jdbc-393.jar!/:393]
at io.trino.jdbc.$internal.jackson.databind.deser.std.StdDeserializer._deserializeFromString(StdDeserializer.java:311) ~[trino-jdbc-393.jar!/:393]
at io.trino.jdbc.$internal.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1495) ~[trino-jdbc-393.jar!/:393]
at io.trino.jdbc.$internal.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:196) ~[trino-jdbc-393.jar!/:393]
Below is the code I am using for connectivity
And the driver used is trino-jdbc-393.jar via trino-jdbc dependency
Beta Was this translation helpful? Give feedback.
All reactions