java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException
2021-07-16 13:06
标签:dac 问题 known cut dex jar out ... lin java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException 标签:dac 问题 known cut dex jar out ... lin 原文地址:https://www.cnblogs.com/lihuibin/p/9534257.html在做ssh整合的时候报错:
java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:644)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:414)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:415)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:378)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:974)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:964)
cn.xyp.web.dao.NewsDAOImpl.findAll(NewsDAOImpl.java:110)
cn.xyp.web.service.NewsServiceImpl.findAll(NewsServiceImpl.java:86)
cn.xyp.web.action.HomeAction.execute(HomeAction.java:45)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
ognl.OgnlRuntime.invokeMethod(OgnlRuntime.java:897)....java.lang.ClassNotFoundException: org.hibernate.QueryTimeoutException
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1928)
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1771)
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:644)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:414)
org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:415)
org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:378)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:974)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:964)
cn.xyp.web.dao.NewsDAOImpl.findAll(NewsDAOImpl.java:110)
cn.xyp.web.service.NewsServiceImpl.findAll(NewsServiceImpl.java:86)
cn.xyp.web.action.HomeAction.execute(HomeAction.java:45)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)....
由错误信息可以猜到,是缺少了jar文件所导致的,hibernate-commons-annotations-3.3.0.jar这个包,该包可以在这里下载http://mvnrepository.com/artifact/org.hibernate/hibernate-commons-annotations/3.3.0.ga
最后将下载好的包导入到lib目录,然后重新运行问题解决
文章标题:java.lang.NoClassDefFoundError: org/hibernate/QueryTimeoutException
文章链接:http://soscw.com/index.php/essay/106012.html