java - NoClassDefFoundError org.springframework.orm.hibernate4.HibernateTemplate$35 -


please have , provide advice. i'm totally lost exception. happens inside of spring-orm-4.0.6.release.jar , looks classloading issue. have spring-orm-4.0.6.release.jar in web-inf\lib, , have hibernate-core-4.3.6.final.jar there, , i'm trying run app under apache tomcat/6.0.20 (yes, pretty old, project i'm trying refresh) can not understand why classloader able load hibernatetemplate, unable load hibernatetemplate$35, sitting in same dir in same jar...

java.lang.noclassdeffounderror: org.springframework.orm.hibernate4.hibernatetemplate$35         @ org.springframework.orm.hibernate4.hibernatetemplate.findbycriteria(hibernatetemplate.java:1011)         @ org.springframework.orm.hibernate4.hibernatetemplate.findbycriteria(hibernatetemplate.java:1003)         @ xxx.xxx.selectiondao.list(selectiondao.java:142) 

the code call hibernate:

  @suppresswarnings({ "unchecked", "rawtypes" })   public <entity> list<entity> list(final class<entity> entityclass) {       detachedcriteria criteria = detachedcriteria.forclass(entityclass);       return (list)gethibernatetemplate().findbycriteria(criteria);   } 

just clarify, use org.springframework.orm.hibernate4.hibernatetemplate

maybe make sence, found out code invoked

private void startsessionclean() {     timertask task = new timertask() {         public void run() {             try {                   dao.list(usersessions.class);             } catch (throwable throwable) {                 throwable.printstacktrace();                         log.error("error in session cleaner", throwable);             }         }     };     timer.scheduleatfixedrate(task, delay, delay); } 

so guessing might somehow linked different thread classloader? ideas?

check out javadoc of hibernatetemplate, try convert new style sessionfactory.getcurrentsession()


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -