org.thymeleaf.exceptions.TemplateInputException: Exception parsing document:

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38962004/article/details/80997794
org.thymeleaf.exceptions.TemplateInputException: Exception parsing document: template="home", line 29 - column 48] with root cause

org.xml.sax.SAXParseException: 元素内容必须由格式正确的字符数据或标记组成。

。。。。。。。。。

今天报了这个错误,非常不理解,最后试着将一个包:

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-thymeleaf</artifactId>

        </dependency>

删掉之后,因为模板技术:velocity/freemarker/jsp这个,只需要其中之一就行了,如果导了两种包,就会出现冲突导致解析错误


展开阅读全文

Unexpected exception parsing XML document from ServletContext resource [/WEB-INF

01-06

我的struts2和spring整合,但整合后出这问题 找不到怎么回事rn高手帮我看看好不?rn我的配置没什么问题,不知道是不是那个jar包有问题rnrn这是在web.xml中的配置rnrn rn contextConfigLocationrn /WEB-INF/classes/applicationContext.xmlrn rnrn rn org.springframework.web.context.ContextLoaderListenerrn rnrnrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/classes/applicationContext.xml]; nested exception is java.lang.OutOfMemoryError: Java heap spacern at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3827)rn at org.apache.catalina.core.StandardContext.start(StandardContext.java:4334)rn at org.apache.catalina.startup.HostConfig.checkResources(HostConfig.java:1105)rn at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1203)rn at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:293)rn at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)rn at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)rn at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)rn at java.lang.Thread.run(Thread.java:619)rnCaused by: java.lang.OutOfMemoryError: Java heap spacern at java.util.zip.InflaterInputStream.(InflaterInputStream.java:71)rn at java.util.zip.ZipFile$1.(ZipFile.java:212)rn at java.util.zip.ZipFile.getInputStream(ZipFile.java:212)rn at java.util.zip.ZipFile.getInputStream(ZipFile.java:180)rn at java.util.jar.JarFile.getInputStream(JarFile.java:383)rn at sun.net.www.protocol.jar.JarURLConnection.getInputStream(JarURLConnection.java:144)rn at org.springframework.core.io.UrlResource.getInputStream(UrlResource.java:123)rn at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:74)rn at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:68)rn at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:191)rn at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)rn at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.reparse(ComponentScanBeanDefinitionParser.java:84)rn at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn2011-1-6 12:30:14 org.apache.catalina.core.StandardContext start 问答

Unexpected exception parsing XML document from class path resource [application

01-12

求大神帮忙解决rnrn严重: Context initialization failedrnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higherrn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higherrn at org.springframework.transaction.config.TxNamespaceUtils.getAnnotationTransactionAttributeSourceClass(TxNamespaceUtils.java:43)rn at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.java:115)rn at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:80)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)rn ... 26 morern一月 12, 2017 8:58:52 上午 org.apache.catalina.core.StandardContext listenerStartrn严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListenerrnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from class path resource [applicationContext.xml]; nested exception is java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higherrn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)rn at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)rn at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)rn at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)rn at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)rn at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)rn at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)rn at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)rn at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)rn at java.util.concurrent.FutureTask.run(FutureTask.java:266)rn at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)rn at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)rn at java.lang.Thread.run(Thread.java:745)rnCaused by: java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higherrn at org.springframework.transaction.config.TxNamespaceUtils.getAnnotationTransactionAttributeSourceClass(TxNamespaceUtils.java:43)rn at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.java:115)rn at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:80)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)rn ... 26 more 论坛

Unexpected exception parsing XML document from ServletContext resource

08-22

项目原本运行正常,后来更新了一个class后,没有停止was,直接把class给扔到了服务器中。后来导致服务器报找不着class错误,就把新发布的class删掉,将原来的class发布上去,并重启了was,结果系统在运行时报如下错:rn[code=Java]rnorg.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/classes/applicationContext.xml]; nested exception is java.lang.ArrayIndexOutOfBoundsException: 330rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:420)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:342)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:310)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)rn at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)rn at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:92)rn at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:123)rn at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:422)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)rn at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)rn at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)rn at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)rn at com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:641)rn at com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:298)rn at com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:289)rn at com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:90)rn at com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:157)rn at com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:665)rn at com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:618)rn at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)rn at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)rn at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1301)rn at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1138)rn at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)rn at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:817)rn at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:950)rn at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2120)rn at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:341)rn at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)rnCaused by: java.lang.ArrayIndexOutOfBoundsException: 330rn at org.springframework.asm.ClassReader.readClass(Unknown Source)rn at org.springframework.asm.ClassReader.accept(Unknown Source)rn at org.springframework.asm.ClassReader.accept(Unknown Source)rn at org.springframework.core.type.classreading.SimpleMetadataReader.getAnnotationMetadata(SimpleMetadataReader.java:55)rn at org.springframework.core.type.filter.AnnotationTypeFilter.matchSelf(AnnotationTypeFilter.java:68)rn at org.springframework.core.type.filter.AbstractTypeHierarchyTraversingFilter.match(AbstractTypeHierarchyTraversingFilter.java:55)rn at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.isCandidateComponent(ClassPathScanningCandidateComponentProvider.java:252)rn at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:192)rn at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:201)rn at org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)rn at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)rn at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)rn at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)rn at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)rn ... 30 morern[/code]rn很不解的是原来程序运行都是正常的,怎么动了一下就出问题了?rn由于它用的是spring组件,我也不清楚去哪里看数组溢出。现在业务方催的比较急,麻烦各位热心的朋友们帮忙看看,小弟先拜谢了! 论坛

Parsing XML document using xalan

06-25

I have developped some java-xml applicaitons under jdk1.4. Now I would like to replace the XML parser with Xalan, however there is an error as below. Notice that the parsing works fine, but when I try to save the document into a file, the error occur. And it work perfect under jaxp reference implementation from sun. Any suggestions?rnrn/*code*/rnFileWriter out = new FileWriter(outputFile);rn TransformerFactory tFactory = TransformerFactory.newInstance();rn Transformer transformer = tFactory.newTransformer();rn transformer.transform(new DOMSource(myDoc), new StreamResult(outputFile));rn/*code*/rnrn/*error*/rnjava.lang.NoSuchMethodErrorrn at org.apache.xpath.DOM2Helper.getNamespaceOfNode(DOM2Helper.java:348)rn at org.apache.xml.utils.TreeWalker.startNode(TreeWalker.java:368)rn at org.apache.xml.utils.TreeWalker.traverse(TreeWalker.java:192)rn at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:322)rn at crmloyalty.ConfigParser.saveXMLFile(ConfigParser.java:215)rn at crmloyalty.ConfigParser.setAllParameters(ConfigParser.java:201)rn at crmloyalty.ModelForecastDataServlet.doPost(ModelForecastDataServlet.java:107)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)rn at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)rn at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)rn at org.apache.tomcat.core.Handler.service(Handler.java:287)rn at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)rn at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812)rn at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)rn at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)rn at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)rn at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)rn at java.lang.Thread.run(Thread.java:484)rnrn/*error*/ 论坛

没有更多推荐了,返回首页