Graphene dependency causes failures when starting an embedded tomcat
anon123xxx Mar 16, 2015 1:20 PMHello,
I have a simple setup, investigating on Arquillian's automatic deployment of war files and subsequent testing. I have the following BOM dependencies:
<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> <dependency> <groupId>org.jboss.shrinkwrap.descriptors</groupId> <artifactId>shrinkwrap-descriptors-bom</artifactId> <version>2.0.0-alpha-7</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-bom</artifactId> <version>2.1.1</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.extension</groupId> <artifactId>arquillian-drone-bom</artifactId> <version>1.2.3.Final</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.selenium</groupId> <artifactId>selenium-bom</artifactId> <version>2.39.0</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
and the following artifact dependencies:
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</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.shrinkwrap.descriptors</groupId> <artifactId>shrinkwrap-descriptors-depchain</artifactId> <type>pom</type> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-depchain</artifactId> <type>pom</type> <scope>test</scope> </dependency> </dependencies>
And here are the dependencies of my tomcat maven profile:
<dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-tomcat-embedded-7</artifactId> <version>1.0.0.CR7</version> <scope>test</scope> </dependency> <!-- org.apache.tomcat --> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-core</artifactId> <version>7.0.XX</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-jasper</artifactId> <version>7.0.XX</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.tomcat.embed</groupId> <artifactId>tomcat-embed-logging-juli</artifactId> <version>7.0.XX</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.eclipse.jdt.core.compiler</groupId> <artifactId>ecj</artifactId> <version>3.7</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.resolver</groupId> <artifactId>shrinkwrap-resolver-impl-maven</artifactId> <scope>test</scope> </dependency>
As soon as I add a dependency to Graphene the embedded tomcat server that I use for testing (and works without the additional Graphene dependency), fails to start. Depending on the tomcat version I am using I am getting different error messages. With 7.0.28 I am getting:
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
And with 7.0.52/59 I am getting the following erro:
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader;
Here is the Graphene dependency in question:
<dependency> <groupId>org.jboss.arquillian.graphene</groupId> <artifactId>graphene-webdriver</artifactId> <version>2.0.1.Final</version> <type>pom</type> <scope>test</scope> </dependency>
And help will be greatly appreciated.