No base URI; hope URI is absolute: http://

     这两天总是出现 No base URI; hope URI is absolute: http://***.***.***/**.dtd 的错误,也不知道为什么,开始以为是网络问题,可是网络好的时候,也是出现这个问题,弄得十分头疼,最后上网搜索了一大通之后,才小有眉目,同样的错误可能有不同的原因,我出现这个问题的原因是出现了1个以上的XML解析类,所以才会出现这个问题,我只把dom4j的jar包留下来了,其他的一律都给删除了,果然就没有错误了,错误不停的范,只是希望永远都不要趟过同一条河。
    下面是错误的代码:(
2006-7-17 10:14:09 org.springframework.util.xml.SimpleSaxErrorHandler warning
警告: Ignored XML validation warning: No base URI; hope URI is absolute: http://www.springframework.org/dtd/spring-beans.dtd
org.xml.sax.SAXParseException: No base URI; hope URI is absolute: http://www.springframework.org/dtd/spring-beans.dtd
 at gnu.xml.aelfred2.SAXDriver.warn(SAXDriver.java:934)
 at gnu.xml.aelfred2.XmlParser.readExternalIds(XmlParser.java:2399)
 at gnu.xml.aelfred2.XmlParser.parseDoctypedecl(XmlParser.java:804)
 at gnu.xml.aelfred2.XmlParser.parseProlog(XmlParser.java:522)
 at gnu.xml.aelfred2.XmlParser.parseDocument(XmlParser.java:414)
 at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:167)
 at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)
 at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)
 at gnu.xml.dom.JAXPFactory$JAXPBuilder.parse(JAXPFactory.java:186)
 at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
 at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:145)
 at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:99)
 at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:114)
 at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:82)
 at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:87)
 at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:260)
 at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
 at org.springframework.web.struts.ContextLoaderPlugIn.createWebApplicationContext(ContextLoaderPlugIn.java:352)
 at org.springframework.web.struts.ContextLoaderPlugIn.initWebApplicationContext(ContextLoaderPlugIn.java:295)
 at org.springframework.web.struts.ContextLoaderPlugIn.init(ContextLoaderPlugIn.java:224)
 at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
 at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
 at javax.servlet.GenericServlet.init(GenericServlet.java:212)
 at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:888)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:776)
 at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3363)
 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3586)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
 at org.apache.catalina.core.StandardHost.start(StandardHost.java:707)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1141)
 at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:316)
 at org.apache.catalina.core.StandardService.start(StandardService.java:450)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:2143)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:463)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:350)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:129)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:324)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:156)

你可能感兴趣的:(java,apache,spring,xml,struts)