gpt4 book ai didi

java - Jboss 7.1.1 非法参数异常 : Empty name segment is not allowed for env

转载 作者:行者123 更新时间:2023-11-29 03:17:22 25 4
gpt4 key购买 nike

我有

Failed to process phase INSTALL of deployment

(...)

Caused by: java.lang.IllegalArgumentException: Empty name segment is not allowed for env at org.jboss.msc.service.ServiceName.of(ServiceName.java:85) [jboss-msc-1.0.2.GA.jar:1.0.2.GA] at org.jboss.msc.service.ServiceName.append(ServiceName.java:112) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]

在 Arquillian 测试期间尝试部署包含 MDB 的 jar 时。如何解决?

最佳答案

我用了例子 Arquillian Testing JMS section

@Resource(mappedName = "/ConnectionFactory")
private ConnectionFactory factory;

看起来资源名称路径不能包含空部分。我添加了 jms 前缀,它部署得很好。

@Resource(mappedName = "java:/ConnectionFactory")
private ConnectionFactory factory;

关于java - Jboss 7.1.1 非法参数异常 : Empty name segment is not allowed for env,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25724060/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com