我们正在尝试将我们的Tomcat版本从7.0.73升级到更新版本。在任何更高版本上,除了我们的“DBPrism Servlet引擎”之外,一切运行正常。它部署时没有任何问题,但在运行测试时,它会在C-Prompt中抛出以下异常:
14-Sep-2017 13:00:36.074 SEVERE [http-nio-8080-exec-3]
org.apache.tomcat.util.digester.Digester.getParser Digester.getParser:
org.xml.sax.SAXNotRecognizedException: SAX feature 'http://apache.org/xml/features/allow-java-encodings' not recognized.
at oracle.xml.parser.v2.NonValidatingParser.setFeature(NonValidatingParser.java:1696)
at oracle.xml.parser.v2.SAXParser.setFeature(SAXParser.java:266)
at oracle.xml.jaxp.JXSAXParserFactory.newSAXParser(JXSAXParserFactory.java:88)
at org.apache.tomcat.util.digester.Digester.getParser(Digester.java:599)
at org.apache.tomcat.util.digester.Digester.getXMLReader(Digester.java:771)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1441)
at org.apache.catalina.authenticator.jaspic.PersistentProviderRegistrations.loadProviders(PersistentProviderRegistrations.java:84)
at org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl.loadPersistentRegistrations(AuthConfigFactoryImpl.java:329)
at org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl.<init>(AuthConfigFactoryImpl.java:69)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at javax.security.auth.message.config.AuthConfigFactory$1.run(AuthConfigFactory.java:76)
at javax.security.auth.message.config.AuthConfigFactory$1.run(AuthConfigFactory.java:66)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:65)
at org.apache.catalina.authenticator.AuthenticatorBase.findJaspicProvider(AuthenticatorBase.java:1199)
at org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1192)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:466)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:498)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:796)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1374)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
我看过不同网站的多个帖子都无济于事, 任何帮助将不胜感激
当前设置:带有最新JDK的Windows 10 - 1.8_144
答案 0 :(得分:0)
关闭Tomcat服务器。 使用文本编辑器打开catalina.properties文件。它通常位于/ install-path-to-tomcat / conf /中。在继续操作之前,请为此文件创建一个副本。 在文件的最顶部添加以下属性:
javax.xml.parsers.DocumentBuilderFactory = com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl javax.xml.transform.TransformerFactory = com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl javax.xml.parsers.SAXParserFactory = com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl javax.xml.datatype.DatatypeFactory = com.sun.org.apache.xerces.internal.jaxp.datatype.DatatypeFactoryImpl
不幸的是,我无法轻松地对Tomcat进行配置更改,我仍在寻找如何从我要部署的Web应用程序中修复此问题。