在arquillian.xml中包含注释块会导致错误

时间:2013-10-19 08:16:24

标签: xml java-ee glassfish jboss-arquillian

我有以下arquillian.xml文件用于指定Glassfish资源文件的位置:

<?xml version="1.0" encoding="UTF-8"?>
<arquillian xmlns="http://jboss.org/schema/arquillian"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://jboss.org/schema/arquillian
    http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

<container qualifier="glassfish-embedded" default="true">
    <configuration>
        <property name="resourcesXml">
            src/test/resources-glassfish-embedded/glassfish-resources.xml
        </property>
    </configuration>
</container>

<!-- <glassfish:container>
         <glassfish:instanceRoot>src/test/resources/glassfish</glassfish:instanceRoot>
         <glassfish:bindPort>9090</glassfish:bindPort>
         <glassfish:autoDelete>false</glassfish:autoDelete>
     </glassfish:container>-->

当我尝试运行测试时,出现错误:

Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor

我对整个项目进行更改,即删除上面显示的注释块,测试运行没有错误。

这种行为的原因是什么?这是一个应该报告的错误吗?

1 个答案:

答案 0 :(得分:0)

几年前,Alpha4中删除了定义配置的“glassfish:container”命名空间样式。正确的形式是

<container qualifier="">