I am developping an applciation using spring-data jpa. The application launches and runs without any problem, but when I want to write unit tests using spring-context, it seems that I have a dependency conflict due to a JPA1 dependency(I think brought by spring-context.
Yes, you are indeed, right. SOmewhere JPA1 classes have been added to the mix, and the classloader is loading the class from JPA1. If you have the whole project open in Eclipse, and you are using a m2eclipse plugin, you can ask Eclipse to open PersistenceUnit type. Eclipse convinently tells you which jars in the classpath have that class. You have your answer right there
If that doesn't get you what you need then add <argLine>-verbose</argLine> to the maven sure fire plugin configuration. When you run the test it will log where each class is loaded from. That will give you where the JPA1 class is coming from
She said she got a brazillian. I think owning people is wrong. That is how I learned ... tiny ad:
Devious Experiments for a Truly Passive Greenhouse!