Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Property 'sessionFactory' is required
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:540)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:725)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
at com.ffour.yixing.action.YixingUserInfoLogin.(YixingUserInfoLogin.java:22)
at com.ffour.yixing.action.YixingUserInfoLogin.main(YixingUserInfoLogin.java:49)
Caused by: java.lang.IllegalArgumentException: Property 'sessionFactory' is required
at org.springframework.orm.hibernate4.HibernateTransactionManager.afterPropertiesSet(HibernateTransactionManager.java:330)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564)
... 13 more
SSH运行时sessionFactory报错
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
5条回答 默认 最新
- 海之沐 2017-02-13 11:59关注
at com.ffour.yixing.action.YixingUserInfoLogin.(YixingUserInfoLogin.java:22)
at com.ffour.yixing.action.YixingUserInfoLogin.main(YixingUserInfoLogin.java:49)
Caused by: java.lang.IllegalArgumentException: Property 'sessionFactory' is required
这三句是重点,YixingUserInfoLogin里面的数据,然后
Error creating bean with name 'transactionManager' defined in class path resource [applicationContext.xml]
创建bean出错,看看transactionManager的class是否在applicationContext.xml写正确了本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报
悬赏问题
- ¥200 求能开发抖音自动回复卡片的软件
- ¥15 关于freesurfer使用freeview可视化的问题
- ¥100 谁能在荣耀自带系统MagicOS版本下,隐藏手机桌面图标?
- ¥15 求SC-LIWC词典!
- ¥20 有关esp8266连接阿里云
- ¥15 C# 调用Bartender打印机打印
- ¥15 我这个代码哪里有问题 acm 平台上显示错误 90%,我自己运行好像没什么问题
- ¥50 C#编程中使用printDocument类实现文字排版打印问题
- ¥15 找会编程的帅哥美女 可以用MATLAB里面的simulink编程,用Keil5编也可以。
- ¥15 已知隐函数其中一个变量τ的具体值,求另一个变量