You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by "Claude Brisson (JIRA)" <de...@velocity.apache.org> on 2018/06/26 23:11:00 UTC
[jira] [Closed] (VELTOOLS-154) Bad tool causes velocity servlet to
fail to initialize, chew 100% CPU
[ https://issues.apache.org/jira/browse/VELTOOLS-154?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claude Brisson closed VELTOOLS-154.
-----------------------------------
Resolution: Cannot Reproduce
Assignee: Claude Brisson
Problem not reproduced either with View Tools 2.0 or with 3.0-SNAPSHOT.
> Bad tool causes velocity servlet to fail to initialize, chew 100% CPU
> ---------------------------------------------------------------------
>
> Key: VELTOOLS-154
> URL: https://issues.apache.org/jira/browse/VELTOOLS-154
> Project: Velocity Tools
> Issue Type: Bug
> Components: VelocityView
> Affects Versions: 2.0
> Environment: Sun/Oracle Java 1.7.0_09: Java HotSpot(TM) 64-Bit Server VM version 23.5-b02
> Velocity 1.7
> Velocity Tools 2.0 + a few (unrelated) backports from trunk
> Reporter: Christopher Schultz
> Assignee: Claude Brisson
> Priority: Minor
>
> I added a class to my tools.xml which can't be instantiated (because it doesn't have a no-arg constructor). The result when accessing my first velocity template was a nearly endless stack trace like this:
> Caused by: org.apache.velocity.tools.config.ConfigurationException: Couldn't instantiate instance of tool for: Unusable Tool 'forwardBuilder' => [My Tool Class] with 1 properties [key -auto-> forwardBuilder; ](java.lang.InstantiationException: com.chadis.tools.struts.ForwardBuilder)
> at org.apache.velocity.tools.config.ToolConfiguration.validate(ToolConfiguration.java:356)
> at org.apache.velocity.tools.config.CompoundConfiguration.validate(CompoundConfiguration.java:115)
> at org.apache.velocity.tools.config.ToolboxConfiguration.validate(ToolboxConfiguration.java:108)
> at org.apache.velocity.tools.config.CompoundConfiguration.validate(CompoundConfiguration.java:115)
> at org.apache.velocity.tools.config.FactoryConfiguration.validate(FactoryConfiguration.java:232)
> at org.apache.velocity.tools.ToolboxFactory.configure(ToolboxFactory.java:80)
> at org.apache.velocity.tools.ToolManager.configure(ToolManager.java:90)
> at org.apache.velocity.tools.view.ViewToolManager.configure(ViewToolManager.java:213)
> at org.apache.velocity.tools.view.VelocityView.configure(VelocityView.java:508)
> at org.apache.velocity.tools.view.VelocityView.init(VelocityView.java:313)
> at org.apache.velocity.tools.view.VelocityView.<init>(VelocityView.java:213)
> at org.apache.velocity.tools.view.ServletUtils.createView(ServletUtils.java:156)
> at org.apache.velocity.tools.view.ServletUtils.getVelocityView(ServletUtils.java:142)
> at org.apache.velocity.tools.view.ServletUtils.getVelocityView(ServletUtils.java:104)
> at org.apache.velocity.tools.view.VelocityViewServlet.getVelocityView(VelocityViewServlet.java:155)
> at org.apache.velocity.tools.view.VelocityViewServlet.init(VelocityViewServlet.java:122)
> at org.apache.velocity.tools.view.VelocityLayoutServlet.init(VelocityLayoutServlet.java:133)
> at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1266)
> at [...]
> Eventually, the thread somehow recovers but not before generating about 800 of the above "Caused by" stack elements. I was actually expecting a StackOverflowError at some point, but it never came.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org