2 Replies Latest reply: Nov 24, 2011 9:18 PM by Hiep Le Canh RSS

JBoss 7: DeploymentScenario contains targets not maching any defined Container in the registry. _DEFAULT_

Hiep Le Canh Newbie

I have just downloaded Arquillian example from

 

git://github.com/arquillian/arquillian.git arquillian

 

and run  this test: $ mvn test -Pjbossas-remote-6 successfully in JBoss 6.

 

To update to JBoss 7.0.2 Final, I have added this profile to :

 

<profile>

    <id>jbossas-remote-7</id>

    <dependencies>

        <dependency>

            <groupId>org.jboss.as</groupId>

            <artifactId>jboss-as-arquillian-container-remote</artifactId>

            <version>7.0.2.Final</version>                   

        </dependency>

         <dependency>

            <groupId>org.jboss.shrinkwrap</groupId>

            <artifactId>shrinkwrap-api</artifactId>

            <version>1.0.0-alpha-14-SNAPSHOT</version>

        </dependency>       

        <dependency>

            <groupId>org.jboss.shrinkwrap</groupId>

            <artifactId>shrinkwrap-impl-base</artifactId>

            <version>1.0.0-alpha-14-SNAPSHOT</version>

        </dependency>               

        <dependency>

            <!--

                Need on all profiles except Glassfish to compile, api is not 100%

                up to date with final spec

            -->

            <groupId>org.jboss.ejb3</groupId>

            <artifactId>jboss-ejb3-api</artifactId>

            <version>3.1.0</version>

        </dependency>

        <!--dependency>

            <groupId>org.jboss.jbossas</groupId>

            <artifactId>jboss-as-client</artifactId>

            <version>${version.jboss_60}</version>

            <type>pom</type>

        </dependency-->

    </dependencies>

    <build>

        <plugins>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-surefire-plugin</artifactId>

                <configuration>

                    <excludes>

                        <exclude>com/acme/cdi/conversation/*</exclude>

                    </excludes>

                </configuration>

            </plugin>

        </plugins>

    </build>

</profile>       

 

arquillian\arquillian\examples\junit\pom.xml.

 

But when I try to run that unittest in JBoss 7.0.2 Final (by using $ mvn test -Pjbossas-remote-7) I have this issue:

 

Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.583 sec <<< FAILURE!

com.acme.cdi.InjectionTestCase  Time elapsed: 0 sec  <<< ERROR!

org.jboss.arquillian.impl.client.deployment.ValidationException: DeploymentScenario contains targets not maching any defined Container in the registry. _DEFAULT_

    at org.jboss.arquillian.impl.client.deployment.DeploymentGenerator.validate(DeploymentGenerator.java:95)

    at org.jboss.arquillian.impl.client.deployment.DeploymentGenerator.generateDeployment(DeploymentGenerator.java:77)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

    at org.jboss.arquillian.impl.core.ObserverImpl.invoke(ObserverImpl.java:90)

    at org.jboss.arquillian.impl.core.EventContextImpl.invokeObservers(EventContextImpl.java:98)

    at org.jboss.arquillian.impl.core.EventContextImpl.proceed(EventContextImpl.java:80)

    at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:126)

    at org.jboss.arquillian.impl.core.ManagerImpl.fire(ManagerImpl.java:106)

    at org.jboss.arquillian.impl.core.EventImpl.fire(EventImpl.java:67)

    at org.jboss.arquillian.impl.client.ContainerEventController.execute(ContainerEventController.java:68)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

    at java.lang.reflect.Method.invoke(Method.java:597)

 

If you how to fix it, please let me know.

 

Thanks

Hiep