java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String..

7,499 views
Skip to first unread message

Zain Jamshaid

unread,
Sep 20, 2014, 12:28:50 PM9/20/14
to cu...@googlegroups.com
I am getting the following Error:

java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String;Ljava/io/Serializable;[Ljava/lang/annotation/Annotation;)Lorg/junit/runner/Description;
    at cucumber.runtime.junit.FeatureRunner.getDescription(FeatureRunner.java:43)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:84)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:40)
    at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:290)
    at org.junit.runner.Runner.testCount(Runner.java:38)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestClassReference.countTestCases(JUnit4TestClassReference.java:30)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.countTests(RemoteTestRunner.java:487)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:455)
    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)

Here is my POM.xml
<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>com.trial</groupId>
 
<artifactId>GreenApple</artifactId>
 
<version>0.0.1-SNAPSHOT</version>
 
<packaging>jar</packaging>

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

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

 
<dependencies>
<dependency>
           
<groupId>junit</groupId>
           
<artifactId>junit</artifactId>
           
<version>4.11</version>
           
<scope>test</scope>
       
</dependency>
       
<dependency>
           
<groupId>info.cukes</groupId>
           
<artifactId>cucumber-junit</artifactId>
           
<version>1.1.8</version>
       
</dependency>
       
<dependency>
           
<groupId>org.seleniumhq.selenium</groupId>
           
<artifactId>selenium-chrome-driver</artifactId>
           
<version>2.42.2</version>
       
</dependency>
       
<dependency>
           
<groupId>info.cukes</groupId>
           
<artifactId>cucumber-java</artifactId>
           
<version>1.1.8</version>
       
</dependency>  
       
<dependency>
   
<groupId>org.seleniumhq.selenium</groupId>
   
<artifactId>selenium-java</artifactId>
   
<version>2.42.2</version>
</dependency>
           
 
 
</dependencies>
 
 
</project>



Aslak Hellesøy

unread,
Sep 20, 2014, 3:07:02 PM9/20/14
to cu...@googlegroups.com

On Saturday, 20 September 2014 at 17:28, Zain Jamshaid wrote:

I am getting the following Error:

There was a thread about this very problem in the last month. You need junit 4.11 or higher. 
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Zain Jamshaid

unread,
Sep 20, 2014, 3:08:41 PM9/20/14
to cu...@googlegroups.com

I am already using 4.11... as you can see that in pom.xml

--
Sent from Samsung Galaxy S4

You received this message because you are subscribed to a topic in the Google Groups "Cukes" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cukes/et3rd_0LVRU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cukes+un...@googlegroups.com.

Aslak Hellesøy

unread,
Sep 20, 2014, 3:26:36 PM9/20/14
to cu...@googlegroups.com

On Saturday, 20 September 2014 at 20:08, Zain Jamshaid wrote:

I am already using 4.11... as you can see that in pom.xml

then some other lib is overrding with an older version. Try to find that thread. 

Robert

unread,
Sep 21, 2014, 1:16:17 AM9/21/14
to cu...@googlegroups.com


On Saturday, September 20, 2014 12:08:41 PM UTC-7, Zain Jamshaid wrote:

I am already using 4.11... as you can see that in pom.xml


try

$ mvn dependency:tree

to determine if you've got multiple instances of JUnit 

Charles Radley

unread,
Jul 8, 2016, 6:01:23 AM7/8/16
to Cukes

I have the same problem as above.

I am running junit 4.11.

I ran the mvn dependency tree but no sign of any junit conflict.

I have two similar cucumber projects in my eclipse with identical pom.xml files, one runs perfectly, the other generates that exception....

I cloned the second project from the first project.  The second project is generating the error.

any thoughts ?


java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String;Ljava/io/Serializable;[Ljava/lang/annotation/Annotation;)Lorg/junit/runner/Description;
    at cucumber.runtime.junit.FeatureRunner.getDescription(FeatureRunner.java:43)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:77)
    at cucumber.api.junit.Cucumber.describeChild(Cucumber.java:41)
    at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:290)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createUnfilteredTest(JUnit4TestLoader.java:85)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:70)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:43)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:444)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)


Vinoth Kannan

unread,
Jul 13, 2016, 12:15:11 PM7/13/16
to Cukes

i had the same problem, I solved it with the help of this group.

the above link is the my thread 

linda wu

unread,
Dec 7, 2016, 1:54:54 AM12/7/16
to Cukes


 Linda wrote:I had the same problem, I solved it with the help of this group.

Try to add "selenium-server-standalone-2.48.2.jar".

 

Himanshu Paliwal

unread,
May 11, 2018, 7:58:19 AM5/11/18
to Cukes
@Linka
I am still getting same error after adding Selenium Server Standalone.jar

Satish Veluru

unread,
Jan 10, 2020, 1:14:56 PM1/10/20
to Cukes

I had the same problem ... after running mvn dependency: tree .. i see different version of Junit . I get red of older version . then seems working now .
Reply all
Reply to author
Forward
0 new messages