Spring Batch 5 with MySQL Replication #4638
-
I am using Spring Batch-5 and I see the MYSQL for BATCH5_JOB_EXECUTION_PARAMS doesn't have the primary key defined. During runtime, I face the exception Exception Occurred when Loading Mdynamics Configuration -> org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL
]; SQL state [HY000]; error code [3098]; The table does not comply with the requirements by an external plugin. Is any way to overcome this ? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
I am curious to know more about this external plugin. Can you share its name? The table does not have a primary key because records represent value objects. But this does not prevent you from defining a primary key, and should not impact the framework's internals in any way. Have you tried that? |
Beta Was this translation helpful? Give feedback.
-
Hi, Mahmoud
Came across the below,
https://dev.mysql.com/doc/refman/8.4/en/group-replication-requirements.html#:~:text=Every%20table%20that%20is%20to,a%20non%2Dnull%20unique%20key<https://dev.mysql.com/doc/refman/8.4/en/group-replication-requirements.html#:~:text=Every%20table%20that%20is%20to,a%20non-null%20unique%20key>.
***@***.***
As per the MySQL docs, all the table must have primary key.
We can create primary key for the table, but was wondering how the table doesn't cater for such requirement.
Thanks,
Valliappan. S
From: Mahmoud Ben Hassine ***@***.***>
Sent: Wednesday, September 11, 2024 5:05 PM
To: spring-projects/spring-batch ***@***.***>
Cc: Valliappan Samynathan ***@***.***>; Author ***@***.***>
Subject: Re: [spring-projects/spring-batch] Spring Batch 5 with MySQL Replication (Discussion #4638)
You don't often get email from ***@***.******@***.***>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
The table does not comply with the requirements by an external plugin.
I am curious to know more about this external plugin. Can you share its name?
The table does not have a primary key because records represent value objects. But this does not prevent you from defining a primary key, and should not impact the framework's internals in any way. Have you tried that?
-
Reply to this email directly, view it on GitHub<#4638 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AKLNQ3RZGWP2WI5IJUL6PWTZWABSHAVCNFSM6AAAAABLALQOHKVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANRRGE3TINQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
Beta Was this translation helpful? Give feedback.
Thank you for the link! Indeed, it is a best practice to define a primary key.
As mentioned above, that table does not define a primary key because records represent value objects. But you can define one when you use MySQL replication.