3 Replies Latest reply on Feb 9, 2017 1:06 AM by Sharada Shyamsundar

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

    m.hristova Newbie

      Hello,

      I am new to Arquillian and I have some problems configurating my project.

       

      Here is the error I am getting:

      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.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)

        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)

        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Caused by: java.lang.reflect.InvocationTargetException

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

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)

        at java.lang.reflect.Constructor.newInstance(Unknown Source)

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

        ... 10 more

      Caused by: org.jboss.arquillian.container.impl.ContainerCreationException: Could not create Container jboss5

        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(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

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

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

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        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)

        ... 15 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)

        ... 39 more

       

      My pom.xml file is:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <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>org.arquillian.unit.test</groupId>

        <artifactId>arquillian-test</artifactId>

        <version>0.0.1-SNAPSHOT</version>

        <packaging>jar</packaging>

       

       

        <name>arquillian-test</name>

        <url>http://maven.apache.org</url>

       

       

        <properties>

          <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

        </properties>

        <dependencyManagement>

          <dependencies>

            <dependency>

              <groupId>org.jboss.arquillian</groupId>

              <artifactId>arquillian-bom</artifactId>

              <version>1.1.1.Final</version>

              <scope>import</scope>

              <type>pom</type>

            </dependency>

          </dependencies>

        </dependencyManagement>

        <build>

          <plugins>

            <plugin>

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

              <artifactId>maven-compiler-plugin</artifactId>

              <version>2.3.2</version>

              <configuration>

                <source>1.6</source>

                <target>1.6</target>

              </configuration>

            </plugin>

          </plugins>

        </build>

        <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>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>

          <!-- Simple Logging Facade for Java -->

          <dependency>

            <groupId>org.slf4j</groupId>

            <artifactId>slf4j-simple</artifactId>

            <version>1.6.4</version>

            <scope>test</scope>

          </dependency>

          <dependency>

            <groupId>javax.inject</groupId>

            <artifactId>javax.inject</artifactId>

            <version>1</version>

          </dependency>

        </dependencies>

        <profiles>

          <profile>

            <id>jbossas-managed-5.1</id>

            <dependencies>

              <dependency>

                <groupId>org.jboss.arquillian.container</groupId>

                <artifactId>arquillian-jbossas-managed-5.1</artifactId>

                <version>1.0.0.Alpha4</version>

              </dependency>

              <dependency>

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

                <artifactId>jboss-server-manager</artifactId>

                <version>1.0.3.GA</version>

              </dependency>

              <dependency>

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

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

                <version>5.1.0.GA</version>

                <type>pom</type>

              </dependency>

            </dependencies>

          </profile>

        </profiles>

      </project>

       

      My arquillian.xml file is:

       

      <?xml version="1.0" encoding="UTF-8"?>

      <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

        xmlns="http://jboss.org/schema/arquillian"

        xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">

       

       

        <container qualifier="jboss5" default="true">

          <configuration>

            <property name="jbossHome">D:\Java\jboss-5.1.0.GA</property>

            <property name="profileName">default</property>

          </configuration>

        </container>

      </arquillian>

       

      I would be more than happy if someone can help me.