8 Replies Latest reply on Oct 2, 2016 6:27 PM by ebuzer taha kanat

    ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work

    raba Newbie

      Hello,

       

      I have a problem with my test call. I*m getting alway this Exception an I didn't find a solutin. Can anyone help my with this Exception ??

       

      I want to test a stateless bean on a jboss as 7.1 therefore i use the jboss-as-arquillian-container-remote

       

      Here is my pom.xml with the profile of the arquillian-remote

       

       

      <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
        <groupId>de.htwg.prozessserver</groupId>
        <artifactId>ejbProzessserver</artifactId>
        <version>1.0-SNAPSHOT</version>
        <name>EJB3 Prozesserver</name>
        <packaging>ejb</packaging>
        
          <properties>
          
                    <!-- JBOSs_HOME mention  your JBOSS_HOME directory-->
          
                    <jboss-as.home>C:\jboss-as-7.1.1.Final</jboss-as.home> 
              <!-- Explicitly declaring the source encoding eliminates the following
                  message: -->
              <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
                  resources, i.e. build is platform dependent! -->
              <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
      
              <!-- JBoss dependency versions -->
              <version.org.jboss.as.plugins.maven.plugin>7.3.Final</version.org.jboss.as.plugins.maven.plugin>
              <version.org.jboss.spec.jboss.javaee.6.0>3.0.0.Final</version.org.jboss.spec.jboss.javaee.6.0>
      
              <!-- other plugin versions -->
              <version.compiler.plugin>2.3.1</version.compiler.plugin>
              <version.ejb.plugin>2.3</version.ejb.plugin>
      
              <!-- maven-compiler-plugin -->
              <maven.compiler.target>1.6</maven.compiler.target>
              <maven.compiler.source>1.6</maven.compiler.source>
      
              <!-- Optional: to use jboss-as:run goal -->
              <!--<jboss-as.home>C:\Users\iByteCode\Desktop\jboss-as-7.1.0.Final</jboss-as.home> -->
          </properties>
      
          <dependencyManagement>
              <dependencies>
              
              
                        <dependency>
                            <groupId>org.jboss.arquillian</groupId>
                            <artifactId>arquillian-bom</artifactId>
                            <version>1.0.3.Final</version>
                            <scope>import</scope>
                            <type>pom</type>
                        </dependency>
              
              
              
                  <!-- Define the version of JBoss' Java EE 6 APIs we want to use -->
                  <!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill
                      of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection)
                      of artifacts. We use this here so that we always get the correct versions
                      of artifacts. Here we use the jboss-javaee-6.0 stack (you can read this as
                      the JBoss stack of the Java EE 6 APIs). You can actually use this stack with
                      any version of JBoss AS that implements Java EE 6, not just JBoss AS 7! -->
                  <dependency>
                      <groupId>org.jboss.spec</groupId>
                      <artifactId>jboss-javaee-6.0</artifactId>
                      <version>${version.org.jboss.spec.jboss.javaee.6.0}</version>
                      <type>pom</type>
                      <scope>import</scope>
                  </dependency>
              </dependencies>
          </dependencyManagement>
      
          <dependencies>
          
                              <dependency>
                            <groupId>junit</groupId>
                            <artifactId>junit</artifactId>
                            <version>4.8.1</version>
                            <scope>test</scope>
                        </dependency>
          
          
                                     <dependency>
                                        <groupId>org.jboss.arquillian.junit</groupId>
                                        <artifactId>arquillian-junit-container</artifactId>
                                        <scope>test</scope>
                                    </dependency>
          
          
                              <!-- <dependency>
                      <groupId>org.jboss.weld</groupId>
                      <artifactId>weld-core</artifactId>
                      <version>1.1.5.Final</version>
                      <scope>test</scope>
                  </dependency> -->
          
                              <!-- <dependency>
                      <groupId>org.jboss.arquillian.container</groupId>
                      <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                      <version>1.0.0.CR3</version>
                      <scope>test</scope>
                  </dependency> -->
          
          
                           <!-- <dependency>
                                    <groupId>org.jboss.spec</groupId>
                                    <artifactId>jboss-javaee-6.0</artifactId>
                                    <version>1.0.0.Final</version>
                                    <type>pom</type>
                                    <scope>provided</scope>
                          </dependency> -->
        
                          <!-- 
                          <dependency>
                   <groupId>org.slf4j</groupId>
                   <artifactId>slf4j-simple</artifactId>
                   <version>1.6.4</version>
                   <scope>test</scope>
               </dependency> -->
        
        
                    
                   <!--  <dependency>
                        <groupId>commons-lang</groupId>
                        <artifactId>commons-lang</artifactId>
                        <version>1.0</version>
                     </dependency> -->
          
              <dependency>
                  <groupId>org.hibernate</groupId>
                  <artifactId>hibernate-entitymanager</artifactId>
                           <version>4.2.3.Final</version>
               </dependency> 
      
      
      
      
                          <dependency>
                                    <groupId>org.hibernate</groupId>
                                    <artifactId>hibernate-core</artifactId>
                                    <version>4.2.3.Final</version>
                           </dependency>
      
              <!-- Import the Common Annotations API (JSR-250), we use provided scope
                  as the API is included in JBoss AS 7 -->
              <dependency>
                  <groupId>org.jboss.spec.javax.annotation</groupId>
                  <artifactId>jboss-annotations-api_1.1_spec</artifactId>
                  <scope>provided</scope>
              </dependency>
      
              <!-- Import the EJB 3.1 API, we use provided scope as the API is included
                  in JBoss AS 7 -->
              <dependency>
                  <groupId>org.jboss.spec.javax.ejb</groupId>
                  <artifactId>jboss-ejb-api_3.1_spec</artifactId>
                  <scope>provided</scope>
              </dependency>
             </dependencies>
              
             <profiles>
                        <profile>
                            <id>arquillian-weld-ee-embedded</id>
                            <dependencies>
                                <dependency>
                                    <groupId>org.jboss.spec</groupId>
                                    <artifactId>jboss-javaee-6.0</artifactId>
                                    <version>1.0.0.Final</version>
                                    <type>pom</type>
                                    <scope>provided</scope>
                                </dependency>
                                <dependency>
                                    <groupId>org.jboss.arquillian.container</groupId>
                                    <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>
                                    <version>1.0.0.CR5</version>
                                    <scope>test</scope>
                                </dependency>
                                <dependency>
                                    <groupId>org.jboss.weld</groupId>
                                    <artifactId>weld-core</artifactId>
                                    <version>1.1.9.Final</version>
                                    <scope>test</scope>
                                </dependency>
                                              </dependencies> 
                    </profile>
                     <profile>
                            <id>arquillian-jbossas-managed</id>
                            <dependencies>
                                <dependency>
                                    <groupId>org.jboss.spec</groupId>
                                    <artifactId>jboss-javaee-6.0</artifactId>
                                    <version>1.0.0.Final</version>
                                    <type>pom</type>
                                    <scope>provided</scope>
                                </dependency>
                                <dependency>
                                    <groupId>org.jboss.as</groupId>
                                    <artifactId>jboss-as-arquillian-container-managed</artifactId>
                                    <version>7.1.1.Final</version>
                                    <scope>test</scope>
                                </dependency>
                                <dependency>
                                    <groupId>org.jboss.arquillian.protocol</groupId>
                                    <artifactId>arquillian-protocol-servlet</artifactId>
                                    <scope>test</scope>
                                </dependency>
                            </dependencies>
                           </profile>
        
                            <profile>
                  <id>arquillian-jbossas-remote</id>
                  <dependencies>
                      <dependency>
                          <groupId>org.jboss.spec</groupId>
                          <artifactId>jboss-javaee-6.0</artifactId>
                          <version>1.0.0.Final</version>
                          <type>pom</type>
                          <scope>provided</scope>
                      </dependency>
                      <dependency>
                          <groupId>org.jboss.as</groupId>
                          <artifactId>jboss-as-arquillian-container-remote</artifactId>
                          <version>7.1.1.Final</version>
                          <scope>test</scope>
                      </dependency>
                     <!--  <dependency>
                          <groupId>org.jboss.arquillian.protocol</groupId>
                          <artifactId>arquillian-protocol-servlet</artifactId>
                          <scope>test</scope>
                      </dependency> -->
                  </dependencies>
              </profile>
        
        
                 </profiles>
          <build>
              <!-- Set the name of the deployment -->
              <plugins>
                  <!-- JBoss AS plugin to deploy the application -->
                  <!--  The jboss-as-maven-plugin is used to deploy, redeploy, undeploy or run your application in JBoss AS. 
                  Under the configuration we specify the build file name same as the project build filename which 
                  is by default of the form “artifactid-version” in our case “ejbmavendemo-1.0-SNAPSHOT”.-->
                  <plugin>
                      <groupId>org.jboss.as.plugins</groupId>
                      <artifactId>jboss-as-maven-plugin</artifactId>
                      <version>${version.org.jboss.as.plugins.maven.plugin}</version>
                      <configuration>
                          <filename>${project.build.finalName}.jar</filename>
                      </configuration>
                  </plugin>
                  <!-- Compiler plugin enforces Java 1.6 compatibility and activates annotation
                      processors -->
                      
                   <!-- The maven-compiler-plugin is used to compile the sources of your project. In the above pom.xml we 
                   have used the version 2.3.1 of the plugin with the source and target JDK set to 1.6 under configuration.
                               We have defined these settings as properties inside <properties> tag and referring it through ${property}.
                                                                  -->
                  <plugin>
                      <artifactId>maven-compiler-plugin</artifactId>
                      <version>${version.compiler.plugin}</version>
                      <configuration>
                          <source>${maven.compiler.source}</source>
                          <target>${maven.compiler.target}</target>
                      </configuration>
                  </plugin>
                  
                  
                  <plugin>
                      <artifactId>maven-surefire-plugin</artifactId>
                      <version>2.12</version>
                  </plugin>
                  
                  
                   <!--This plugin generates J2EE Enterprise Javabean (EJB) file as well as the associated client jar. 
                   We specify the ejb version as 3.1 and request the plugin to generate the client by setting the 
                   “generateClient” property to true.  -->
                  
                  <plugin>
                      <groupId>org.apache.maven.plugins</groupId>
                      <artifactId>maven-ejb-plugin</artifactId>
                      <version>${version.ejb.plugin}</version>
                      <configuration>
                          <ejbVersion>3.1</ejbVersion>
                          <!-- this is false by default -->
                          <generateClient>true</generateClient>
                      </configuration>
                  </plugin>
              </plugins>
          </build>
      </project>
      
      

       

      And here ist my Stateless bean i want to test

       

       

      @Stateless
      @LocalBean
      public class NutzerverwaltungBean implements NutzerverwaltungRemote {
      
      
      
      
        
        @PersistenceContext(unitName ="ProzessServer")
        EntityManager em;
      
       /**
         * Default constructor.
         */
        public NutzerverwaltungBean() {
          // TODO Auto-generated constructor stub
        }
      
      
       @Override
        public boolean anmeldung(String benutzerName, String passwort) {
          
          
            
            Query q = em.createQuery("select a from Benutzer a  Where Benutzername = :qname");
            
            q.setParameter("qname", benutzerName);
            
             Benutzer resultBenutzer = (Benutzer)q.getSingleResult();
             if(resultBenutzer != null){
                 
                 if(resultBenutzer.getPasswort().equals(passwort)){
                   
                   return true;
                 }
             }
           
            return false; 
         
        }
      
      

       

      And here is my test class

       

       

      package de.htwg.prozessserver.test.arquillian;
      
      
      import javax.ejb.EJB;
      
      
      import org.junit.Assert;
      import org.jboss.arquillian.container.test.api.Deployment;
      import org.jboss.arquillian.junit.Arquillian;
      import org.jboss.arquillian.junit.InSequence;
      import org.jboss.shrinkwrap.api.ArchivePaths;
      import org.jboss.shrinkwrap.api.ShrinkWrap;
      import org.jboss.shrinkwrap.api.asset.EmptyAsset;
      import org.jboss.shrinkwrap.api.spec.JavaArchive;
      import org.junit.Test;
      import org.junit.runner.RunWith;
      
      
      import de.htwg.prozessserver.NutzerverwaltungBean;
      
      
      
      
      
      
      
      
      
      
      
      
      
      
      @RunWith(Arquillian.class)
      public class NutzerverwaltungBeanTest{
      
      
        @Deployment
        public static JavaArchive createDeployment() {
            JavaArchive jar = ShrinkWrap.create(JavaArchive.class)
                .addClass(NutzerverwaltungBean.class)
                .addAsResource("test-persistence.xml", "META-INF/persistence.xml")
                .addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
            // System.out.println(jar.toString(true));
            return jar;
        }
      
      
          @EJB
          NutzerverwaltungBean nutzer;
      
      
          @Test
          public void anmeldung_benutzer() {
            
            if(nutzer == null){
            Assert.assertTrue("Peti",nutzer.anmeldung("peti","1234"));
            Assert.assertTrue("Mo", nutzer.anmeldung("mo","8vfbole"));
            Assert.assertTrue("Schweini", nutzer.anmeldung("schweini","31"));
            Assert.assertFalse("Tshirt", nutzer.anmeldung("Tshir","Time"));
            Assert.assertTrue("FcbTrainer",nutzer.anmeldung("FcBTrainer","triple"));
            Assert.assertFalse("fcb",nutzer.anmeldung("fcb","1234"));
            Assert.assertFalse("Stuttgarter" ,nutzer.anmeldung("Stuttgarter","canstatt"));
            }
          }
      }
      
      

       

      I hope anyone can help me with that.

       

      Thanks a lot.

        • 2. Re: ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work
          raba Newbie

          Here is the Exception

           

           

          de.htwg.prozessserver.test.arquillian.NutzerverwaltungBeanTest  Time elapsed: 0.558 sec  <<< ERROR!

          java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor

                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:160)

                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:111)

                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:97)

                    at org.jboss.arquillian.test.spi.TestRunnerAdaptorBuilder.build(TestRunnerAdaptorBuilder.java:52)

                    at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:93)

                    at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:236)

                    at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:134)

                    at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:113)

                    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:601)

                    at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

                    at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

                    at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

                    at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:103)

                    at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)

          Caused by: java.lang.reflect.InvocationTargetException

                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:156)

                    ... 16 more

          Caused by: org.jboss.arquillian.container.impl.ContainerCreationException: Could not create Container jbossas-managed

                    at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:85)

                    at org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:76)

                    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:601)

                    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)

                    at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:236)

                    at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)

                    at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:68)

                    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:601)

                    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)

                    at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:261)

                    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:56)

                    ... 21 more

          Caused by: java.lang.IllegalArgumentException: DeployableContainer must be specified

                    at org.jboss.arquillian.core.spi.Validate.notNull(Validate.java:44)

                    at org.jboss.arquillian.container.impl.ContainerImpl.<init>(ContainerImpl.java:71)

                    at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:76)

                    ... 45 more

          Caused by: java.lang.reflect.InvocationTargetException

                    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)

                    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

                    at java.lang.reflect.Constructor.newInstance(Constructor.java:525)

                    at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:156)

                    ... 16 more

          Caused by: org.jboss.arquillian.container.impl.ContainerCreationException: Could not create Container jbossas-managed

                    at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:85)

                    at org.jboss.arquillian.container.impl.client.container.ContainerRegistryCreator.createRegistry(ContainerRegistryCreator.java:76)

                    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:601)

                    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)

                    at org.jboss.arquillian.core.impl.ManagerImpl.bindAndFire(ManagerImpl.java:236)

                    at org.jboss.arquillian.core.impl.InstanceImpl.set(InstanceImpl.java:74)

                    at org.jboss.arquillian.config.impl.extension.ConfigurationRegistrar.loadConfiguration(ConfigurationRegistrar.java:68)

                    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:601)

                    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)

                    at org.jboss.arquillian.core.impl.ManagerImpl.start(ManagerImpl.java:261)

                    at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.<init>(EventTestRunnerAdaptor.java:56)

                    ... 21 more

          Caused by: java.lang.IllegalArgumentException: DeployableContainer must be specified

                    at org.jboss.arquillian.core.spi.Validate.notNull(Validate.java:44)

                    at org.jboss.arquillian.container.impl.ContainerImpl.<init>(ContainerImpl.java:71)

                    at org.jboss.arquillian.container.impl.LocalContainerRegistry.create(LocalContainerRegistry.java:76)

                    ... 45 more

          • 3. Re: ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work
            Joshua Davis Expert

            I've had this problem before.   I resolved it by ensuring that my arquillian.xml file had only one container with default="true".

             

            I had been messing around with jboss-as-managed and jboss-as-remote and I left the two container elements with default="true".    Removing the redundant element resolved the issue.

            • 4. Re: ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work
              Joshua Davis Expert

              Alsak,

               

              In my case I had more than one <container> with default="true" in my arquillian.xml file and I got the same exception.   Maybe arquillian should check for that and produce a more straightforward error?   Just a thought.

              • 6. Re: ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work
                Aslak Knutsen Master

                Looks like you simply forgot to activate the Maven Profile when you run your test.

                 

                 

                mvn clean install -Parquillian-jbossas-remote

                • 7. Re: ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work
                  Joshua Davis Expert

                  Maybe... but it was fixed by marking only one as default.   I do see the code there... that totally makes sense.   I did not see that exception message however.   Still an Arquillian beginner.

                  • 8. Re: ava.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.test.impl.EventTestRunnerAdaptor Test didn't work
                    ebuzer taha kanat Newbie

                    If you trying to run your test with run as junit test, add to your jbossas-remote profile this:

                     

                     

                    <activation>

                                    <activeByDefault>true</activeByDefault>

                    </activation>

                     

                    This way your maven integrated ide will use your profile automatically with your tests.