学习Spring过程中发现的一个怪问题

        今天写了一个Spring的小的测试程序。我发现一个很奇怪的问题。当我的网络是联通的时候,程序一切运行正常,但是当我把网络断了的时候,却发生了错误。错误信息如下:

exception

javax.servlet.ServletException: Servlet.init() for servlet action threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
java.lang.Thread.run(Thread.java:595) 

root cause

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' 
defined in ServletContext resource [/WEB-INF/applicationContext-hibernate.xml]: Invocation of init method failed; 
nested exception is org.hibernate.InvalidMappingException: Could not parse mapping document from input stream
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1175)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
org.springframework.web.context.ContextLoaderServlet.init(ContextLoaderServlet.java:82)
javax.servlet.GenericServlet.init(GenericServlet.java:211)
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
org.apache.catalina.startup.Catalina.start(Catalina.java:551)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)
org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
不知道有哪位高手可以帮忙解答小弟这个奇怪的问题!我上网查了很长时间也没有找到到底是什么原因
 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值