从tomcat 6切换到tomcat 7时启动spring应用程序时出错

时间:2013-01-27 02:55:30

标签: spring tomcat tomcat6 tomcat7

在将同一个spring应用程序从tomcat 6-0-35切换到tomcat 7-0-32时,我在控制台中收到以下警告/错误消息:

WARNING: Failed to process TLD with path [/spring] and URI [/WEB-INF/tld/spring-form.tld]
 java.net.MalformedURLException
at java.net.URL.<init>(URL.java:601)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1537)
at org.apache.catalina.startup.TldConfig.tldScanStream(TldConfig.java:542)
at org.apache.catalina.startup.TldConfig.tldScanWebXml(TldConfig.java:355)
at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:270)
at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:567)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

1 个答案:

答案 0 :(得分:1)

出于某种原因,Tomcat 7.0需要将spring-form.tld添加到/ WEB-INF / tld目录,而不是从jar获取此文件的Tomcat 6.0