Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLRecoverableException: Closed Connection

Plamen PetrovOct 18 2023

I use SQLcl 23.x to run .sql scripts and commands via JS script.

I see intermittent errors java.sql.SQLRecoverableException: Closed Connection, unrelated to what script or command I am running. This is most likely due to firewall/network instabilities, but is there a setting, like timeout, which can make this less frequent? or an easy way to recover and re-run the last command?

My JS code is something like this:

sqlcl.setStmt("<command or script>");
sqlcl.run();
if (ctx.getProperty("sqldev.error")) {
    throw new Error(ctx.getProperty("sqldev.last.err.message"));
}

Best regards,

Plamen

Comments
Post Details
Added on Oct 18 2023
2 comments
2,456 views