本文介绍了Arquillian:嵌入了Wildfly吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

直到现在,我已经使用Arquillian和嵌入式Glassfish 4.x运行集成测试.由于遭受错误 ARQ-1458 的困扰,我尝试了迁移到Wildfly 8.0.0.Beta1

Until now I had my integration tests running with Arquillian and an embedded Glassfish 4.x. As I suffer from bug ARQ-1458, I tried migrating to Wildfly 8.0.0.Beta1.

我在Maven的部门是:

My deps in Maven are:

<dependency>
    <groupId>org.jboss.arquillian</groupId>
    <artifactId>arquillian-bom</artifactId>
    <version>1.1.2.Final</version>
    <scope>import</scope>
    <type>pom</type>
</dependency>
<dependency>
    <groupId>org.jboss.arquillian.junit</groupId>
    <artifactId>arquillian-junit-container</artifactId>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-arquillian-container-embedded</artifactId>
    <version>8.0.0.Beta1</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>org.wildfly</groupId>
    <artifactId>wildfly-embedded</artifactId>
    <version>8.0.0.Beta1</version>
    <scope>test</scope>
</dependency>

运行测试时,出现jbossHome为null的错误.我没有arquillian.xml.当检查Github源中是否有嵌入的Wildfly-arquillian-container(POM)时,我想知道为什么嵌入式容器需要JBOSS_HOME?我知道对于托管和远程变体都具有它,但是为什么对于嵌入式变体却需要它呢?Arquillian页面上也仅包含将JBoss AS用作托管服务器的示例,因此我想知道是否完全有可能(但是为什么要在其中嵌入wildfly-arquillian-container?)?

When running my test, I get the error that jbossHome is null. I have NO arquillian.xml. When checking Github sources for wildfly-arquillian-container-embedded (POM), I wonder WHY an embedded container requires JBOSS_HOME? I understand to have it for the managed and remote variants, but why do I need it for an embedded one?The Arquillian pages also only have examples for JBoss AS as managed servers, so I wonder it it is possible at all (but why is there wildfly-arquillian-container-embedded then?)?

或者我应该使用maven-dependency-plugin来坚持使用托管容器来下载容器(请参见 http://arquillian.org/guides/getting_started/#add_more_containers -底部)?

Or should I stick to a managed container with using the maven-dependency-plugin to download the container (see http://arquillian.org/guides/getting_started/#add_more_containers - bottom)?

感谢和问候!

确切的错误是:


org.jboss.arquillian.container.spi.ConfigurationException: jbossHome 'null' must exist
    at org.jboss.arquillian.container.spi.client.deployment.Validate.configurationDirectoryExists(Validate.java:139)
    at org.jboss.as.arquillian.container.embedded.EmbeddedContainerConfiguration.validate(EmbeddedContainerConfiguration.java:102)
    at org.jboss.arquillian.container.impl.ContainerImpl.createDeployableConfiguration(ContainerImpl.java:115)
    at org.jboss.arquillian.container.impl.ContainerImpl.setup(ContainerImpl.java:181)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$7.perform(ContainerLifecycleController.java:149)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$7.perform(ContainerLifecycleController.java:145)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forContainer(ContainerLifecycleController.java:255)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.setupContainer(ContainerLifecycleController.java:144)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.container.impl.client.ContainerDeploymentContextHandler.createContainerContext(ContainerDeploymentContextHandler.java:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
    at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:62)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController$1.perform(ContainerLifecycleController.java:55)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.forEachContainer(ContainerLifecycleController.java:209)
    at org.jboss.arquillian.container.impl.client.container.ContainerLifecycleController.setupContainers(ContainerLifecycleController.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
    at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
    at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
    at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)

推荐答案

好吧,我猜想它与Wildfly的工作方式与Glassfish有所不同:

Well, I guess that it works differently w/ Wildfly than with Glassfish:

https://community.jboss.org/thread/236562

:(

Docker 在此问题上添加了另一种观点.我可以在仍然使用Arquillian的情况下使用Docker和Maven轻松管理外部容器.还没有测试,但是如果有人偶然发现了这个……

Docker adds another perspective on this issue. I could easily manage the external container using Docker and Maven while still using Arquillian. Did not test it yet, but if someone stumbles upon this...

这篇关于Arquillian:嵌入了Wildfly吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 00:18