We recently had a customer who was reporting that Mura would randomly throw a 500 error with the following exception:
could not inspect JDBC autocommit mode exceptions
Findings and Resolution
Upon further investigation, we discovered that the cause of this error was related to the built-in Hibernate/ORM services that come bundled with Mura. The Hibernate/ORM services were attempting to establish a connection to the customer’s DSN via a “pooled statement” that had already timed out. When the Hibernate/ORM services would attempt this connection the above exception would be thrown on their website.
After obtaining a better understanding of their issues we were able to implement a “Connection Validation Query” within their ColdFusion DSN to resolve this issue. This implementation would perform a validation query each time the DSN is requested and if the connection failed a new database connection would be requested from within ColdFusion. This allows there to be a connection at all times between the ColdFusion DSN and the Database server.
To implement the connection validation query you can follow the steps below:
- Log in to the ColdFusion Administrator.
- Go to the ColdFusion Datasources section and edit the datasource you believe is experiencing this issue.
- Click the ‘Advanced Settings’. Here you will see a “Validate Connection” checkbox that you can enable.
- Enter a validation query in the “Validation Query” text box. For example: “SELECT 1”.
Please note: The connection validation query should be short and simple. If you’re running a query that is actually pulling information from the database it could impact performance significantly. , In this case, we were able to utilize the query “SELECT 1” for the validation query. This query doesn’t actually return any results.
If you have any issues implementing the above changes please feel free to contact our support team and we’ll be happy to help you get this implemented.