-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: JDBCExceptionReporter - Network Adapter
PostPosted: Wed Apr 23, 2008 11:06 am 
Newbie

Joined: Thu Mar 27, 2008 8:44 am
Posts: 8
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.