spring batch insert into oracle database issue
I have a spring batch example where I read from a Flat file and write into Oracle database. when I create the oracle table the first time using Oracle developer , the example work perfect , but when I delete all the records and run the spring batch example the application stay in running mode (stop at the point wher insert in table) and not finish until I manually (using oracle SQL Developer ) add a record in the table , so it s continue running and complete perfectly . Is that have a problem with the table that I'm using in oracle (I m not an expert in oracle database).
any help or suggestion please?
oracle spring-batch
|
show 2 more comments
I have a spring batch example where I read from a Flat file and write into Oracle database. when I create the oracle table the first time using Oracle developer , the example work perfect , but when I delete all the records and run the spring batch example the application stay in running mode (stop at the point wher insert in table) and not finish until I manually (using oracle SQL Developer ) add a record in the table , so it s continue running and complete perfectly . Is that have a problem with the table that I'm using in oracle (I m not an expert in oracle database).
any help or suggestion please?
oracle spring-batch
if you have a question . I can answer or if you need more details .
– Omar B.
Nov 15 '18 at 14:46
yes please, what do you mean by "until I manually add a record in the table"? Are you sure the previous run has finished? Probably there is a lock on the table preventing the second run to insert records? I can't see what could go wrong with the description you gave.
– Mahmoud Ben Hassine
Nov 15 '18 at 14:51
sorry to be unclear , I used Oracle Sql Developer to add a record . yes I m sure that the first run finished . and more if I add manually using Oracl Sql developer a record in the table and after that run the spring batch example it s works fine.
– Omar B.
Nov 15 '18 at 15:00
1
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed or rolled back. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit your changes by adding a record to the table. Try adding a commit point at the end of your application process to test.
– cdb_dba
Nov 15 '18 at 15:10
@cdb_dba :thank you for your reply , I think (correct me please if I m wrong) spring batch commit changes because I have the commit-interval=20 in the job definition . In a n other scenario if I run the spring batch application after I added a record in the table , so it run correctly , and I DELETE all the records but LEAVE only the field that I added and run spring batch application again it will work fine .
– Omar B.
Nov 15 '18 at 15:56
|
show 2 more comments
I have a spring batch example where I read from a Flat file and write into Oracle database. when I create the oracle table the first time using Oracle developer , the example work perfect , but when I delete all the records and run the spring batch example the application stay in running mode (stop at the point wher insert in table) and not finish until I manually (using oracle SQL Developer ) add a record in the table , so it s continue running and complete perfectly . Is that have a problem with the table that I'm using in oracle (I m not an expert in oracle database).
any help or suggestion please?
oracle spring-batch
I have a spring batch example where I read from a Flat file and write into Oracle database. when I create the oracle table the first time using Oracle developer , the example work perfect , but when I delete all the records and run the spring batch example the application stay in running mode (stop at the point wher insert in table) and not finish until I manually (using oracle SQL Developer ) add a record in the table , so it s continue running and complete perfectly . Is that have a problem with the table that I'm using in oracle (I m not an expert in oracle database).
any help or suggestion please?
oracle spring-batch
oracle spring-batch
edited Nov 15 '18 at 14:57
Omar B.
asked Nov 15 '18 at 14:35
Omar B.Omar B.
11811
11811
if you have a question . I can answer or if you need more details .
– Omar B.
Nov 15 '18 at 14:46
yes please, what do you mean by "until I manually add a record in the table"? Are you sure the previous run has finished? Probably there is a lock on the table preventing the second run to insert records? I can't see what could go wrong with the description you gave.
– Mahmoud Ben Hassine
Nov 15 '18 at 14:51
sorry to be unclear , I used Oracle Sql Developer to add a record . yes I m sure that the first run finished . and more if I add manually using Oracl Sql developer a record in the table and after that run the spring batch example it s works fine.
– Omar B.
Nov 15 '18 at 15:00
1
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed or rolled back. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit your changes by adding a record to the table. Try adding a commit point at the end of your application process to test.
– cdb_dba
Nov 15 '18 at 15:10
@cdb_dba :thank you for your reply , I think (correct me please if I m wrong) spring batch commit changes because I have the commit-interval=20 in the job definition . In a n other scenario if I run the spring batch application after I added a record in the table , so it run correctly , and I DELETE all the records but LEAVE only the field that I added and run spring batch application again it will work fine .
– Omar B.
Nov 15 '18 at 15:56
|
show 2 more comments
if you have a question . I can answer or if you need more details .
– Omar B.
Nov 15 '18 at 14:46
yes please, what do you mean by "until I manually add a record in the table"? Are you sure the previous run has finished? Probably there is a lock on the table preventing the second run to insert records? I can't see what could go wrong with the description you gave.
– Mahmoud Ben Hassine
Nov 15 '18 at 14:51
sorry to be unclear , I used Oracle Sql Developer to add a record . yes I m sure that the first run finished . and more if I add manually using Oracl Sql developer a record in the table and after that run the spring batch example it s works fine.
– Omar B.
Nov 15 '18 at 15:00
1
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed or rolled back. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit your changes by adding a record to the table. Try adding a commit point at the end of your application process to test.
– cdb_dba
Nov 15 '18 at 15:10
@cdb_dba :thank you for your reply , I think (correct me please if I m wrong) spring batch commit changes because I have the commit-interval=20 in the job definition . In a n other scenario if I run the spring batch application after I added a record in the table , so it run correctly , and I DELETE all the records but LEAVE only the field that I added and run spring batch application again it will work fine .
– Omar B.
Nov 15 '18 at 15:56
if you have a question . I can answer or if you need more details .
– Omar B.
Nov 15 '18 at 14:46
if you have a question . I can answer or if you need more details .
– Omar B.
Nov 15 '18 at 14:46
yes please, what do you mean by "until I manually add a record in the table"? Are you sure the previous run has finished? Probably there is a lock on the table preventing the second run to insert records? I can't see what could go wrong with the description you gave.
– Mahmoud Ben Hassine
Nov 15 '18 at 14:51
yes please, what do you mean by "until I manually add a record in the table"? Are you sure the previous run has finished? Probably there is a lock on the table preventing the second run to insert records? I can't see what could go wrong with the description you gave.
– Mahmoud Ben Hassine
Nov 15 '18 at 14:51
sorry to be unclear , I used Oracle Sql Developer to add a record . yes I m sure that the first run finished . and more if I add manually using Oracl Sql developer a record in the table and after that run the spring batch example it s works fine.
– Omar B.
Nov 15 '18 at 15:00
sorry to be unclear , I used Oracle Sql Developer to add a record . yes I m sure that the first run finished . and more if I add manually using Oracl Sql developer a record in the table and after that run the spring batch example it s works fine.
– Omar B.
Nov 15 '18 at 15:00
1
1
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed or rolled back. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit your changes by adding a record to the table. Try adding a commit point at the end of your application process to test.
– cdb_dba
Nov 15 '18 at 15:10
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed or rolled back. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit your changes by adding a record to the table. Try adding a commit point at the end of your application process to test.
– cdb_dba
Nov 15 '18 at 15:10
@cdb_dba :thank you for your reply , I think (correct me please if I m wrong) spring batch commit changes because I have the commit-interval=20 in the job definition . In a n other scenario if I run the spring batch application after I added a record in the table , so it run correctly , and I DELETE all the records but LEAVE only the field that I added and run spring batch application again it will work fine .
– Omar B.
Nov 15 '18 at 15:56
@cdb_dba :thank you for your reply , I think (correct me please if I m wrong) spring batch commit changes because I have the commit-interval=20 in the job definition . In a n other scenario if I run the spring batch application after I added a record in the table , so it run correctly , and I DELETE all the records but LEAVE only the field that I added and run spring batch application again it will work fine .
– Omar B.
Nov 15 '18 at 15:56
|
show 2 more comments
1 Answer
1
active
oldest
votes
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed
or rolled back
. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit
your changes by adding a record to the table. Try adding a commit
point at the end of your application process to test.
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321786%2fspring-batch-insert-into-oracle-database-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed
or rolled back
. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit
your changes by adding a record to the table. Try adding a commit
point at the end of your application process to test.
add a comment |
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed
or rolled back
. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit
your changes by adding a record to the table. Try adding a commit
point at the end of your application process to test.
add a comment |
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed
or rolled back
. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit
your changes by adding a record to the table. Try adding a commit
point at the end of your application process to test.
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed
or rolled back
. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit
your changes by adding a record to the table. Try adding a commit
point at the end of your application process to test.
answered Nov 20 '18 at 15:19
cdb_dbacdb_dba
457715
457715
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53321786%2fspring-batch-insert-into-oracle-database-issue%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
if you have a question . I can answer or if you need more details .
– Omar B.
Nov 15 '18 at 14:46
yes please, what do you mean by "until I manually add a record in the table"? Are you sure the previous run has finished? Probably there is a lock on the table preventing the second run to insert records? I can't see what could go wrong with the description you gave.
– Mahmoud Ben Hassine
Nov 15 '18 at 14:51
sorry to be unclear , I used Oracle Sql Developer to add a record . yes I m sure that the first run finished . and more if I add manually using Oracl Sql developer a record in the table and after that run the spring batch example it s works fine.
– Omar B.
Nov 15 '18 at 15:00
1
When you run the spring batch from the application, are you committing your changes? When you are doing large batch operations in Oracle, the database will place a lock on the table until the transaction is either committed or rolled back. If you are not doing that when you run your batch from within the application, my guess is that whatever you're doing from the application side is placing a lock on the table, and said lock is not removed until you manually commit your changes by adding a record to the table. Try adding a commit point at the end of your application process to test.
– cdb_dba
Nov 15 '18 at 15:10
@cdb_dba :thank you for your reply , I think (correct me please if I m wrong) spring batch commit changes because I have the commit-interval=20 in the job definition . In a n other scenario if I run the spring batch application after I added a record in the table , so it run correctly , and I DELETE all the records but LEAVE only the field that I added and run spring batch application again it will work fine .
– Omar B.
Nov 15 '18 at 15:56