Discussion:
[Cucumber] CucumberException No qualifying bean of type x is defined: expected single matching bean but found 2
(too old to reply)
Eugene Shragovich
2017-09-15 08:12:23 UTC
Permalink
Raw Message
Greetings all,

I am in the process of transitioning from Cucumber JVM *1.1.8 *to *1.2.5*.
At the moment, if I run the tests with the 1.1.8 all is good but when I
change the version to 1.25 I get this exception:

cucumber.runtime.CucumberException: No qualifying bean of type
[au.com.company.test.functional.hook.ClearCookiesHook] is defined: expected
single matching bean but found 2:
clearCookiesHook,au.com.company.test.functional.hook.ClearCookiesHook


I know that this is essentially a Spring exception but, as I mentioned,
this configuration works fine when Cucumber 1.1.8 is set and haven't
changed anything else.

I tried to dig a bit deeper based on my abilities 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.


Any help will be greatly appreciated.


Thanks,
Eugene
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
MP Korstanje
2017-09-17 07:34:26 UTC
Permalink
Raw Message
Hey Eugene,

based on the information you've provided right now it is impossible for me
to tell what goes wrong. Could you create a minimal complete verifyable
example <https://stackoverflow.com/help/mcve> and log an issue in github?
We've recently also released cucumber-jvm 2.0.0 so once you have created
the mcve, could you try to upgrade it to 2.0.0 (note that the groupId has
change to io.cucumber) to see if the issue persists?

Best,
MP
Post by Eugene Shragovich
Greetings all,
I am in the process of transitioning from Cucumber JVM *1.1.8 *to *1.2.5*
.
At the moment, if I run the tests with the 1.1.8 all is good but when I
cucumber.runtime.CucumberException: No qualifying bean of type
[au.com.company.test.functional.hook.ClearCookiesHook] is defined: expected
clearCookiesHook,au.com.company.test.functional.hook.ClearCookiesHook
I know that this is essentially a Spring exception but, as I mentioned,
this configuration works fine when Cucumber 1.1.8 is set and haven't
changed anything else.
I tried to dig a bit deeper based on my abilities 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.
Any help will be greatly appreciated.
Thanks,
Eugene
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Eugene Shragovich
2017-09-18 04:35:31 UTC
Permalink
Raw Message
Hi MP,

Thank you very much for your reply!

I have created a simple project where I was able to reproduce the described
behavior. You can clone the project from here:
https://github.com/EugeneS30/cucumber-bean-defect-verification.git

From there, use the runner class FunctionalDevIT.

I logged the issue on github (#268).
I wasn't able to try it with version 2.0.0 you mentioned as it doesn't look
like it's available in Maven repo?

Please let me know if I can help with any other information.


Best regards,
Eugene
Post by MP Korstanje
Hey Eugene,
based on the information you've provided right now it is impossible for me
to tell what goes wrong. Could you create a minimal complete verifyable
example <https://stackoverflow.com/help/mcve> and log an issue in github?
We've recently also released cucumber-jvm 2.0.0 so once you have created
the mcve, could you try to upgrade it to 2.0.0 (note that the groupId has
change to io.cucumber) to see if the issue persists?
Best,
MP
Post by Eugene Shragovich
Greetings all,
I am in the process of transitioning from Cucumber JVM *1.1.8 *to *1.2.5*
.
At the moment, if I run the tests with the 1.1.8 all is good but when I
cucumber.runtime.CucumberException: No qualifying bean of type
[au.com.company.test.functional.hook.ClearCookiesHook] is defined: expected
clearCookiesHook,au.com.company.test.functional.hook.ClearCookiesHook
I know that this is essentially a Spring exception but, as I mentioned,
this configuration works fine when Cucumber 1.1.8 is set and haven't
changed anything else.
I tried to dig a bit deeper based on my abilities 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.
Any help will be greatly appreciated.
Thanks,
Eugene
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Björn Rasmusson
2017-09-18 06:29:04 UTC
Permalink
Raw Message
Post by Eugene Shragovich
Hi MP,
Thank you very much for your reply!
I have created a simple project where I was able to reproduce the
https://github.com/EugeneS30/cucumber-bean-defect-verification.git
From there, use the runner class FunctionalDevIT.
I logged the issue on github (#268).
I wasn't able to try it with version 2.0.0 you mentioned as it doesn't
look like it's available in Maven repo?
Both v2.0.0 and (since yesterday) v2.0.1 are available from Maven Central (
http://search.maven.org/#search%7Cga%7C1%7Ca%3A%22cucumber-jvm%22), did
your forget to change the groupId?

/Björn
Post by Eugene Shragovich
Please let me know if I can help with any other information.
Best regards,
Eugene
Post by MP Korstanje
Hey Eugene,
based on the information you've provided right now it is impossible for
me to tell what goes wrong. Could you create a minimal complete
verifyable example <https://stackoverflow.com/help/mcve> and log an
issue in github? We've recently also released cucumber-jvm 2.0.0 so once
you have created the mcve, could you try to upgrade it to 2.0.0 (note that
the groupId has change to io.cucumber) to see if the issue persists?
Best,
MP
Post by Eugene Shragovich
Greetings all,
I am in the process of transitioning from Cucumber JVM *1.1.8 *to *1.2.5*.
At the moment, if I run the tests with the 1.1.8 all is good but when I
cucumber.runtime.CucumberException: No qualifying bean of type
[au.com.company.test.functional.hook.ClearCookiesHook] is defined: expected
clearCookiesHook,au.com.company.test.functional.hook.ClearCookiesHook
I know that this is essentially a Spring exception but, as I mentioned,
this configuration works fine when Cucumber 1.1.8 is set and haven't
changed anything else.
I tried to dig a bit deeper based on my abilities 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.
Any help will be greatly appreciated.
Thanks,
Eugene
--
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+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...