在tomcat 8.5.16版本中部署.war文件时,出现以下错误:
例外
java.lang.SecurityException:AuthConfigFactory错误: java.lang.reflect.InvocationTargetException javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:85) org.apache.catalina.authenticator.AuthenticatorBase.findJaspicProvider(AuthenticatorBase.java:1205) org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1195) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:469) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:868) org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1455) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(未知源)根本原因
java.lang.reflect.InvocationTargetException sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法) sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(未知 来源)java.lang.reflect.Constructor.newInstance(未知来源) javax.security.auth.message.config.AuthConfigFactory $ 1.run(AuthConfigFactory.java:76) javax.security.auth.message.config.AuthConfigFactory $ 1.run(AuthConfigFactory.java:66) java.security.AccessController.doPrivileged(本机方法) javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:65) org.apache.catalina.authenticator.AuthenticatorBase.findJaspicProvider(AuthenticatorBase.java:1205) org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1195) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:469) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:868) org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1455) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(未知源)根本原因
java.lang.SecurityException :org.xml.sax.SAXNotRecognizedException: SAX功能'http://apache.org/xml/features/allow-java-encodings'不是 公认的。 org.apache.catalina.authenticator.jaspic.PersistentProviderRegistrations.loadProviders(PersistentProviderRegistrations.java:66) org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl.loadPersistentRegistrations(AuthConfigFactoryImpl.java:329) org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl。(AuthConfigFactoryImpl.java:69) sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法) sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(未知 来源)java.lang.reflect.Constructor.newInstance(未知来源) javax.security.auth.message.config.AuthConfigFactory $ 1.run(AuthConfigFactory.java:76) javax.security.auth.message.config.AuthConfigFactory $ 1.run(AuthConfigFactory.java:66) java.security.AccessController.doPrivileged(本机方法) javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:65) org.apache.catalina.authenticator.AuthenticatorBase.findJaspicProvider(AuthenticatorBase.java:1205) org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1195) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:469) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:868) org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1455) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(未知源)根本原因
org.xml.sax.SAXNotRecognizedException :SAX功能 无法识别“ http://apache.org/xml/features/allow-java-encodings”。 oracle.xml.jaxp.JXSAXParserFactory.setFeature(JXSAXParserFactory.java:230) org.apache.tomcat.util.digester.Digester.setFeature(Digester.java:478) org.apache.catalina.authenticator.jaspic.PersistentProviderRegistrations.loadProviders(PersistentProviderRegistrations.java:62) org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl.loadPersistentRegistrations(AuthConfigFactoryImpl.java:329) org.apache.catalina.authenticator.jaspic.AuthConfigFactoryImpl。(AuthConfigFactoryImpl.java:69) sun.reflect.NativeConstructorAccessorImpl.newInstance0(本机方法) sun.reflect.NativeConstructorAccessorImpl.newInstance(未知来源) sun.reflect.DelegatingConstructorAccessorImpl.newInstance(未知 来源)java.lang.reflect.Constructor.newInstance(未知来源) javax.security.auth.message.config.AuthConfigFactory $ 1.run(AuthConfigFactory.java:76) javax.security.auth.message.config.AuthConfigFactory $ 1.run(AuthConfigFactory.java:66) java.security.AccessController.doPrivileged(本机方法) javax.security.auth.message.config.AuthConfigFactory.getFactory(AuthConfigFactory.java:65) org.apache.catalina.authenticator.AuthenticatorBase.findJaspicProvider(AuthenticatorBase.java:1205) org.apache.catalina.authenticator.AuthenticatorBase.getJaspicProvider(AuthenticatorBase.java:1195) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:469) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:80) org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:799) org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66) org.apache.coyote.AbstractProtocol $ ConnectionHandler.process(AbstractProtocol.java:868) org.apache.tomcat.util.net.NioEndpoint $ SocketProcessor.doRun(NioEndpoint.java:1455) org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源) java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知源) org.apache.tomcat.util.threads.TaskThread $ WrappingRunnable.run(TaskThread.java:61) java.lang.Thread.run(未知源)注意 根本原因可在服务器日志中找到。
任何帮助如何解决?
答案 0 :(得分:1)
在 $TOMCAT_HOME/conf/catalina.properties
在死角处设置以下4个jar:
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
这会将您的catalina环境设置为包含必需的.jars。
答案 1 :(得分:0)