Skip to content

[Spring] Exception is thrown complaining about multiple matching beans with version 1.2.5 #1225

@EugeneS30

Description

@EugeneS30

In the process of transitioning from version Cucumber 1.1.8 to 1.2.5 I have ran into an issue where the below exception is thrown:

CucumberException No qualifying bean of type x is defined: expected single matching bean but found 2

I tried to dig a bit deeper and I see that the <T> T getInstance(final Class<T> type) method in SpringFactory class had changed and apparently is somehow responsible for that behavior.

I was able to replicate this behavior in a simple project which I uploaded to github and the link is below.

Cucumber Version: 1.2.5
Operating System and version: Windows 7
Link to your project: https://github.com/EugeneS30/cucumber-bean-defect-verification.git

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions