SPRING Exception in thread “main” java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor


      Click here to attend Spring Framework 4.x and certification course with a discount

If you get this exception while initializing the Spring Framework you need to download and put the following jar inside the lib folder of your project.

http://www.docjar.com/jar/org.springframework.expression-sources-3.0.0.M3.jar

debug:
09-Nov-2011 11:08:47 org.springframework.context.support.AbstractApplicationContext prepareRefresh
INFO: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@16e1fb1: startup date [Wed Nov 09 11:08:47 CET 2011]; root of context hierarchy
09-Nov-2011 11:08:47 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from class path resource [com/tunatore/springjdbc/beans.xml]
Exception in thread “main” java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
    at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:538)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:439)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    at com.tunatore.springjdbc.SpringJDBCTemplateExample.main(SpringJDBCTemplateExample.java:14)
Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    … 5 more
Java Result: 1

 

Advertisements

2 thoughts on “SPRING Exception in thread “main” java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor

  1. You are a life saver. You should mention that org.springframework.expression_whateverVersion.jar is distinct from the one you mention there and you may need them both.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s