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

这是什么情况?求解决啊

WARN com.mchange.v2.c3p0.management.ActiveManagementCoordinator:56 - A C3P0Registry mbean is already registered. This probably means that an application using c3p0 was undeployed, but not all PooledDataSources were closed prior to undeployment. This may lead to resource leaks over time. Please take care to close all PooledDataSources.

16:07:54,489 ERROR org.springframework.web.context.ContextLoader:331 - Context initialization failed

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 java.io.FileNotFoundException: class path resource [com/muke/Department/domain.hbm.xml] cannot be opened because it does not exist

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:589)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4739)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: java.io.FileNotFoundException: class path resource [com/muke/Department/domain.hbm.xml] cannot be opened because it does not exist

at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:618)

at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:189)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)

... 36 more

三月 15, 2017 4:07:54 下午 org.apache.catalina.core.StandardContext listenerStart

严重: 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 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.io.FileNotFoundException: class path resource [com/muke/Department/domain.hbm.xml] cannot be opened because it does not exist

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)

at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:589)

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)

at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)

at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)

at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)

at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4236)

at org.apache.catalina.core.StandardContext.start(StandardContext.java:4739)

at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:803)

at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:780)

at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:583)

at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1080)

at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:1003)

at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:507)

at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)

at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:325)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:142)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1069)

at org.apache.catalina.core.StandardHost.start(StandardHost.java:822)

at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1061)

at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)

at org.apache.catalina.core.StandardService.start(StandardService.java:525)

at org.apache.catalina.core.StandardServer.start(StandardServer.java:759)

at org.apache.catalina.startup.Catalina.start(Catalina.java:595)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)

at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)

Caused by: java.io.FileNotFoundException: class path resource [com/muke/Department/domain.hbm.xml] cannot be opened because it does not exist

at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)

at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:618)

at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:189)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483)

... 36 more


三月 15, 2017 4:07:54 下午 org.apache.catalina.core.StandardContext start

严重: Error listenerStart

三月 15, 2017 4:07:54 下午 org.apache.catalina.core.StandardContext start

严重: Context [/ssh_employee] startup failed due to previous errors

三月 15, 2017 4:07:54 下午 org.apache.catalina.core.ApplicationContext log

信息: Closing Spring root WebApplicationContext

三月 15, 2017 4:07:54 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory Struts2

三月 15, 2017 4:07:55 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-default.xml]

三月 15, 2017 4:07:55 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-plugin.xml]

三月 15, 2017 4:07:55 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts.xml]

三月 15, 2017 4:07:55 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory struts_authIntercepter

三月 15, 2017 4:07:55 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-default.xml]

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-plugin.xml]

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts.xml]

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Overriding property struts.i18n.reload - old value: false new value: true

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Overriding property struts.configuration.xml.reload - old value: false new value: true

三月 15, 2017 4:07:56 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory Struts_timeInterceptor

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-default.xml]

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts-plugin.xml]

三月 15, 2017 4:07:56 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger info

信息: Parsing configuration file [struts.xml]

三月 15, 2017 4:07:57 下午 org.apache.catalina.startup.HostConfig deployDirectory

信息: Deploying web application directory TestReport

三月 15, 2017 4:07:57 下午 org.apache.coyote.http11.Http11AprProtocol start

信息: Starting Coyote HTTP/1.1 on http-8080

三月 15, 2017 4:07:57 下午 org.apache.coyote.ajp.AjpAprProtocol start

信息: Starting Coyote AJP/1.3 on ajp-8009

三月 15, 2017 4:07:57 下午 org.apache.catalina.startup.Catalina start

信息: Server startup in 17091 ms


正在回答

4 回答

第一段倒数第十行 : Caused by: java.io.FileNotFoundException: class path resource [com/muke/Department/domain.hbm.xml] cannot be opened because it does not exist

可能是sessionFactory找不到com/muke/Department/路径下domain.hbm.xml文件

0 回复 有任何疑惑可以回复我~
#1

qq_柒分醉_03927370 提问者

非常感谢!
2017-03-15 回复 有任何疑惑可以回复我~

路径是以src目录开始计算的,看看名字有没有错

0 回复 有任何疑惑可以回复我~

一样的问题,但是我路径没有写错,sessionFactory里面写了

  <!-- 加载Hibernate中的映射文件 -->

             <property name="mappingResources">

                    <list>

                       <value>com/lzy/employ/domain/Department.hbm.xml</value>

                       <value>com/lzy/employ/domain/Employee.hbm.xml</value>

                    </list>

             </property>

那怎么还是找不到?你是怎么解决的

0 回复 有任何疑惑可以回复我~

楼上正解,话说为什么还叫domain,不是应该改成Department 或者Employee么

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

这是什么情况?求解决啊

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信