• Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in


    1、错误描述

    严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
    org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 1 in XML document from file [E:Eclipseworkspace.metadata.pluginsorg.eclipse.wst.server.core	mp1wtpwebappssopssWEB-INFclassesspringapplicationContext.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:335)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:303)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
    	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
    	at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
    	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:540)
    	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)
    	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:4992)
    	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5490)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	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:745)
    Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
    	at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
    	at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
    	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:428)
    	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
    	... 22 more
    
    四月 26, 2015 10:10:18 下午 org.apache.catalina.core.StandardContext startInternal
    严重: Error listenerStart
    四月 26, 2015 10:10:18 下午 org.apache.catalina.core.StandardContext startInternal
    严重: Context [/sopss] startup failed due to previous errors
    四月 26, 2015 10:10:18 下午 org.apache.catalina.core.ApplicationContext log
    信息: Closing Spring root WebApplicationContext
    四月 26, 2015 10:10:18 下午 org.apache.catalina.core.StandardContext listenerStop
    严重: Exception sending context destroyed event to listener instance of class org.springframework.web.context.ContextLoaderListener
    java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
    	at org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:170)
    	at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:921)
    	at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:895)
    	at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:841)
    	at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:579)
    	at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:115)
    	at org.apache.catalina.core.StandardContext.listenerStop(StandardContext.java:5033)
    	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5685)
    	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:160)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575)
    	at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565)
    	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    	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:745)
    
    四月 26, 2015 10:10:18 下午 org.apache.coyote.AbstractProtocol start
    信息: Starting ProtocolHandler ["http-bio-8080"]
    四月 26, 2015 10:10:18 下午 org.apache.coyote.AbstractProtocol start
    信息: Starting ProtocolHandler ["ajp-bio-8009"]
    四月 26, 2015 10:10:18 下午 org.apache.catalina.startup.Catalina start
    信息: Server startup in 25794 ms
    

    2、错误原因


    3、解决办法

  • 相关阅读:
    PHP 数据类型
    PHP SAPI
    PHP 基础架构
    PHP7的变化
    mysql 选择优化的数据类型需要注意的几点
    彻底删除在github上提交的文件
    php7 新特性
    php缓冲区 一些笔记
    设计模式 一些概念
    mysql性能优化其中一部分小结
  • 原文地址:https://www.cnblogs.com/hzcya1995/p/13314534.html
Copyright © 2020-2023  润新知