Spring整合Hiberante在weblogic报错
程序员文章站
2022-06-08 08:35:22
...
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>
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>
推荐阅读
-
RabbitMQ入门:在Spring Boot 应用中整合RabbitMQ
-
Spring整合MyBatis框架时报错解决Error creating bean with name ‘xxx‘: Unsatisfied dependency expressed...
-
axis2+spring在webLogic上的发布
-
Spring整合Hiberante在weblogic报错
-
Spring整合Hiberante在weblogic报错
-
springboot整合shiro启动报错Consider renaming one of the beans or enabling overriding by setting spring.mai
-
百度编辑器UEditor部署在weblogic自定义通过FTP上传组件报错
-
spring(19)——在spring与mybatis的整合中,配置DataSourceTransactionManager实现事务管理
-
说说在 Spring Boot 中如何整合与配置 log4j2
-
SpringBoot整合升级Spring Security 报错 【The request was rejected because the URL was not normalized】