为了账号安全,请及时绑定邮箱和手机立即绑定

我按照老师的配置一步一步来,一运行服务器就出现这个异常怎么解决啊

我按照老师的配置一步一步来,一运行服务器就出现这个异常怎么解决啊

你已走远 2016-11-20 00:32:16
严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: <property> element for property 'hibernateProperties' must specify a ref or value java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170) at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1009) at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:961) at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:581) at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:116) at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:4775) at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5385) at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
查看完整描述

3 回答

?
大咪

TA贡献785条经验 获得超332个赞

说的是你这个property里的元素hibernateProperties必须是一个引用或者是一个值……你自己在查查有没有哪里拼错了
查看完整回答
1 反对 回复 2016-11-20
  • 你已走远
    你已走远
    谢谢啊,已经找到错误了,但是为什么我走到最后一步运行服务器,添加商品时 商品的pid为空,有点无解, <hibernate-mapping> <class name="org.muke.ssh.entity.Product" table="product"> <id name="pid" column="pid"> <generator class="native"/> </id> <property name="pname" column="pname" length="20"/> <property name="price" column="price"/> </class> </hibernate-mapping>
  • 慕桂英6674691
    慕桂英6674691
    你把错误说出来啊
  • 慕桂英6674691
    慕桂英6674691
    解决方法
点击展开后面1
?
玄鉴

TA贡献16条经验 获得超4个赞

 BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext


这个怎么解决的?

查看完整回答
反对 回复 2016-11-21
?
YOUL0

TA贡献2条经验 获得超0个赞

好复杂,看不懂~~

查看完整回答
反对 回复 2016-11-20
  • 3 回答
  • 0 关注
  • 2225 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信