在Jboss 7上添加用户时出现异常

问题描述 投票:0回答:1

当我尝试在jboss上运行添加用户bat时,这样我就可以访问jboss上的控制台管理, 我收到以下错误:

Exception in thread "main" javax.xml.parsers.FactoryConfigurationError: Provider __redirected.__SAXParserFactory could not be instantiated: java.lang.reflect.InvocationTargetException
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:204)
        at javax.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:152)
        at javax.xml.parsers.FactoryFinder.find(FactoryFinder.java:232)
        at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:127)
        at jdk.xml.internal.JdkXmlUtils.getSAXFactory(JdkXmlUtils.java:235)
        at jdk.xml.internal.JdkXmlUtils.<clinit>(JdkXmlUtils.java:78)
        at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.<init>(SchemaParsingConfig.java:319)
        at com.sun.org.apache.xerces.internal.impl.xs.opti.SchemaParsingConfig.<init>(SchemaParsingConfig.java:254)
        at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.<init>(XSDHandler.java:483)
        at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.<init>(XSDHandler.java:490)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.<init>(XMLSchemaLoader.java:360)
        at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.<init>(XMLSchemaLoader.java:295)
        at com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory.<init>(XMLSchemaFactory.java:106)
        at javax.xml.validation.SchemaFactoryFinder._newFactory(SchemaFactoryFinder.java:233)
        at javax.xml.validation.SchemaFactoryFinder.newFactory(SchemaFactoryFinder.java:147)
        at javax.xml.validation.SchemaFactory.newInstance(SchemaFactory.java:213)
        at __redirected.__SchemaFactory.<clinit>(__SchemaFactory.java:66)
        at __redirected.__JAXPRedirected.initAll(__JAXPRedirected.java:88)
        at org.jboss.modules.Module$1.run(Module.java:85)
        at org.jboss.modules.Module$1.run(Module.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.modules.Module.<clinit>(Module.java:72)
        at org.jboss.modules.Main.main(Main.java:255)
Caused by: java.lang.reflect.InvocationTargetException
        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.xml.parsers.FactoryFinder.newInstance(FactoryFinder.java:192)
        ... 22 more
Caused by: java.lang.NullPointerException
        at __redirected.__RedirectedUtils.loadProvider(__RedirectedUtils.java:94)
        at __redirected.__RedirectedUtils.loadProvider(__RedirectedUtils.java:87)
        at __redirected.__SAXParserFactory.<init>(__SAXParserFactory.java:102)
        ... 27 more

我使用的是 Windows 10。

我该如何解决这个问题?

jboss
1个回答
0
投票

仅显示错误日志不足以帮助您。

我将展示步骤,以防有帮助。与...一起工作

jdk 8
jboss 7.4
win 10

在 CMD 中触发以下命令

C:\jboss-eap-7.4\jboss-eap-7.4>add-user.bat

目录可以根据你的jboss安装路径。

add-user.bat
将在bin目录中找到。

按照 CMD 控制台上的步骤进行操作,如下所示:

What type of user do you wish to add?

a) Management User (mgmt-users.properties)

b) Application User (application-users.properties)

我选择:

(a): a

提供

Username : {your choice username}

Password :

我使用

manager
作为用户名 。根据提示提供
yes

最后是Jboss的建议

To represent the user add the following to the server-identities definition <secret value="bWFuYWdlcg==" />
© www.soinside.com 2019 - 2024. All rights reserved.