-
-
Notifications
You must be signed in to change notification settings - Fork 2k
NullPointerException in SpringTransactionHooks when upgrading to 1.1.5 #637
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
I believe this might be due to the fact that the class does not have Two related comments:
|
hey @ffbit do you know anything about the spring-txn example being broken? |
@pasviegas, @ffbit - The test on master is passing - but this is due to the fact that the Hook is not being called (the path in glue is wrong, it was changed in 1.1.1). See my branch above, where the hook path was corrected and the test consequently fails. |
Hello, |
@ffbit - did you run the examples with the correct spring hook path, though (as in the commit I posted above)? As this definitely makes the test fail! |
I can't answer this question until I get to my laptop next Monday. |
@brasmusson thanks for the clarification |
Hi, I've been trying to fix the issue and here are my findings. I got rid of the NPE, by turning the c.a.s.SpringTransactionHooks into a Spring bean. Then I faced another problem
@pasviegas, could you please correct me if I went wrong.
The first one is neither a parent nor a child for the second one and they live their own lives. As a summary I can send a pull request solving the NPE and we can start solving the NoSuchBeanDefinitionException. WDYT? |
No, this shouldn't be the case. |
@pasviegas here is the #649 PR. |
@pasviegas I also can provide a proof that there are two separate application contexts, if it's necessary. |
In terms of spring-ness, I think it might be a better user experience to mimic or at least adapt the rules used by spring-test's SpringJUnit4ClassRunner. @ContextConfiguration should only be read off classes with @RunWith(Cucumber.class) / @CucumberOptions
This sounds like work to do so I'll give it a stab and upload if it proves to be a valid soluion |
Can't seem to find any information on this issue besides here. Was this something that has been fixed in a later version or is it still an existing defect? |
This defect has not been fixed yet. The latest release is currently 1.1.6, and the defect exists there as well. |
I got around this issue for now by doing exactly what @patrickmcmichael originally described in this comment on #46, which originally led to this feature. |
If you can, please join here Mon, May 12, 3:00 PM - 4:00 PM to discuss: https://plus.google.com/u/0/events/cstdgkbvp61g7gld8lejsap4j3o |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Running the tests after upgrading from 1.1.3 to 1.1.5 yields the following exception:
Originally posted in https://groups.google.com/forum/#!topic/cukes/SjFK1QW2qE0
The text was updated successfully, but these errors were encountered: