Invalid state, the Connection object is closed.

Highlighted
Six Stars

Invalid state, the Connection object is closed.

I have a simple Job, which reads information from a csv (40 columns) and tries to send it to an Azure SQL database.

But I get always the message : "Invalid state, the Connection object is closed."

 

I already tried to remove some columns, and then sometimes it works and sometimes it doesn't work. I don't have any clue anymore where I need to look for the solution. Has anyone some ways to troubleshoot this further.Talend.png

Highlighted
Employee

Re: Invalid state, the Connection object is closed.

Hi Somersst,

 

“Invalid State, the connection object is closed” – this issue occurs due to database connections being closed. It can happen because of the connection timeout between servers or database unavailable(might be restarted or down).

 

There is also a community posting on this :

https://community.talend.com/t5/Design-and-Development/resolved-Errors-when-loading-large-data-sets-...

 

Thanks,

RekhaSree

Highlighted
Moderator

Re: Invalid state, the Connection object is closed.

Hello,

Have you tried to reduce batch size in the Advanced settings of the component(Batch size as 50 or 100) to see if it works?

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Employee

Re: Invalid state, the Connection object is closed.

I have faced this issue and found a solution. Use the microsoft driver instead of the jtds driver for large inserts.

Let us know if it works for you.

Thomas

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog