4 Replies Latest reply on Sep 24, 2013 11:25 AM by Lukáš Fryč

    Graphene incompatible with SeleniumDrone?

    b69 Newbie

      Hi,

      I need some help.

      Starting point:

      Running within Eclipse Kepler IDE, with java 6 on windows 7-64 professional. The aim is to have additional browser GUI tests using Graphene.

      I added the Graphene definition to my pom in a separated profile. If I activate this profile, I get the following Exceptions running my existing JUnit. If I disable the profile, everything is working as expected, using glassfish embedded container.

       

      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(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at org.jboss.arquillian.test.spi.SecurityActions.newInstance(SecurityActions.java:156) ... 10 more Caused by: java.lang.RuntimeException: Could not create new instance of class org.jboss.arquillian.core.impl.ManagerImpl at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:160) at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:111) at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:97) at org.jboss.arquillian.core.spi.ManagerBuilder.create(ManagerBuilder.java:77) at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.(EventTestRunnerAdaptor.java:55) ... 15 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:526) at org.jboss.arquillian.core.spi.SecurityActions.newInstance(SecurityActions.java:156) ... 19 more Caused by: java.lang.NoClassDefFoundError: org/jboss/arquillian/drone/spi/Enhancer at org.jboss.arquillian.graphene.GrapheneExtension.register(GrapheneExtension.java:53) at org.jboss.arquillian.core.impl.loadable.LoadableExtensionLoader.load(LoadableExtensionLoader.java:78) 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:606) 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.fireProcessing(ManagerImpl.java:316) at org.jboss.arquillian.core.impl.ManagerImpl.(ManagerImpl.java:98) ... 24 more Caused by: java.lang.ClassNotFoundException: org.jboss.arquillian.drone.spi.Enhancer at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 37 more

       

      Pom Configuration (partial):

       

          <version.org.jboss.arquillian>1.1.1.Final</version.org.jboss.arquillian>
         <version.org.jboss.arquillian.extension.drone>1.1.1.Final</version.org.jboss.arquillian.extension.drone>
         <version.org.jboss.arquillian.selenium>2.35.0</version.org.jboss.arquillian.selenium>
         <version.org.jboss.arquillian.graphene>2.0.0.Beta1</version.org.jboss.arquillian.graphene>

       

      within dependencyManagement I declare among other:

      <dependency>

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

                      <artifactId>arquillian-bom</artifactId>

                      <version>${version.org.jboss.arquillian}</version>

                      <scope>import</scope>

                      <type>pom</type>

                  </dependency>

                  <dependency>

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

                      <artifactId>arquillian-drone-bom</artifactId>

                      <version>${version.org.jboss.arquillian.extension.drone}</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

                  <dependency>

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

                      <artifactId>selenium-bom</artifactId>

                      <version>${version.org.jboss.arquillian.selenium}</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

      <!--            

                  <dependency>

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

                      <artifactId>graphene-webdriver</artifactId>

                      <version>${version.org.jboss.arquillian.graphene}</version>

                      <type>pom</type>

                      <scope>import</scope>

                  </dependency>

      -->

       

      The Profiles are:

      <profile>

          <id>Graphene</id>

          <activation>

              <activeByDefault>true</activeByDefault>

          </activation>

          <dependencies>

              <dependency>

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

                  <artifactId>graphene-webdriver-api</artifactId>

                  <version>${version.org.jboss.arquillian.graphene}</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

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

                  <artifactId>graphene-webdriver-spi</artifactId>

                  <version>${version.org.jboss.arquillian.graphene}</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

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

                  <artifactId>graphene-webdriver-impl</artifactId>

                  <version>${version.org.jboss.arquillian.graphene}</version>

                  <scope>test</scope>

              </dependency>

              <dependency>

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

                  <artifactId>arquillian-drone-webdriver-depchain</artifactId>

                  <type>pom</type>

              </dependency>

          </dependencies>

      </profile>

      <profile>

          <id>SeleniumDrone</id>

          <activation>

              <activeByDefault>true</activeByDefault>

          </activation>

          <dependencies>

              <dependency>

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

                  <artifactId>arquillian-drone-impl</artifactId>

                  <scope>test</scope>

              </dependency>

              <dependency>

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

                  <artifactId>arquillian-drone-selenium</artifactId>

                  <scope>test</scope>

              </dependency>

              <dependency>

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

                  <artifactId>arquillian-drone-selenium-server</artifactId>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.seleniumhq.selenium</groupId>

                  <artifactId>selenium-java</artifactId>

                  <scope>test</scope>

              </dependency>

              <dependency>

                  <groupId>org.seleniumhq.selenium</groupId>

                  <artifactId>selenium-server</artifactId>

                  <scope>test</scope>

                  <exclusions>

                      <exclusion>

                          <groupId>org.mortbay.jetty</groupId>

                          <artifactId>servlet-api-2.5</artifactId>

                      </exclusion>

                  </exclusions>

              </dependency>

          </dependencies>

      </profile>

       

      Of course there is an ArquillianTest profile and the profile for the embedded glassfish. As everything works on setting the Graphene profile to false, I think those other declarations doesn't matter.

      Maybe you saw the version declaration within the Graphene profile. Those are also required if the declaration in the depenencyManagment part is not commented out.

      Why, I don't understand. What is wrong, where is the incompatibility? Wrong jar version? or 2 different versions of the same jar?

       

      Thanks for any hint.