When I was working with the spring date comparison tool integration with spring today, I came across a wierd issue. Though I had all necessary configurations in, I confronted the following error
I was wondering what the issue could be. It took me a few minutes to hit the target.
This is for those of you who are confronting the problem like me. Just take the solution from here rather than wasting your time in further exploration
The actual solution was to replace the commons-beanutils.jar with the latest one. I was using commons-beanutils-1.5.jar. And I replaced it with commons-beanutils-core-1.7.0.jar.
Things started working wonderfully!As always, I appreciate your feedback/hollers regarding this article any time!
java.lang.NoSuchMethodError: org.apache.commons.beanutils.PropertyUtils.isWriteable(Ljava/lang/Object;Ljava/lang/String;)Z
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:820)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NoSuchMethodError: org.apache.commons.beanutils.PropertyUtils.isWriteable(Ljava/lang/Object;Ljava/lang/String;)Z
at org.apache.velocity.tools.ToolInfo.setProperty(ToolInfo.java:346)
at org.apache.velocity.tools.ToolInfo.configure(ToolInfo.java:251)
at org.apache.velocity.tools.ToolInfo.create(ToolInfo.java:232)
at org.apache.velocity.tools.Toolbox.getFromInfo(Toolbox.java:137)
at org.apache.velocity.tools.Toolbox.get(Toolbox.java:97)
at org.apache.velocity.tools.ToolContext.findTool(ToolContext.java:150)
at org.apache.velocity.tools.view.ViewToolContext.get(ViewToolContext.java:168)
at org.apache.velocity.context.InternalContextAdapterImpl.get(InternalContextAdapterImpl.java:286)
at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:829)
at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:212)
at org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:332)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.runtime.directive.Parse.render(Parse.java:260)
at org.apache.velocity.runtime.parser.node.ASTDirective.render(ASTDirective.java:175)
at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.Template.merge(Template.java:328)
at org.apache.velocity.Template.merge(Template.java:235)
at org.springframework.web.servlet.view.velocity.VelocityView.mergeTemplate(VelocityView.java:517)
at org.springframework.web.servlet.view.velocity.VelocityView.doRender(VelocityView.java:462)
at org.springframework.web.servlet.view.velocity.VelocityView.renderMergedTemplateModel(VelocityView.java:291)
at org.springframework.web.servlet.view.AbstractTemplateView.renderMergedOutputModel(AbstractTemplateView.java:167)
at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:250)
at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1060)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
... 17 more
I was wondering what the issue could be. It took me a few minutes to hit the target.
This is for those of you who are confronting the problem like me. Just take the solution from here rather than wasting your time in further exploration
The actual solution was to replace the commons-beanutils.jar with the latest one. I was using commons-beanutils-1.5.jar. And I replaced it with commons-beanutils-core-1.7.0.jar.
Things started working wonderfully!As always, I appreciate your feedback/hollers regarding this article any time!