Runtime error with ch09-springdata-jpa - missing org/.../EmbeddedValueResolver

92 views
Skip to first unread message

suresh....@gmail.com

unread,
Oct 11, 2016, 1:57:27 PM10/11/16
to Getting started with Spring Framework
Hi,

Hope someone can help: I'm trying to run chapter 9 example ch09-springdata-jpa in eclipse, and get the following runtime error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/beans/factory/config/EmbeddedValueResolver

I think there's a missing dependency in the pom.xml but so far I haven't been able to google a solution as to what changes I need to make to the pom.xml.

If anyone else has encountered and overcome this error please reply.

Thank you.

PS: If I solve the issue I'll update this post.

Suresh M

unread,
Oct 12, 2016, 4:50:33 AM10/12/16
to Getting started with Spring Framework
Update: hmmm, slightly embarrassing lol - woke up this morning expecting to spend a lot of time learning about eclipse-maven poms and repositories, so I could fix the issue. Started eclipse and ran the chapter 9 app...

...and it ran ok! Not sure why exiting and restarting eclipse fixed it, but i'm happy it's working so I can continue through the book.

Suresh M

unread,
Oct 13, 2016, 8:41:13 AM10/13/16
to Getting started with Spring Framework
Update 2: just had the same run time error trying to run the ch09-springdata-mongo example of chapter 9. Fixed it by:

1. adding dependency org-springframework/spring-beans/${spring-version} to the pom.xml
2. maven: clean, generate-sources, compile.

After that it runs ok.

Minor niggles. Still a great book!

Ashish Sarin

unread,
Oct 15, 2016, 9:26:25 AM10/15/16
to Suresh M, Getting started with Spring Framework
Hi Suresh,

The spring-beans JAR should be automatically included in the project when you run mvn clean eclipse:eclipse. The other spring JARs depend on spring-beans; therefore, it is automatically included.
 
I'd suggest to try this once, and see if the application runs:
1. Go to pom.xml file and remove spring-beans dependency that you explicitly added
2. Now run mvn clean eclipse:eclipse. This will create the necessary Eclipse IDE-specific artifacts.
3. Import the project again into Eclipse IDE and try running the application again.

regards
Ashish 

--
You received this message because you are subscribed to the Google Groups "Getting started with Spring Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to getting-started-with-spring-framework+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages