You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Nathan Bubna (JIRA)" <de...@velocity.apache.org> on 2008/11/10 18:57:44 UTC

[jira] Resolved: (VELTOOLS-107) ValueParser - UnsupportedOperationException with commons-beanutils 1.8

     [ https://issues.apache.org/jira/browse/VELTOOLS-107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nathan Bubna resolved VELTOOLS-107.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0

I ran into this myself last week.  It is fixed in the trunk.  I've posted a new 2.0-SNAPSHOT here:

http://people.apache.org/~nbubna/velocity/tools/2.0-SNAPSHOT/



> ValueParser - UnsupportedOperationException with commons-beanutils 1.8
> ----------------------------------------------------------------------
>
>                 Key: VELTOOLS-107
>                 URL: https://issues.apache.org/jira/browse/VELTOOLS-107
>             Project: Velocity Tools
>          Issue Type: Improvement
>          Components: GenericTools
>    Affects Versions: 2.0
>         Environment: commons-beanutils 1.8
>            Reporter: Martin Thelian
>            Priority: Minor
>             Fix For: 2.0
>
>
> As defined in [1], VelocityTools requires commons-beanutils 1.7 as a dependency. 
> But because I'm running velocity in an OSGi environment and common-beanutils is delivered as an ready-to-use OSGi bundle as of version 1.8, I've tried to run Velocity-Tools 2.0-beta2 with common-beanutils 1.8 and I'm getting the following Exception:
> ----
> java.lang.RuntimeException: java.lang.UnsupportedOperationException: ValueParser is read-only 
> at org.apache.velocity.tools.ToolInfo.setProperty(ToolInfo.java:356) 
> 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:147) 
> at org.apache.velocity.tools.Toolbox.get(Toolbox.java:107) 
> at org.apache.velocity.tools.ToolContext.findTool(ToolContext.java:181) 
> at org.apache.velocity.tools.view.ViewToolContext.get(ViewToolContext.java:158) 
> at org.apache.velocity.context.InternalContextAdapterImpl.get(InternalContextAdapterImpl.java:219) 
> at org.apache.velocity.runtime.parser.node.ASTReference.getVariableValue(ASTReference.java:740) 
> at org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:175) 
> at org.apache.velocity.runtime.parser.node.ASTReference.evaluate(ASTReference.java:396) 
> at org.apache.velocity.runtime.parser.node.ASTExpression.evaluate(ASTExpression.java:64) 
> at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:86) 
> at org.apache.velocity.runtime.parser.node.ASTBlock.render(ASTBlock.java:74) 
> at org.apache.velocity.runtime.parser.node.ASTIfStatement.render(ASTIfStatement.java:88) 
> at org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:318) 
> at org.apache.velocity.Template.merge(Template.java:254) 
> at org.apache.velocity.tools.view.VelocityLayoutServlet.mergeTemplate(VelocityLayoutServlet.java:192) 
> at org.apache.velocity.tools.view.VelocityViewServlet.doRequest(VelocityViewServlet.java:228) 
> at org.paxle.gui.impl.servlets.StatusView.doRequest(StatusView.java:54) 
> at org.apache.velocity.tools.view.VelocityViewServlet.doGet(VelocityViewServlet.java:191) 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) 
> at org.eclipse.equinox.http.servlet.internal.ServletRegistration.handleRequest(ServletRegistration.java:90) 
> at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:111) 
> at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:59) 
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) 
> at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:255) 
> at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487) 
> at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) 
> at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) 
> at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) 
> at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) 
> at org.mortbay.jetty.Server.handle(Server.java:324) 
> at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) 
> at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828) 
> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514) 
> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) 
> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) 
> at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) 
> at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450) 
> Caused by: java.lang.UnsupportedOperationException: ValueParser is read-only 
> at org.apache.velocity.tools.generic.ValueParser.put(ValueParser.java:537) 
> at org.apache.velocity.tools.generic.ValueParser.put(ValueParser.java:45) 
> at org.apache.commons.beanutils.PropertyUtilsBean.setPropertyOfMapBean(PropertyUtilsBean.java:2026) 
> at org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1942) 
> at org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:2054) 
> at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:858) 
> at org.apache.velocity.tools.ToolInfo.setProperty(ToolInfo.java:350) ... 40 more 
> ----
> It would be fine if Velocity would work with Common Beanutils 1.8.0
> Regards,
> Martin
> [1] http://velocity.apache.org/tools/devel/dependencies.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org