0

我想尝试从客户端连接到 ejb。我使用 WildFly12 和 Java8。在使用 Wildfly8 之前一切正常。

我删除了standalone.xml 的本地用户身份验证,以在服务器端获得相同的错误。

来自 server.log 的错误

    Caused by: org.wildfly.security.auth.AuthenticationException: JBREM000308: Authentication failed (no mechanisms left), tried: 
   JBOSS-LOCAL-USER: org.wildfly.security.auth.AuthenticationException: JBREM000300: Authentication failed due to I/O error
        at org.jboss.remoting3.ConnectionPeerIdentityContext.doAuthenticate(ConnectionPeerIdentityContext.java:368)
        at org.jboss.remoting3.ConnectionPeerIdentityContext.authenticate(ConnectionPeerIdentityContext.java:174)
        at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:505)
        at org.jboss.remoting3.EndpointImpl$3.handleDone(EndpointImpl.java:494)
        at org.xnio.IoFuture$HandlingNotifier.notify(IoFuture.java:208)
        at org.xnio.AbstractIoFuture$NotifierRunnable.run(AbstractIoFuture.java:720)
        at org.xnio.IoUtils$2.execute(IoUtils.java:71)
        at org.xnio.AbstractIoFuture.runNotifier(AbstractIoFuture.java:693)
        at org.xnio.AbstractIoFuture$CompleteState.withNotifier(AbstractIoFuture.java:132)
        at org.xnio.AbstractIoFuture.addNotifier(AbstractIoFuture.java:570)
        at org.jboss.remoting3.EndpointImpl.doGetConnection(EndpointImpl.java:494)
        at org.jboss.remoting3.EndpointImpl.getConnectedIdentity(EndpointImpl.java:433)
        at org.jboss.remoting3.UncloseableEndpoint.getConnectedIdentity(UncloseableEndpoint.java:51)
        at org.jboss.remoting3.Endpoint.getConnectedIdentity(Endpoint.java:122)
        at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.lambda$getConnection$2(RemoteEJBReceiver.java:185)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.jboss.ejb.protocol.remote.RemoteEJBReceiver.getConnection(RemoteEJBReceiver.java:185)

我创建 InitialContext 如下:

                clientProperties.put( Context.INITIAL_CONTEXT_FACTORY, "org.wildfly.naming.client.WildFlyInitialContextFactory" );
                clientProperties.put( Context.PROVIDER_URL, "remote+http://" + m_strAppServerHostname + ":" + m_iAppServerPort );
                clientProperties.put( Context.SECURITY_PRINCIPAL, getAppServerUserName() );
                clientProperties.put( Context.SECURITY_CREDENTIALS, getAppServerPassword() );
return new InitialContext( clientProperties );
4

0 回答 0