Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 3.0.1
-
Fix Version/s: 3.0.2
-
Component/s: Spring Support
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
If you use abstract beans the annotation processor blows up.
I've included a patch. Its basically a try catch around the getBean step. Test data enhanced to recreate problem.
Activity

Field | Original Value | New Value |
---|---|---|
Assignee | Mauro Talevi [ maurotalevi ] | |
Fix Version/s | 3.0.2 [ 16771 ] |

Summary | JBehave Spring doesn't work with abstract beans | SpringStepsFactory should ignore beans with undefined type and that fail instantiation |

Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
It's not simply the abstract class bean that it complains about, those are cared for in the isNotAbstract() method (since 3.0.1), which assumes that the context is able to determine the type of the bean. This is not always the case.
In any case, a more generic solution is to wrap the bean instantiation to catch the BeansException as you suggest.