also note that im using autoReconnect=true
Did you ever manage to sort this out?
I am currently using Jbpm 3.2.2, MySQL 5.027, mysql-connector-java-5.0.3, and Tomcat 5.028. That exception also occurs daily. Anyone have any ideas on what is causing it?
Below is a fragment from J/Connector manual about parameter autoReconnect :
Should the driver try to re-establish stale and/or dead connections? If enabled the driver will throw an exception for a queries issued on a stale or dead connection, which belong to the current transaction, but will attempt reconnect before the next query issued on the connection in a new transaction. The use of this feature is not recommended, because it has side effects related to session state and data consistency when applications don't handle SQLExceptions properly, and is only designed to be used when you are unable to configure your application to handle SQLExceptions resulting from dead and stale connections properly. Alternatively, investigate setting the MySQL server variable "wait_timeout" to some high value rather than the default of 8 hours.
As stated use parameter autoReconnect is a bad practice. I think you should tune value of a tag idle-timeout-minutes in your data source descriptor. A description/example of how to do that is here.
Also tags check-valid-connection-sql and new-connection-sql could be useful.
Below is an example of a data source descriptor: