- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我在 wildly 8.1.0
中创建了一个使用 EJB 远程 session bean 的应用程序,但是当我进行查找时,出现此错误:
EJBCLIENT000025: No EJB receiver available for handling [appName:rb, moduleName:remot, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@75f1b0bc
我已将 application.xml 文件和 module.xml 文件配置为使用 "rb"
应用程序名称和 "remot"
模块名称。当我启动服务器时,它启动没有错误,并部署EJB
,所以我认为问题出在客户端,这是客户端的代码:
@SuppressWarnings({ "rawtypes", "unchecked" })
private static void busquedaServidor(Server.DatosRegistro datos) throws NamingException
{
final Hashtable jndiProperties = new Hashtable();
jndiProperties.put(Context.URL_PKG_PREFIXES,"org.jboss.ejb.client.naming);
final Context context = new InitialContext(jndiProperties);
final String appName = "rb";
final String moduleName = "remot";
final String distinctName = "";
final String beanName = Ejb.class.getSimpleName();
final String viewClassName = EjbRemote.class.getName();
String url = "ejb:" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName;
//ejb:rb/remot//Ejb!Server.EjbRemote
System.out.println(url);
EjbRemote envio= (EjbRemote) context.lookup(url);
envio.datosRegistro(datos);**
}
也许错误在于不同的名称,即为空,感谢您的帮助。
最佳答案
我在 Wildfly 10.1 上遇到了同样的问题。我解决了用“/”替换“ejb:”的问题。对于您的情况:
String url = "/" + appName + "/" + moduleName + "/" + distinctName + "/" + beanName + "!" + viewClassName;
远程上下文得到:
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
properties.put(Context.PROVIDER_URL, "http-remoting://" + host + ":" + port);
properties.put("jboss.naming.client.ejb.context", "true");
properties.put(Context.SECURITY_PRINCIPAL, "adminapp");
properties.put(Context.SECURITY_CREDENTIALS, "adminpwd");
来源:https://blog.akquinet.de/2014/09/26/jboss-eap-wildfly-three-ways-to-invoke-remote-ejbs/
希望有帮助。
关于java - Wildfly 8.1.0 进行 EJB 远程调用时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30087245/
我想保护托管在我的 Widlfly AS 上的一些 ejb,所以我开始创建我的安全域。我不想在 ApplicationRealm 上进行身份验证,所以我定义了我的安全领域并将其指向我的安全域。我想将凭
我在 Wildfly 10 上有一个 Web 应用程序 并且在 Web 应用程序目录中,我放置了一个 zip 文件,当用户单击超链接时我想下载该文件。 在我的用户界面上 片段 ','_self')">
我们正在使用 wildfly,在我们的 wildflyhome/standalone/log 目录中,它充满了日志并最终耗尽了磁盘空间。我想设置滚动日志并且知道这是可能的,但只是不知道该怎么做。任何帮
是否可以在 WildFly 10 中配置压缩日志? 无法在此处找到正确的配置: https://docs.jboss.org/author/display/WFLY10/Handlers 最佳答案 日
在开发过程中,我希望能够在 Web 应用程序打开时运行我的 arquillian 测试。两者都使用不同的 WildFly 实例: 我的 Arquillian 测试使用托管(甚至嵌入式)wildfly
我想编写一个脚本来管理 WildFly 启动和部署,但我现在遇到了麻烦。要检查服务器是否已启动,我找到了命令 ./jboss-cli.sh -c command=':read-attribute(na
我们在旧版本中使用 -b 0.0.0.0 来完成此操作。但是当我们在 WildFly 中设置这个地址时,它会失败。在 WildFly-8.2 中执行此操作的替代方法是什么? 最佳答案 按以下方式更改您
在 WildFly 13 中禁用管理控制台的正确方法是什么?我在 http-interface 上设置了 console-enabled="false" 属性,但运行 WildFly 13 后我仍然看
我想向 STOMP 客户端公开我的 WildFly 服务器,但我还没有找到任何最近的样本。据我了解,最近 WildFly 版本中的所有通信都通过单个套接字(默认情况下监听 8080)。我需要更改任何配
我想将 Wildfly 服务器的日志子系统用于我的应用程序。在一些在线博客的帮助下,我在 standalone.xml 中为我的应用程序添加了一个日志配置文件。
从 JBoss 5.1 升级到 WildFly 8.2 后,我收到了下一个错误日志。同时 - 所有工作都有效。 2015-07-13 18:28:35,201 EJB default - 2 ERRO
在 WildFly 13 中禁用管理控制台的正确方法是什么?我在 http-interface 上设置了 console-enabled="false" 属性,但运行 WildFly 13 后我仍然看
我有一个在 Wildfly 8.0.0 Final 上运行的 JavaEE 应用程序。 应用程序使用了很多图像,我不想将它们存储在数据库中,因此将它们写入硬盘。 如何配置 Wildfly/Undert
我之前在 Glassfish 上有过一些代码,但我想将它移植到 WildFly。 但是,我似乎无法让 WildFly 调用该模块。 ServletContextListener初始化模块如下 Auth
Wildfly 和 Java 的初学者,如果这个问题非常基础,我深表歉意。任何帮助将不胜感激。 备注: 启动 Wildfly 服务器没有任何问题。 问题: 我正在尝试从以下位置开始 hello wor
Wildfly 和 Java 的初学者,如果这个问题非常基础,我深表歉意。任何帮助将不胜感激。 备注: 启动 Wildfly 服务器没有任何问题。 问题: 我正在尝试从以下位置开始 hello wor
我正在尝试将 JMC 连接到在 Windows8 机器上作为服务运行的 WildFly,但是当我打开 JMC 时,它不显示正在运行的 Wildfly,只显示运行 jmc 的 jvm。尝试以这种方式连接
有没有人有使用 CLI 在 Wildfly 中设置消息传递子系统的示例脚本? 一个完美的例子是 CLI 需要使用一个运行 standalone.xml 的服务器,在运行 CLI 脚本之后,它有一个在
在 NetBeans 下运行的 WildFly 8.1.0.Final 安装中,我不断收到以下看似随机的错误: 08:51:09,742 ERROR [io.undertow.request] (de
在 Wildfly 11 中部署 test.war 期间,我看到了一些警告: 09:45:32,714 WARN [org.jboss.weld.Validator] (MSC service th
我是一名优秀的程序员,十分优秀!