java - Error: could not inspect JDBC autocommit mode -


i use hibernate , have 1 dao jdbc needed.

in dao use batch.

connection.setautocommit(false);             (int = 0; < callslist.size(); i++) {                 calls calls = callslist.get(i);                 stmt.setint(1, calls.getsecdur());                 /////.......                 stmt.addbatch();                 if ((i+1) % 100 == 0){                     stmt.executebatch();                     connection.commit();                 }             }             stmt.executebatch();             connection.commit(); 

and in jpa dao have error could not inspect jdbc autocommit mode

i not understand why, , how solve it, think problem because of connection.setautocommit(false); error catch in jpa dao

@override     public list<e> getall() {         list<e> list = null;         try {             criteria criteria = getsession().createcriteria(entityclass);             list = (list<e>) criteria.list();         } catch (exception ex) {             logger.log(level.finest, "exception getall message = {1}.", ex.getmessage());         }         return list;     } 


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -