
Error creating
bean with name 'sessionFactory' defined in class path resource [applicationContext1.xml]: Invocation of init method failed;
nested exception is javax
意思是:
在类路径资源applicationContext1中定义的“sessionFactory”创建bean错误。
xml:init方法的调用失败;嵌套异常是javax.xml.stream。com.bea.xml.stream FactoryConfigurationError:提供者。
EventFactory未找到.xml.stream.FactoryConfigurationError: Provider com.bea.xml.stream.EventFactory not found
解决方法:
将Hibernate文件写在外面,在Spring 引入 Hibernate的xml文件
hibernate的xml文件

Spring的xml文件

本文解决在Spring框架中使用Hibernate时,遇到的SessionFactory创建bean错误问题。详细解释了错误信息含义,指出在applicationContext1.xml中定义的SessionFactory初始化失败,与javax.xml.stream.FactoryConfigurationError有关。并提供了将Hibernate配置分离到独立XML文件中的解决方案。
837

被折叠的 条评论
为什么被折叠?



