sessionFactory or hibernateTemplate is required错误
来源:互联网 发布:linux下安装多个jdk 编辑:程序博客网 时间:2024/04/30 14:23
启动TOMCAT服务器时就老是报错.
.........
java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required
原因及解决:
xxServiceImpl extends HibernateDaoSupport .改正后运行正常,
(应该是xxDaoImpl extends HibernateDaoSupport)
xxServiceImpl 不用继承HibernateDaoSupport
<aop:config>
<aop:advisor
pointcut="execution(* cn.gzydt..*.service.*.*(..)) or execution(* cn.gzydt.common.hbmdao.*.*(..))"
advice-ref="txAdvice" />
</aop:config>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="save" rollback-for="Exception"/>
<tx:method name="delete" rollback-for="Exception"/>
<tx:method name="update" rollback-for="Exception"/>
<tx:method name="save*" rollback-for="Exception"/>
<tx:method name="add*" rollback-for="Exception"/>
<tx:method name="update*" rollback-for="Exception"/>
<tx:method name="modify*" rollback-for="Exception"/>
<tx:method name="delete*" rollback-for="Exception"/>
<tx:method name="start*" rollback-for="Exception"/>
<tx:method name="stop*" rollback-for="Exception"/>
<tx:method name="assign*" rollback-for="Exception"/>
<tx:method name="*N" propagation="NEVER"/>
<tx:method name="*" />
</tx:attributes>
</tx:advice>
<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref bean="cipSessionFactory" />
</property>
</bean>
还要记得配上那一段
- sessionFactory or hibernateTemplate is required错误
- sessionFactory or hibernateTemplate is required错误
- SSH错误'sessionFactory' or 'hibernateTemplate' is required
- 'sessionFactory' or 'hibernateTemplate' is required
- 'sessionFactory' or 'hibernateTemplate' is required
- 'sessionFactory' or 'hibernateTemplate' is required
- 'sessionFactory' or 'hibernateTemplate' is required
- 'sessionFactory' or 'hibernateTemplate' is required
- 'sessionFactory' or 'hibernateTemplate' is required
- java.lang.IllegalArgumentException: sessionFactory or hibernateTemplate is required 错误解决方法
- 今天出现这个错误:'sessionFactory' or 'hibernateTemplate' is required
- “sessionFactory " or "hibernateTemplate " is required异常
- SessionFactory or HibernateTemplate is required 的解决办法
- 'sessionFactory' or 'hibernateTemplate' is required(spring+hibernate)
- Spring 注解开发 dao层错误 'sessionFactory' or 'hibernateTemplate' is required 解决
- SSH整合,"sessionFactory " or "hibernateTemplate " is required异常
- SSH整合时sessionFactory or hibernateTemplate is required异常
- SSH整合,"sessionFactory " or "hibernateTemplate " is required异常
- 【C2】对话框【S1】Subclassing QDialog
- 新
- 第一篇
- java连接MySql数据库
- 1
- sessionFactory or hibernateTemplate is required错误
- 4-6
- 学生大本营 谁来谁能赢
- 大赛魂牵梦萦地
- 安装SQL SERVER 2005
- 什么是Web Service?
- 写了一天的文档,好累!!
- 三层交换机间的互联
- 设计模式--抽象工厂