今天写了一个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)
不知道有哪位高手可以帮忙解答小弟这个奇怪的问题!我上网查了很长时间也没有找到到底是什么原因