Error: java.lang.ClassNotFoundException: ognl.PropertyAccessor

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: java.lang.ClassNotFoundException: ognl.PropertyAccessor

Eric Francis
I'm seeing this in my stack trace:

INFO   | jvm 1    | 2013/04/09 12:44:44 | SEVERE: Servlet.service() for servlet [thymeleafPOC] in context with path [] threw exception [Handler processing failed; nested exception is java.lang.NoClassDef
FoundError: ognl/PropertyAccessor] with root cause
INFO   | jvm 1    | 2013/04/09 12:44:44 | java.lang.ClassNotFoundException: ognl.PropertyAccessor
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.thymeleaf.context.WebContext.<init>(WebContext.java:204)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.thymeleaf.spring3.context.SpringWebContext.<init>(SpringWebContext.java:104)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.thymeleaf.spring3.view.ThymeleafView.renderFragment(ThymeleafView.java:226)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.thymeleaf.spring3.view.ThymeleafView.render(ThymeleafView.java:179)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1208)
INFO   | jvm 1    | 2013/04/09 12:44:44 |       at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:992)
........

What is class ognl.PropertyAccessor?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Error: java.lang.ClassNotFoundException: ognl.PropertyAccessor

Emanuel
Administrator
It's part of OGNL and should come with the OGNL JAR, which is used by Thymeleaf for its expression language.  The dependency is defined in the core Thymeleaf pom.xml file, so if you're using Ivy/Maven/Gradle, it should come through as part of your web app.  If you downloaded the Thymeleaf ZIP from SourceForge, then it comes bundled with the ZIP and you should add it to your web app's classpath (eg: WEB-INF/lib folder).
Reply | Threaded
Open this post in threaded view
|

Re: Error: java.lang.ClassNotFoundException: ognl.PropertyAccessor

Eric Francis
Got it. Thanks!

I actually downloaded all of the individual jars from: http://mvnrepository.com/artifact/org.thymeleaf/thymeleaf/2.0.16
:(