Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/340.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java JBoss AS 7.1错误:JBREM000200:远程连接失败:_Java_Eclipse_Authentication_Jboss - Fatal编程技术网

Java JBoss AS 7.1错误:JBREM000200:远程连接失败:

Java JBoss AS 7.1错误:JBREM000200:远程连接失败:,java,eclipse,authentication,jboss,Java,Eclipse,Authentication,Jboss,我有两个项目,一个si运行在服务器上(JBossAS 7.1),另一个应该由客户机完成,客户机可以与服务器通信 两者都在同一台机器上 这是我在客户机项目中的Main.java类中的代码 import javax.naming.Context; import javax.naming.InitialContext; import javax.naming.NamingException; public class Main { public static void main(Strin

我有两个项目,一个si运行在服务器上(JBossAS 7.1),另一个应该由客户机完成,客户机可以与服务器通信

两者都在同一台机器上

这是我在客户机项目中的Main.java类中的代码

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class Main {
    public static void main(String[] args) {
        CalculetteService calculette = null;
        try {
            Context    context = new InitialContext();
            calculette = (CalculetteService) context.lookup("ejb:/Analyzator-Server//CalculetteServiceImpl!CalculetteService");
            System.out.println("Vysledok je: " + calculette.add(10, 10));
        } catch (NamingException e) {
            e.printStackTrace();
        }
    }
    public Main() {
        super();
    }

}
尝试运行后,我出现以下错误:

apr 29, 2015 4:26:12 PM org.xnio.Xnio <clinit>
INFO: XNIO Version 3.0.3.GA
apr 29, 2015 4:26:12 PM org.xnio.nio.NioXnio <clinit>
INFO: XNIO NIO Implementation Version 3.0.3.GA
apr 29, 2015 4:26:12 PM org.jboss.remoting3.EndpointImpl <clinit>
INFO: JBoss Remoting version 3.2.2.GA
apr 29, 2015 4:26:13 PM org.jboss.remoting3.remote.RemoteConnection handleException
ERROR: JBREM000200: Remote connection failed: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed]
    at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:36)
    at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:117)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at Main.main(Main.java:9)
Caused by: java.lang.RuntimeException: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
    at org.jboss.naming.remote.protocol.IoFutureHelper.get(IoFutureHelper.java:87)
    at org.jboss.naming.remote.client.cache.ConnectionCache.get(ConnectionCache.java:42)
    at org.jboss.naming.remote.client.InitialContextFactory.createConnection(InitialContextFactory.java:153)
    at org.jboss.naming.remote.client.InitialContextFactory.getOrCreateConnection(InitialContextFactory.java:126)
    at org.jboss.naming.remote.client.InitialContextFactory.getInitialContext(InitialContextFactory.java:106)
    ... 5 more
Caused by: javax.security.sasl.SaslException: Authentication failed: all available authentication mechanisms failed
    at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:365)
    at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:214)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
    at org.xnio.channels.TranslatingSuspendableChannel.handleReadable(TranslatingSuspendableChannel.java:189)
    at org.xnio.channels.TranslatingSuspendableChannel$1.handleEvent(TranslatingSuspendableChannel.java:103)
    at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:72)
    at org.xnio.nio.NioHandle.run(NioHandle.java:90)
    at org.xnio.nio.WorkerThread.run(WorkerThread.java:184)
    at ...asynchronous invocation...(Unknown Source)
    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:270)
    at org.jboss.remoting3.EndpointImpl.doConnect(EndpointImpl.java:251)
    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:349)
    at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:333)
    at org.jboss.naming.remote.client.cache.EndpointCache$EndpointWrapper.connect(EndpointCache.java:110)
    at org.jboss.naming.remote.client.cache.ConnectionCache.get(ConnectionCache.java:41)
    ... 8 more
服务器运行正常,没有错误

我将非常感谢你的帮助,因为我不知道还能尝试什么。谢谢你抽出时间

<interfaces>
    <interface name="management">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    </interface>
    <interface name="public">
        <inet-address value="${jboss.bind.address:127.0.0.1}"/>
    </interface>
</interfaces>

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="http" port="8080"/>
    <socket-binding name="https" port="8443"/>
    <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
    <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9980}"/>
    <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
    <socket-binding name="osgi-http" interface="management" port="8090"/>
    <socket-binding name="remoting" port="4447"/>
    <socket-binding name="txn-recovery-environment" port="4712"/>
    <socket-binding name="txn-status-manager" port="4713"/>
    <outbound-socket-binding name="mail-smtp">
        <remote-destination host="localhost" port="25"/>
    </outbound-socket-binding>
</socket-binding-group>
java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
java.naming.provider.url = remote\://localhost\:4447
jboss.naming.client.ejb.context=true
java.naming.factory.url.pkgs=org.jboss.ejb.client.naming