In one of my Railo application, I
found a blocker issue in one module, there I wrote the functionality to add,
edit and delete bill items. The issue I
were faced is edit/delete operation is not working as expected. For figuring out the issue I verified the
application as well as exception logs. The log says that JDBC commit failed.
I’m using MySQL 5.6 as the database
management system.
After a small research I get to
know that, if we set ‘relaxAutoCommit’ attribute is true in the connection string will help to resolve this issue.
Before I used MySQL as the driver type
(in Railo Administrator) to create the data source. To resolve the error I used
Other
– JDBC Driver as the type instead of MY SQL.
Below is the step wise action that
I did to resolve JDBC Commit Failed Issue.
Step1 : I deleted my existing data source from
Railo Administrator .
Step2 : created new data source
with old name
Step3: instead of mySql as a type,
select Other-JDBC Driver as a
type.
Step 4: fill all the necessary
fields.
Step 5: Set class as com.mysql.jdbc.Driver
Step 6: Set DSN as
jdbc:mysql://127.0.0.1:3306/ebms?autoReconnect=true&characterEncoding=UTF-8&useUnicode=true&allowMultiQueries=true&useOldAliasMetadataBehavior=true&tinyInt1isBit=false&jdbcCompliantTruncation=true&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true&relaxAutoCommit=true
Step 7 : update
After making this change I didn't see JDBC commit failed error in my application.
Wow!!!! this is so helpful
ReplyDeleteThis comment has been removed by the author.
ReplyDelete