问答详情
源自:1-3 实体和映射的创建

敲完后运行的错误

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.boot.InvalidMappingException: Could not parse mapping document: null (INPUT_STREAM)

这是什么问题啊

提问者:牛衣古柳卖黄瓜 2018-03-04 21:47

个回答

  • qq_絵空事_1
    2018-03-05 17:46:33

    sessionFactory的bean创建错误,无法解析映射文档。看看是不是class里面的内容写错了?

    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">