ClassNotFoundException-org-springframework-expression-PropertyAccessor

ClassNotFoundException-org-springframework-expression-PropertyAccessor

Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor

If you see below exception:

log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment).
log4j:WARN Please initialize the log4j system properly.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/expression/PropertyAccessor
    at org.springframework.context.support.AbstractApplicationContext.prepareBeanFactory(AbstractApplicationContext.java:553)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:454)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    at com.javahonk.client.TestWebService.main(TestWebService.java:19)
Caused by: java.lang.ClassNotFoundException: org.springframework.expression.PropertyAccessor
    at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 5 more

Solution: This happens if spring-expression-xxx.Release.jar in not available in your class path. Please add spring-expression-3.2.3.RELEASE or latest version jar in your class path to fix this issue.

One thought on “ClassNotFoundException-org-springframework-expression-PropertyAccessor”

Leave a Reply

Your email address will not be published. Required fields are marked *