0

I have Java API project which is working fine few days back. Today I refreshed my gradle build file and suddenly facing

java.lang.NoClassDefFoundError: org/openqa/selenium/support/pagefactory/FieldDecorator

issue.

I have tried to update my build.gradle file but didn't work for me.

build.gradle file:

dependencies {
    compile(
            'org.codehaus.groovy:groovy-all:2.4.11',
            'com.google.guava:guava:23.0',
            'org.apache.poi:poi:3.17',
            'org.apache.poi:poi-ooxml:3.17',
            'org.apache.poi:poi-scratchpad:3.17'


           )

    testCompile(
            'net.serenity-bdd:serenity-rest-assured:1.8.21',
            'net.serenity-bdd:serenity-core:1.8.6',
            'net.serenity-bdd:serenity-junit:1.8.6',
            'net.serenity-bdd:serenity-cucumber:1.6.7',
            'org.assertj:assertj-core:3.8.0',           
            'info.cukes:gherkin:2.12.2',
            'junit:junit:4.12',
            'org.apache.commons:commons-lang3:3.7',
            'com.opencsv:opencsv:3.7'`
MarianD
  • 13,096
  • 12
  • 42
  • 54
  • is this the package you are looking for `org.openqa.selenium.support.pagefactory.FieldDecorator`? – Vishrant Aug 07 '18 at 17:47
  • I don't know why I am getting above error suddenly. My java api project working fine till yesterday. today i have update my project using ` gradle --> refresh` from eclipse and now i am facing above issue. –  Aug 07 '18 at 18:33
  • This might have the answer you're looking for, https://stackoverflow.com/questions/17973970/how-to-solve-java-lang-noclassdeffounderror – Jonathan Buelow Aug 07 '18 at 20:22
  • Search your source code for the word `decorate` https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/support/pagefactory/FieldDecorator.html – Bill Hileman Aug 08 '18 at 14:39
  • Able to resolve it after updating dependencies –  Sep 03 '18 at 14:29

0 Answers0