Hello,
I've got a problem with Hibernate 3.
I work on a user management application with an oracle 9i database.
Everything is fine with the connection with the database because i can create update or delete data.
My problem is when i want to import users form a csv file.
When i import 1000 users everything works fine.
but when i want to import 2000 users i've got this exception :
Code:
"2008-04-23 16:29:45,515 [http-8080-Processor25] ERROR org.hibernate.util.JDBCExceptionReporter - Exception d'E/S: The Network Adapter could not establish the connection
Here is the code of my Import class :
Code:
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest)request;
MultipartFile file = multipartRequest.getFile("file");
br = new BufferedReader(new InputStreamReader(file.getInputStream()));
while((ligne=br.readLine()) != null) {
WebVisitor webVisitor = new WebVisitor();
WebVisitorSite webVisitorSite = new WebVisitorSite();
String[] splitted = ligne.split("\\;");
webVisitor.setTitle(splitted[1]);
webVisitor.setLastname(splitted[2]);
webVisitor.setLastname2(splitted[3]);
webVisitor.setFirstname(splitted[4]);
webVisitor.setEmail(splitted[5]);
webVisitorDao.saveWebVisitor(webVisitor);}
And here the code of the saveWebVisitor method
Code:
public boolean saveWebVisitor(WebVisitor webVisitor) {
Session session = getHibernateTemplate().getSessionFactory().openSession();
try{
Transaction tx = session.beginTransaction();
session.saveOrUpdate(webVisitor);
tx.commit();
return true;
}
catch( Exception e ) {
if (log.isDebugEnabled())
log.debug("[saveWebVisitor] "+e);
log.error("[saveWebVisitor] "+e.getMessage());
}
finally{
session.close();
}
return false;
}
Has someone already have this problem ?
Can someone help me ?
Thanks.
Audrey