javax.xml.parsers.FactoryConfigurationError 使用 Java 7 更新 171 运行 JBoss AS 7.1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/48403832/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-12 02:50:10  来源:igfitidea点击:

javax.xml.parsers.FactoryConfigurationError running JBoss AS 7.1 with Java 7 update 171

javajbossnullpointerexceptioncompatibility

提问by David Le Borgne

Upgrading Java from 7u161to 7u171prevents JBoss AS 7.1.1.Finalfrom starting. I know JBoss AS 7.1.1 is EOL but for compatibility reasons, we still need to run this version.

将 Java 从7u161升级到7u171 会阻止JBoss AS 7.1.1.Final启动。我知道 JBoss AS 7.1.1 是 EOL 但出于兼容性原因,我们仍然需要运行这个版本。

Very early in the startup, a NullPointerException occurs in some JBoss method. Following is the exception:

在启动的早期,一些 JBoss 方法中出现 NullPointerException。以下是例外:

Exception in thread "main" javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__SAXParserFactory could not be instantiated: java.lang.NullPointerException
[...]
Caused by: java.lang.NullPointerException
at __redirected.__RedirectedUtils.loadProvider(__RedirectedUtils.java:94)

The full stackis here.

全栈是在这里。

采纳答案by effegi

Could you try upgrading jboss-modules.jar(found in the root folder of the jboss-as binary distribution) to 1.1.5.GA? The version of jboss-modules which comes with jboss-7.1.1.Finalis 1.1.1.GAand it has a few issues with initialisation order and multiple-initialisation which could be causing the issue.

您可以尝试升级jboss-modules.jar(在 jboss-as 二进制发行版的根文件夹中找到)到1.1.5.GA? 其自带的JBoss的模块的版本jboss-7.1.1.Final1.1.1.GA,它与初始化顺序和多初始化这可能会导致此问题的几个问题。

回答by Umy Angel

Environment as Follow: Jboss: JBoss AS 7.1.1.Final, OS: Ubuntu 16.04.1, and, java: 1.8.0_181.

环境如下:Jboss:JBoss AS 7.1.1.Final,操作系统:Ubuntu 16.04.1,java:1.8.0_181。

I have downloaded jboss-modules-1.1.5.GA.jarand replace to jboss-modules.jar at JBOSS_HOME. It worked for me.

我已经下载了jboss-modules-1.1.5.GA.jar并在JBOSS_HOME替换为 jboss-modules.jar。它对我有用。

回答by Ajinkya Karode

I had same issue on my Production Server

我的生产服务器上有同样的问题

My Environment :-

我的环境:-

JBoss AS 7.1.1.Final      
Red Hat Enterprise Linux 6.5     
java: 1.7.0_181  

Even i had jboss-modules.jar which comes by default in JBoss AS 7.1.1.Final ,
So i downloaded jboss-modules-1.1.5.GA.jar, renamed it as jboss-modules.jar
and replaced it with original jboss-modules.jar.

即使我有 jboss-modules.jar,它默认出现在 JBoss AS 7.1.1.Final 中,
所以我下载了jboss-modules-1.1.5.GA.jar,将其重命名为 jboss-modules.jar
并用原始 jboss 替换它-modules.jar。

回答by Mike D3ViD Tyson

Are you sure you are using a jdk 1.7?

您确定您使用的是jdk 1.7 吗?

This issue can happen when you try to start Jboss with java version > 1.7,try to check your JDK installation folder.

当您尝试使用java 版本 > 1.7启动 Jboss 时,可能会发生此问题,请尝试检查您的 JDK 安装文件夹。