[jira] [Commented] (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:comment-tabpanelfocusedCommentId=14702350#comment-14702350 ] Mike Kienenberger commented on VELTOOLS-154: Mohammad, It's unlikely that your issue is related to this problem This issue is triggered by an incorrectly-designed velocity tool. The issue only exists to provide a better error message when this situation occurs. I recommend you bring it up your specific issue with your specific details on the user@velocity mailing list so we can discuss it there and determine whether it is a bug or a configuration issue. See http://velocity.apache.org/engine/devel/mail-lists.html for information on how to subscribe to the mailing list and post questions. 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 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 (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org
[jira] [Commented] (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:comment-tabpanelfocusedCommentId=14702301#comment-14702301 ] Mohammad Abul Khaer commented on VELTOOLS-154: -- Any update on this issue ? I am getting following exception while I build [#|2015-08-19T10:35:56.312+0900|WARNING|sun-appserver2.1|javax.enterprise.system.stream.err|_ThreadID=37;_ThreadName=httpWorkerThread-28648-0;_RequestID=859cfad8-934c-4871-9614-d7386a8f8d30;| com.sun.enterprise.admin.event.AdminEventListenerException: ContainerBase.addChild: start: LifecycleException: org.apache.velocity.tools.config.ConfigurationException: Couldn't instantiate instance of tool for: Unusable Tool 'CAMPAIGN' = com.company.test.CampaignUtil with 1 properties \[key -auto- CAMPAIGN; ](java.lang.NullPointerException) 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 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 (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@velocity.apache.org For additional commands, e-mail: dev-h...@velocity.apache.org