无法在JBoss EAP 6.2上调用远程EJB

时间:2015-11-26 11:11:58

标签: java ejb remote-access jboss-eap-6

当我尝试从远程客户端访问在JBoss EAP 6.2中运行的EJB时,出现以下异常:

  Caused by: java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;

    javax.naming.NamingException: Failed to create remoting connection [Root exception is java.lang.NoSuchMethodError: org.jboss.remoting3.Remoting.createEndpoint(Ljava/lang/String;Lorg/xnio/OptionMap;)Lorg/jboss/remoting3/Endpoint;]
        at org.jboss.naming.remote.client.ClientUtil.namingException(ClientUtil.java:51)

我正在使用这些属性来调用远程ejb方法。

  

endpoint.name =客户端点   remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED = FALSE   remote.connections = default remote.connection.default.host = localhost   remote.connection.default.port = 8080   remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS = FALSE   remote.connection.default.username =管理员   remote.connection.default.password =管理员

     

java.naming.factory.initial的= org.jboss.naming.remote.client.InitialContextFactory   java.naming.factory.url.pkgs = org.jboss.ejb.client.naming   java.naming.provider.url的远程=://本地主机:8080

我还使用了下面的库列表

enter image description here

1 个答案:

答案 0 :(得分:0)

使用8080作为远程端口非常罕见。默认情况下,它是4447或该数字的偏移量。尝试使用以下属性(取自http://www.mastertheboss.com/jboss-server/jboss-as-7/jboss-as-7-remote-ejb-client-tutorial

endpoint.name=client-endpoint
remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED=false
remote.connections=default

remote.connection.default.host=localhost
remote.connection.default.port = 4447
remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS=false