org.springframework.orm.hibernate3.HibernateQueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from tw.com.synnex.competency.model.Duration where mtype = ? and ? between sdate and edate]; nested exception is org.hibernate.QueryException: ClassNotFoundException: org.hibernate.hql.ast.HqlToken [from tw.com.synnex.competency.model.Duration where mtype = ? and ? between sdate and edate]
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:640)
at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:377)
at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)
at tw.com.synnex.competency.dao.hibernate.DurationDAOHibernate.between(DurationDAOHibernate.java:30)
Truncated. see log file for complete stacktrace
这个问题如何解决呢,我没有在spring整合hibernate的xml里面配置hibernate,我是Hibernate单独有配置文件,然后在spring配置文件里面引用
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="configLocation" value= "classpath:config/hibernate.cfg.xml" />
</bean>
Hibernate中这样配置
<property name="show_sql">false</property>
<!--
<property name="hbm2ddl.auto">update</property>
-->
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.cache.use_query_cache">true</property>
分享到:
相关推荐
疯狂Ajax讲义2+Spring+hiberante
疯狂Ajax讲义3+Spring+hiberante
疯狂Ajax讲义5+Spring+hiberante
疯狂Ajax讲义4+Spring+hiberante
Strust2.0+Spring+hiberante小例子,整合.
本Demo采用Struts2.1.8+Spring2.5.6(Annotation注解)+Hiberante3.3.2(Annotation注解)+ExtJS(Struts2-json)
spring4+hiberante4+struts2+maven最新框架
源码+数据库+jsp页面+html页面设计 初学者
spring整合
struts2.0 +spring2.0+hiberante3所需jar包
spring,Struts,Hiberante整合的小例子,源代码,没有开发包(因为太大了)
Struts2 Spring Hiberante IBatis jar (1) 与上面上传的资源是同一的 jar的第一部分
Struts2 Spring Hiberante IBatis jar (2) 与上面上传的资源是同一的 jar的第一部分
面向抽象编程 Jdom的基本使用 IOC(DI)配置及应用 模拟Spring功能 搭建sping的运行环境 annotation方式Spring Spring整合Hiberante3 Spring整合-SSH DTO、VO SSH整合的jar包 SSH整合存在的问题
开发工具:MyEclipse 6....Struts+Spring+Hiberante框架整合的简单登录系统 无需配置任何文件、只需在mysql中创建一个空数据库 如:create database test; 注:mysql数据库用户名:root 密码:root
使用MAVEN 结合SPRING DWR hiberante validation
第十课 Spring整合Hiberante3 30 一、 Spring配置hibernate3的SessionFactory 30 (一) xml形式的SessionFactory 30 (二) annotation注解方式的SessionFactory 30 二、 引入hibernate所需要使用的jar 31 (一) 基本jar...
Struts2+hiberante+Spring+Extjs+OA办公系统,完整包正常运行
第十课 Spring整合Hiberante3 30 一、 Spring配置hibernate3的SessionFactory 30 (一) xml形式的SessionFactory 30 (二) annotation注解方式的SessionFactory 30 二、 引入hibernate所需要使用的jar 31 (一) 基本jar...