首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用WindowBeanHolder的Arquillian配置DeploymentException

使用WindowBeanHolder的Arquillian配置DeploymentException
EN

Stack Overflow用户
提问于 2015-10-16 19:27:38
回答 1查看 671关注 0票数 4

我正在构建一个测试套件,以便在arquillian上执行它们。我遵循了这个Arquillian's starting guide我正在使用这个gradle来测试我的测试:

代码语言:javascript
复制
providedCompile 'org.jboss.spec:jboss-javaee-7.0:1.0.3.Final'

testCompile 'junit:junit:4.12'
testCompile 'org.hamcrest:hamcrest-junit:2.0.0.0'
testCompile 'org.jglue.cdi-unit:cdi-unit:3.1.3'
testCompile 'org.mockito:mockito-core:2.0.31-beta'
testCompile 'eu.codearte.catch-exception:catch-exception:2.0.0-ALPHA-1'
testCompile 'com.jayway.restassured:rest-assured:2.6.0'
testCompile 'com.carrotsearch:junit-benchmarks:0.7.2'

testCompile 'org.jboss.arquillian.junit:arquillian-junit-container:1.1.9.Final'
testCompile 'org.jboss.arquillian:arquillian-bom:1.1.9.Final'
testCompile 'org.jboss.arquillian.container:arquillian-weld-ee-embedded-1.1:1.0.0.CR9'
testCompile 'org.jboss.weld:weld-core:2.3.0.Final'
testCompile 'org.jboss.shrinkwrap:shrinkwrap-depchain:1.2.2'
testCompile 'org.apache.deltaspike.core:deltaspike-core-api:1.5.0'
testCompile 'org.apache.deltaspike.core:deltaspike-core-impl:1.5.0'
testCompile 'org.slf4j:slf4j-simple:1.7.12'

当我从Eclipse执行测试时:

它抛出了我一个异常:

代码语言:javascript
复制
<configuration>
    <appSettings>
        <add key="environment" value="developmentorg.jboss.weld.exceptions.DeploymentException: Exception List with 1 exceptions:
        Exception 0 :
        java.lang.IllegalStateException: Could not find beans for Type=class org.apache.deltaspike.core.impl.scope.window.WindowBeanHolder and qualifiers:[]
            at org.apache.deltaspike.core.api.provider.BeanProvider.getContextualReference(BeanProvider.java:150)
            at org.apache.deltaspike.core.impl.scope.DeltaSpikeContextExtension.initializeDeltaSpikeContexts(DeltaSpikeContextExtension.java:85)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
EN

回答 1

Stack Overflow用户

发布于 2016-12-30 05:33:55

添加

代码语言:javascript
复制
.addPackages(true, "org.apache.deltaspike")

到ShrinkWrap代码。

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

https://stackoverflow.com/questions/33169361

复制
相关文章

相似问题

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