This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

java.lang.NoClassDefFoundError: io/cucumber/core/options/CucumberOptionsAnnotationParser$OptionsProvider

Hello all,

I am trying to run a simple UFT Developer test with cucumber framework, and I am using UFT version 2021.1.0. The tests are running fine if we run directly from the IDE (IntelliJ IDEA), but not running in Jenkins agent.

Additionally, I can run the tests from IDE in the agent machine with no issues, but not working when we trigger from Jenkins job, and getting plug-in issue.

java.lang.NoClassDefFoundError: io/cucumber/core/options/CucumberOptionsAnnotationParser$OptionsProvider.

Got the below issue earlier, and removed all io.cucumber packages in the dependencies so system would use versions part of com.hp.lft packages. Now, getting the above issue.

java.lang.IllegalArgumentException: The plugin specification 'com.hp.lft.cucumberv4.CucumberReporter' has a problem: Could not load plugin class 'com.hp.lft.cucumberv4.CucumberReporter'.

I have all the plug-ins loaded, and no issues in local. Is there any known issue on this for Jenkins or anything I am missing. Appreciate any inputs.

Using below dependencies: microfocus-uft-version = 2021.1.0

<dependencies>
        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>sdk</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>common</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>report</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>reportbuilder</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>unittesting</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>verifications</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>com.hp.lft</groupId>
            <artifactId>cucumberv4</artifactId>
            <version>${microfocus-uft-version}</version>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.2</version>
        </dependency>

        <dependency>
            <groupId>com.microfocus.adm.almoctane.bdd</groupId>
            <artifactId>octane-cucumber-jvm</artifactId>
            <version>${microfocus-octane-cucumber-version}</version>
        </dependency>
        
    </dependencies>

Thanks.

  • Verified Answer

    +1

    Incase, if anyone needed. The issue is again with the conflict of versions. 

    Whatever versions supported by UFT Developer artifacts (from packages com.hp.lft) are not supporting latest cucumber-java and cucumber-junit versions, not sure what is the most latest version supporting here as I have tried with 7.8.1 and some versions below too but no luck.

    Finally used some old version cucumber-java 4.2.6 which is working fine.

    If LeanFT reporter API is not using the inbuilt dependencies, not sure why it's rejecting the externally specified recent versions too. But expecting the dependencies to be added with some working version (which we need to find using trial/error) is making this hard.

    Anyway, if anyone is facing any of the errors specified in the question, you know what could be the culprit.