Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/-问答-阿里云开发者社区-阿里云

开发者社区> 问答> 正文
阿里云
为了无法计算的价值
打开APP
阿里云APP内打开

Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/

2016-06-02 11:36:48 4088 1

限时折扣】真正免费.com.xin域名0元抢>>> »

 
SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sharedStockDAOImpl' defined in file [F:\bdworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps\badou-erp20152281\WEB-INF\classes\com\shengdai\brms\bfe\dao\impl\SharedStockDAOImpl.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/persistence-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Mapping directory location [URL [file:src/main/webapp/WEB-INF/hibernate]] does not denote a directory
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:609)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:469)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:383)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:283)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:111)
    at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/spring/persistence-context.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Mapping directory location [URL [file:src/main/webapp/WEB-INF/hibernate]] does not denote a directory
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1455)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:294)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:225)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:291)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByName(AbstractAutowireCapableBeanFactory.java:1136)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
    ... 21 more

这个问题是在测试模式下出现的,项目并没有出现这个问题

取消 提交回答
全部回答(1)
  • 段嗣国
    2022-11-22 14:37:17

    感觉像是配置有问题,把配置文件发出来看看。

    0 0
相关问答

0

回答

请问下两张表不想通过join关联,想要通过insert into select命令插入到hologr

2022-08-15 14:11:59 123浏览量 回答数 0

1

回答

【OSS】报错Invalid Response或Implementation of JAXB-API

2022-01-19 16:49:08 1629浏览量 回答数 1

1

回答

SQL-can we avoid duplicating records in a query?

2021-10-16 14:53:34 419浏览量 回答数 1

2

回答

delete a database in PostgreSQL?

2021-10-16 15:06:04 244浏览量 回答数 2

1

回答

creating a database in PostgreSQL?

2021-10-16 15:03:19 394浏览量 回答数 1

1

回答

运行报错Error creating bean with name 'shiro?400报错

2020-06-08 14:05:47 429浏览量 回答数 1

1

回答

tomcat启动报错Error creating bean with name ?报错

2020-06-09 15:55:40 775浏览量 回答数 1

1

回答

#支付宝 ACQ.AUTH_TOKEN_IS_NOT_EXIST(支付失败,建议顾客使用其他方式付款

2020-05-07 10:54:00 2409浏览量 回答数 1

1

回答

select '.' rlike '([^\x00-\xff])' 返回true,可是我在其他正则表达式验证中却是false,这个为什么?

2018-12-28 10:40:05 2486浏览量 回答数 1

1

回答

php 设置error_reporting(0)和ini_set('display_errors', 0)之后,还是错误 ,为什么?

2016-06-17 18:10:14 5552浏览量 回答数 1
+关注
文章
问答
问答排行榜
最热
最新
相关电子书
更多
In-Flux Limiting for a Multi-Tenant Logging Service
立即下载
低代码开发师(初级)实战教程
立即下载
阿里巴巴DevOps 最佳实践手册
立即下载