We have Worklight Mobile Foundation Enterprise Edition Server 5.0.5 setup on WebSphere Application Server 8.5 as a production environment. There are a number of SQL adapters that connect to a MySQL database. We have noticed that after a few hours of inactivity, when the mobile client app tries to retrieve content from these adapters, we usually encounter the below error at the first attempt and the client receives an error message 'java.sql.SQLException: Already closed'. However, subsequent requests to these adapters work fine. Note that our MySQL DB server is running the entire time. Please advise.
DataAccessSer E com.worklight.integration.services.impl.DataAccessServiceImpl callProcedure FWLSE0035E: Invocation of procedure
java.lang.RuntimeException: java.sql.SQLException: Already closed.
Caused by: java.sql.SQLException: Already closed.
... 8 more
This topic has been locked.
Pinned topic SQL closed connection error
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
ShmulikB 270005FKGM20 Posts
Re: SQL closed connection error2013-02-05T09:58:10ZThis is the accepted answer. This is the accepted answer.Can you please provide us more information?
MySQL JDBC driver version,
any special configuration done to the mysql server in regards to timeouts.
Re: SQL closed connection error2013-02-07T16:52:30ZThis is the accepted answer. This is the accepted answer.
- ShmulikB 270005FKGM
However, I was looking for a possible setting at the worklight server end, which can refresh/recycle these connections, without having to keep the database server connection timeout as a high value. For the time being, I have not created a data source in the worklight.properties file. The SQL connection parameters are directly specified in the WL adapter XML file.
MySQL driver - mysql-connector-java-5.1.22.jar
Re: SQL closed connection error2013-02-08T00:03:53ZThis is the accepted answer. This is the accepted answer.Note: IBM forums are in the process of migrating to a new format. During migration the forums will be frozen and in read-only mode. If you wish to continue this thread discussion please post it on stackoverflow, where the Worklight team and others can respond.
See the Forum Migration announce post for more details. Thank you.
Barbara Hampson, Manager, IBM Worklight