首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >java.lang.NoClassDefFoundError: org/jboss/remoting/InvokerLocator运行时错误

java.lang.NoClassDefFoundError: org/jboss/remoting/InvokerLocator运行时错误
EN

Stack Overflow用户
提问于 2016-03-28 17:38:28
回答 1查看 561关注 0票数 0

我有客户端类,但是当类被调用时,它会得到一个

"java.lang.NoClassDefFoundError: org/jboss/remoting/InvokerLocator“运行时错误。

代码语言:javascript
复制
import java.text.SimpleDateFormat;

import javax.inject.Inject;
import javax.inject.Named;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;

@Named("esamDIDDClient")
public class ESAMDIDDWSClient {

    @Inject SystemProperyManager sysprop;

    private void sendMessageToJBRListener(String url, String message) throws Throwable {
        String locatorURI = url;
        InvokerLocator locator = new InvokerLocator(locatorURI);
        System.out.println("Calling JBoss Remoting Listener using locator URI: " + locatorURI);

        Client remotingClient = null;

        try {
            remotingClient = new Client(locator);
            remotingClient.connect();

            // Deliver the message to the listener...
            Object response = remotingClient.invoke(message);
            System.out.println("JBR Class: " + response.getClass().getName());
            System.out.println("Response from JBoss Remoting Listener '" + locatorURI + "' was '" + response + "'.");
        }  catch (Exception ex) {
            ex.printStackTrace();
            throw ex;
        } finally {
            if(remotingClient != null) {
                remotingClient.disconnect();
            }
        }
    }

我在IDE中有org.jboss.remoting JAR,并且确认了其中的InvokerLocator类。

我从这里下载了JAR文件,这是我能找到的最新/稳定的JAR文件。

我是使用了错误的remoting.jar,还是遗漏了其他什么东西?

顺便说一下,这是一个使用seam.remoting.jar的。在移除缝后,我不得不使用另一个罐子。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-29 22:35:27

当RedHat用Wildfly代替JBoss时,它也用SwitchYard代替JBoss ESB。

因此,自JBoss AS7认为再也没有支持了为JBoss ESB。

根据您发布的代码,我假设您的服务实际上是一个web服务。

因此,我认为您可能想要更改代码,并开始使用RemoveInvoker基于SOAP的web服务绑定

作为一个起点,您可以看看 RedHat的SwitchYard示例。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36267624

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档