ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
137 stars 65 forks source link

Java null point exception throws when using JDBC module #1982

Closed indrarajwso2 closed 3 years ago

indrarajwso2 commented 3 years ago

Description: Used ballerina JDBC module to connect remote DB and call stored procedure. After running function returns a java null pointer exception.

Ballerina ver - beta 2

error: java.lang.NullPointerException at ballerinax.java.jdbc.0_6_0-beta_2.Client:call(client.bal:94) user_search:getInternalUserData(user_search.bal:491) $value$$anonType$_0:$post$searchClientData(user_search.bal:95)

kaneeldias commented 3 years ago

Issue was due to dbClient->call() being called without specifying the expected return record types for a procedure which returns a result set.

Intended behaviour is to generate a default record using the retrieved column names.

Fixed in https://github.com/ballerina-platform/module-ballerina-sql/pull/398