我尝试在oracle linux,tomcat 7和jdk1.7上运行web应用程序,并且在tomcat重启后第一页加载时出现异常。仅在第一个应用程序页面加载时发生异常。应用程序是在jdk1.6上开发的,在服务器上安装了jdk1.4-compact和jdk1.7,但我在tomcat/bin/setclasspath.sh
文件中输入了JAV1_HOME和JRE_HOME的jdk1.7路径。我有什么想法得到这个例外吗?
Jan 03, 2012 5:11:28 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 10261 ms
Jan 03, 2012 5:15:49 PM org.apache.commons.digester.Digester getParser
SEVERE: Digester.getParser:
java.lang.UnsupportedOperationException: This parser does not support specification "null" version "null"
at javax.xml.parsers.SAXParserFactory.setSchema(SAXParserFactory.java:419)
at org.apache.commons.digester.Digester.getFactory(Digester.java:541)
at org.apache.commons.digester.Digester.getParser(Digester.java:791)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:1068)
at org.apache.commons.digester.Digester.parse(Digester.java:1916)
at org.apache.tiles.definition.digester.DigesterDefinitionsReader.read(DigesterDefinitionsReader.java:329)
at org.apache.tiles.definition.dao.BaseLocaleUrlDefinitionDAO.loadDefinitionsFromURL(BaseLocaleUrlDefinitionDAO.java:276)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:251)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadParentDefinitions(ResolvingLocaleUrlDefinitionDAO.java:58)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(CachingLocaleUrlDefinitionDAO.java:239)
at org.apache.tiles.definition.dao.ResolvingLocaleUrlDefinitionDAO.loadDefinitionsFromURLs(ResolvingLocaleUrlDefinitionDAO.java:65)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.loadDefinitions(CachingLocaleUrlDefinitionDAO.java:222)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.checkAndloadDefinitions(CachingLocaleUrlDefinitionDAO.java:204)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinitions(CachingLocaleUrlDefinitionDAO.java:154)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:123)
at org.apache.tiles.definition.dao.CachingLocaleUrlDefinitionDAO.getDefinition(CachingLocaleUrlDefinitionDAO.java:54)
at org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:105)
at org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:364)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:618)
at org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
at org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105)
at org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186)
at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:373)
at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:277)
at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:52)
at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:485)
at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:395)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:200)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:302)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
答案 0 :(得分:7)
你在classpath上有两个xml的消化器吗?尝试删除一个。
答案 1 :(得分:1)
从jdk1.6到jdk1.7有一些重要的库更改(我不知道详细信息)。我在系统中也遇到了类似的问题。对于临时工作,您可以在JAVA_HOME和JRE_HOME中指向jdk1.6而不是jdk 1.7
答案 2 :(得分:0)
此问题是由于javasist版本冲突造成的。在你的theamleasf工件中添加排除,它将解决你的问题。
答案 3 :(得分:0)
我在从 Tomcat(8.5.60) 部署一场战争时遇到了同样的问题,对我有用的一件事是我在 %APACHE_HOME%\conf\catalina.properties 文件中添加了以下属性并重新启动了 tomcat -< /p>
<!DOCTYPE html>
<html>
<head>
<title>D3 Example</title>
<!--
All of this gives error: values is undefined:
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="node_modules/d3/dist/d3.js"></script>
<script src="unziped/d3.js"></script>
-->
<script src="https://d3js.org/d3.v6.min.js"></script>
<!--
Version 4, This is ok:
<script src="https://d3js.org/d3.v4.js"></script>
-->
<script>
var data_map = d3.map();
</script>
</head>
<body>
<h1>Try D3, d3.map() gives error</h1>
<div id="map"></div>
</body>
</html>