Closed hevayo closed 2 years ago
Can you attach the stack trace?
Following is what I get in console log
[2021-07-12 14:13:03,043] SEVERE {b7a.log.crash} - null
java.lang.NullPointerException
at io.ballerina.runtime.api.values.BError.<init>(BError.java:37)
at io.ballerina.runtime.internal.values.ErrorValue.<init>(ErrorValue.java:90)
at io.ballerina.runtime.internal.values.ErrorValue.<init>(ErrorValue.java:80)
at io.ballerina.runtime.api.creators.ErrorCreator.createError(ErrorCreator.java:51)
at io.ballerina.runtime.api.creators.ErrorCreator.createError(ErrorCreator.java:140)
at io.ballerina.runtime.internal.scheduling.Scheduler.postProcess(Scheduler.java:387)
at io.ballerina.runtime.internal.scheduling.Scheduler.run(Scheduler.java:343)
at io.ballerina.runtime.internal.scheduling.Scheduler.runSafely(Scheduler.java:295)
at java.base/java.lang.Thread.run(Thread.java:834)
Seems to be related to https://github.com/ballerina-platform/ballerina-lang/issues/31464
This results in a compilation error with SwanLake
as the resulting stream from the query is restricted to be a bounded stream
which includes nil
type in the stream's completion
.
stream<record {}, error> resultStream =
mysqlClient->query(`SELECT * FROM Customers`); //incompatible types: expected 'stream<record {| anydata...; |},error>', found 'stream<record {| anydata...; |},ballerina/sql:1.3.0:Error?>'
Fixed with https://github.com/ballerina-platform/ballerina-lang/pull/31674. Hence closing.
This issue is NOT closed with a proper Reason/ label. Make sure to add proper reason label before closing. Please add or leave a comment with the proper reason label now.
- Reason/EngineeringMistake - The issue occurred due to a mistake made in the past.
- Reason/Regression - The issue has introduced a regression.
- Reason/MultipleComponentInteraction - Issue occured due to interactions in multiple components.
- Reason/Complex - Issue occurred due to complex scenario.
- Reason/Invalid - Issue is invalid.
- Reason/Other - None of the above cases.
Description: Check the following segment
As I understood In the above case we should not be able access bRecord.value since bRecord can be ()
Affected Versions: slbeta2