Discussion:
[Cucumber] Cucumber/Spring/JPA problem
(too old to reply)
'Michael Cunningham' via Cukes
2018-09-27 12:49:11 UTC
Permalink
I am using Spring 5.0.9, spring-data-jpa 2.0.10 with Cucumber. I tried
info.cukes1.2.5 and io.cucumber 3.0.2.

I want to read database tables to assert that the correct data has been
transferred through the system under test. I have been able to read data
using JDBC and JDBCTemplate successfully.
When I try using JPA, using wiring given in Spring In Action, I get "Error
creating bean with name 'jpaMappingContext' : Invocation of init method
failed; nested exception is java.lang.IllegalArgumentException: At least
one JPA metamodel must be present!"

Before I go to the trouble of cutting&pasting poms, config file and stack
traces etc, can anyone answer a couple of top-level questions:

1. Is there a reason Cucumber's Spring wiring can't handle JPA?
2. Has anyone got JPA work with Cucumber/Spring before?

thanks in advance,
Michael
--
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
2018-11-17 10:40:16 UTC
Permalink
I can't think of a reason this shouldn't work. Cucumber is not doing
anything fancy with regards to spring. Once the SpringFactory detects a
class annotated with either ContextHierarchy, BootstrapWith or
ContextConfiguration it creates a spring context. If you can't find a
`jpaMappingContext` there is a good chance it's not configured.




On Thursday, September 27, 2018 at 2:49:11 PM UTC+2, Michael Cunningham
wrote:
I am using Spring 5.0.9, spring-data-jpa 2.0.10 with Cucumber. I tried
info.cukes1.2.5 and io.cucumber 3.0.2.
Post by 'Michael Cunningham' via Cukes
I want to read database tables to assert that the correct data has been
transferred through the system under test. I have been able to read data
using JDBC and JDBCTemplate successfully.
When I try using JPA, using wiring given in Spring In Action, I get "Error
creating bean with name 'jpaMappingContext' : Invocation of init method
failed; nested exception is java.lang.IllegalArgumentException: At least
one JPA metamodel must be present!"
Before I go to the trouble of cutting&pasting poms, config file and stack
1. Is there a reason Cucumber's Spring wiring can't handle JPA?
2. Has anyone got JPA work with Cucumber/Spring before?
thanks in advance,
Michael
--
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...