J2EE struts import data

  • Thread starter Adrien Boutreau
  • Start date
A

Adrien Boutreau

Hi,

I'm developping an application wich import a lot of data into my
database.
Todo this, there is a file which data and format like that
data1|data2|data3 etc.
I'm parsing line by line the current file and doing insert in the
database.
It works fine with few datas but after 5000 lines approximately I have
this error :

"java.sql.SQLException: Exception d'E/S: The Network Adapter could not
establish the connection"

Any ideas ?

Thanks

Sorry for my poor english :(
 
R

Richard Senior

Adrien said:
I'm parsing line by line the current file and doing insert in the
database.
It works fine with few datas but after 5000 lines approximately I have
this error :

"java.sql.SQLException: Exception d'E/S: The Network Adapter could not
establish the connection"

It's difficult to say without knowing what the database is or seeing the
code but a few wild guesses ...

a. Are you opening a new connection to the database each time and not
closing it?

b. Are you committing each row?

c. If not, and you don't have exclusive access, is there sufficient
rollback for the amount of data you are trying to commit in one go?

d. Is there anything in the trace logs or error logs for the database.

e. Is there no utility for the database that does this (probably using
direct calls and therefore quicker). For example, Oracle has SQL*Loader.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,598
Members
45,149
Latest member
Vinay Kumar Nevatia0
Top