From lindseyfisher@example.org Tue Nov 03 02:08:23 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 40698 invoked from network); 3 Nov 2009 02:08:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:08:23 -0000 Received: (qmail 42973 invoked by uid 500); 3 Nov 2009 02:08:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 42894 invoked by uid 500); 3 Nov 2009 02:08:22 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 42884 invoked by uid 500); 3 Nov 2009 02:08:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 42881 invoked by uid 99); 3 Nov 2009 02:08:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:08:22 +0000 X-ASF-Spam-Status: No, hits=-10.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:08:19 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 754E7234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:07:59 -0800 (PST) Message-ID: <396477252.1257214079466.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:07:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Commented: (VELOCITY-717) Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null In-Reply-To: <887435052.1242417225810.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-717?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772828#action_12772828 ] Will Glass-Husain commented on VELOCITY-717: -------------------------------------------- Hi, I tried to replicate this issue and couldn't. I tried merging in a macro library with Template.merge() as you suggest. I also tried doing #parse in the included file and referencing the macro in the parent file. Neither generated an NPE. Can you please provide more details, ideally the VM and macro files you are using, and a code sample showing how you include the macros and merge the code. > Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null > ------------------------------------------------------------------------------------ > > Key: VELOCITY-717 > URL: https://issues.apache.org/jira/browse/VELOCITY-717 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6.2 > Environment: Suse Linux > Reporter: Johann Weber > Priority: Critical > Fix For: 1.7 > > > The Engine throws an NPE if the IncludeEventHandler returns null. > (using merge method with a list of macro libs) > java.lang.NullPointerException > >> at java.util.Hashtable.get(Hashtable.java:333) > >> at org.apache.velocity.runtime.VelocimacroManager.getNamespace(VelocimacroManager.java:318) > >> at org.apache.velocity.runtime.VelocimacroManager.get(VelocimacroManager.java:215) > >> at org.apache.velocity.runtime.VelocimacroFactory.getVelocimacro(VelocimacroFactory.java:563) > >> at org.apache.velocity.runtime.RuntimeInstance.getVelocimacro(RuntimeInstance.java:1563) > >> at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:218) > >> 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.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) -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:12:23 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 41030 invoked from network); 3 Nov 2009 02:12:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:12:23 -0000 Received: (qmail 43869 invoked by uid 500); 3 Nov 2009 02:12:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 43805 invoked by uid 500); 3 Nov 2009 02:12:23 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 43795 invoked by uid 500); 3 Nov 2009 02:12:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 43792 invoked by uid 99); 3 Nov 2009 02:12:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:12:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:12:20 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 8DB2D234C4AC for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:11:59 -0800 (PST) Message-ID: <1532470925.1257214319578.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:11:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Resolved: (VELOCITY-717) Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null In-Reply-To: <887435052.1242417225810.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-717?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-717. ---------------------------------------- Resolution: Cannot Reproduce resolving. try with the latest version (from svn head). if you still have this difficulty, please reopen the bug and give a little more detail. Thanks! > Engine throws an NPE using custom macro libs if the IncludeEventHandler returns null > ------------------------------------------------------------------------------------ > > Key: VELOCITY-717 > URL: https://issues.apache.org/jira/browse/VELOCITY-717 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6.2 > Environment: Suse Linux > Reporter: Johann Weber > Priority: Critical > Fix For: 1.7 > > > The Engine throws an NPE if the IncludeEventHandler returns null. > (using merge method with a list of macro libs) > java.lang.NullPointerException > >> at java.util.Hashtable.get(Hashtable.java:333) > >> at org.apache.velocity.runtime.VelocimacroManager.getNamespace(VelocimacroManager.java:318) > >> at org.apache.velocity.runtime.VelocimacroManager.get(VelocimacroManager.java:215) > >> at org.apache.velocity.runtime.VelocimacroFactory.getVelocimacro(VelocimacroFactory.java:563) > >> at org.apache.velocity.runtime.RuntimeInstance.getVelocimacro(RuntimeInstance.java:1563) > >> at org.apache.velocity.runtime.directive.RuntimeMacro.render(RuntimeMacro.java:218) > >> 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.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) -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:28:25 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 46707 invoked from network); 3 Nov 2009 02:28:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:28:24 -0000 Received: (qmail 56121 invoked by uid 500); 3 Nov 2009 02:28:24 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 56101 invoked by uid 500); 3 Nov 2009 02:28:24 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 56091 invoked by uid 500); 3 Nov 2009 02:28:24 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 56088 invoked by uid 99); 3 Nov 2009 02:28:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:28:24 +0000 X-ASF-Spam-Status: No, hits=-10.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:28:19 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 6559A234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:27:59 -0800 (PST) Message-ID: <1860462470.1257215279400.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:27:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Updated: (VELOCITY-724) [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies? In-Reply-To: <1339527415.1243854727532.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain updated VELOCITY-724: --------------------------------------- Attachment: ant17.patch upgrade requirements to ant 1.7 and drop junit download. > [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies? > ---------------------------------------------------------------------------------- > > Key: VELOCITY-724 > URL: https://issues.apache.org/jira/browse/VELOCITY-724 > Project: Velocity > Issue Type: Bug > Components: Build > Affects Versions: 1.6.2 > Reporter: Aruna Venkataraman > Priority: Trivial > Fix For: 1.7 > > Attachments: ant17.patch, Build succeeds with junit.jar.jpg, build.patch, current error message.PNG, jnuit build failed.jpg, revised error message.PNG, svn diff.PNG > > > When i navigate to the build directory in Velocity 1.6.2 and invoke "ant" then the below error is got: > Could not create task or type of type: junit. lib\test. > Ant could not find the task or a class this task relies upon. > Refer screenshot > I deleted the junit-3.8.1.jar file from bin\test-lib as it was specified to be optional, but it gets created automatically. > Do we need to remove the dependency on this junit-3.8.1.jar manually? -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:34:23 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 48385 invoked from network); 3 Nov 2009 02:34:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:34:23 -0000 Received: (qmail 62600 invoked by uid 500); 3 Nov 2009 02:34:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 62546 invoked by uid 500); 3 Nov 2009 02:34:23 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 62536 invoked by uid 500); 3 Nov 2009 02:34:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 62533 invoked by uid 99); 3 Nov 2009 02:34:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:34:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:34:20 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 6FE91234C4A7 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:33:59 -0800 (PST) Message-ID: <486636417.1257215639457.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:33:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Updated: (VELOCITY-724) [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies? In-Reply-To: <1339527415.1243854727532.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain updated VELOCITY-724: --------------------------------------- Attachment: (was: ant17.patch) > [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies? > ---------------------------------------------------------------------------------- > > Key: VELOCITY-724 > URL: https://issues.apache.org/jira/browse/VELOCITY-724 > Project: Velocity > Issue Type: Bug > Components: Build > Affects Versions: 1.6.2 > Reporter: Aruna Venkataraman > Priority: Trivial > Fix For: 1.7 > > Attachments: Build succeeds with junit.jar.jpg, build.patch, current error message.PNG, jnuit build failed.jpg, revised error message.PNG, svn diff.PNG > > > When i navigate to the build directory in Velocity 1.6.2 and invoke "ant" then the below error is got: > Could not create task or type of type: junit. lib\test. > Ant could not find the task or a class this task relies upon. > Refer screenshot > I deleted the junit-3.8.1.jar file from bin\test-lib as it was specified to be optional, but it gets created automatically. > Do we need to remove the dependency on this junit-3.8.1.jar manually? -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:40:25 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 50149 invoked from network); 3 Nov 2009 02:40:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:40:24 -0000 Received: (qmail 68261 invoked by uid 500); 3 Nov 2009 02:40:24 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 67566 invoked by uid 500); 3 Nov 2009 02:40:22 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 67556 invoked by uid 500); 3 Nov 2009 02:40:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 67552 invoked by uid 99); 3 Nov 2009 02:40:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:40:22 +0000 X-ASF-Spam-Status: No, hits=-10.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:40:19 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 5DE29234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:39:59 -0800 (PST) Message-ID: <1794562235.1257215999379.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:39:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Resolved: (VELOCITY-724) [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies? In-Reply-To: <1339527415.1243854727532.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-724. ---------------------------------------- Resolution: Fixed Hi, It makes sense to me to upgrade to ant 1.7-- it's been out for a long time. (and the manual copying of junit lib is very confusing). I went ahead and upgraded to ant 1.7 but did not drop junit dependency. (changed the build file with your patch and the docs). It doesn't look like ant comes with junit. Instead, if it's in the app classpath, it uses it automatically (no need to copy to lib directory). Does this sound right? Go ahead and reopen the issue if you've further comments. Thanks for raising the issue. WILL > [PATCH] Is junit-3.8.1.jar optional for Velocity as specified in jar dependencies? > ---------------------------------------------------------------------------------- > > Key: VELOCITY-724 > URL: https://issues.apache.org/jira/browse/VELOCITY-724 > Project: Velocity > Issue Type: Bug > Components: Build > Affects Versions: 1.6.2 > Reporter: Aruna Venkataraman > Priority: Trivial > Fix For: 1.7 > > Attachments: Build succeeds with junit.jar.jpg, build.patch, current error message.PNG, jnuit build failed.jpg, revised error message.PNG, svn diff.PNG > > > When i navigate to the build directory in Velocity 1.6.2 and invoke "ant" then the below error is got: > Could not create task or type of type: junit. lib\test. > Ant could not find the task or a class this task relies upon. > Refer screenshot > I deleted the junit-3.8.1.jar file from bin\test-lib as it was specified to be optional, but it gets created automatically. > Do we need to remove the dependency on this junit-3.8.1.jar manually? -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:50:25 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 52869 invoked from network); 3 Nov 2009 02:50:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:50:25 -0000 Received: (qmail 73577 invoked by uid 500); 3 Nov 2009 02:50:24 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 73487 invoked by uid 500); 3 Nov 2009 02:50:23 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 73411 invoked by uid 500); 3 Nov 2009 02:50:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 73408 invoked by uid 99); 3 Nov 2009 02:50:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:50:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:50:20 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 92B0E234C4B5 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:49:59 -0800 (PST) Message-ID: <1936994434.1257216599599.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:49:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Resolved: (VELOCITY-720) Suppress startup error message if macro library not found In-Reply-To: <1541940702.1243447425616.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-720. ---------------------------------------- Resolution: Fixed I changed the Resource Loader code to omit the stack trace for a resource not found. It seems overkill. (and rather frightening). It still logs the message, in this case: cannot find resource VM_global_library.vm. > Suppress startup error message if macro library not found > --------------------------------------------------------- > > Key: VELOCITY-720 > URL: https://issues.apache.org/jira/browse/VELOCITY-720 > Project: Velocity > Issue Type: Improvement > Components: Engine > Reporter: Will Glass-Husain > Priority: Minor > Fix For: 1.7 > > > Ever since upgrading to Velocity 1.6.2 I get a stack trace when starting up due to a missing macro library. The stack trace in particular makes for a very noisy log. I suggest we do not print a stacktrace for a missing macro lindseyfisher@example.org. > Here's my settings > VelocityEngine ve = new VelocityEngine(); > ve.setProperty("resource.loader", "class"); > ve.setProperty("class.resource.loader.class", "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); > ve.setProperty("class.resource.loader.cache", "false"); > ve.setProperty("runtime.Log.invalid.references ", "false"); > ve.setProperty("resource.manager.logwhenfound", "false"); > ve.setProperty("runtime.log.logsystem.class", "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); > ve.setProperty("runtime.log.logsystem.log4j.category", "com.forio.Velocity"); > And here's the log report > 2009-05-26 23:46:58 DEBUG Velocimacro : "velocimacro.library" is not set. Trying default library: VM_global_library.vm > 2009-05-26 23:46:58 DEBUG Could not load resource 'VM_global_library.vm' from ResourceLoader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader: > 2009-05-26 23:46:58 DEBUG > org.apache.velocity.exception.ResourceNotFoundException: > ClasspathResourceLoader Error: cannot find resource VM_global_library.vm > at org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader.getResourceStream(ClasspathResourceLoader.java:131) > at org.apache.velocity.runtime.resource.loader.ResourceLoader.resourceExists(ResourceLoader.java:224) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderForResource(ResourceManagerImpl.java:641) > at org.apache.velocity.runtime.resource.ResourceManagerImpl.getLoaderNameForResource(ResourceManagerImpl.java:624) > at org.apache.velocity.runtime.RuntimeInstance.getLoaderNameForResource(RuntimeInstance.java:1464) > at org.apache.velocity.runtime.VelocimacroFactory.initVelocimacro(VelocimacroFactory.java:159) > at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:261) > at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107) -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:54:22 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 53499 invoked from network); 3 Nov 2009 02:54:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:54:22 -0000 Received: (qmail 75402 invoked by uid 500); 3 Nov 2009 02:54:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 75384 invoked by uid 500); 3 Nov 2009 02:54:21 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 75374 invoked by uid 500); 3 Nov 2009 02:54:21 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 75371 invoked by uid 99); 3 Nov 2009 02:54:21 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:54:21 +0000 X-ASF-Spam-Status: No, hits=-10.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:54:19 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 61DAB234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:53:59 -0800 (PST) Message-ID: <2041512023.1257216839386.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:53:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Commented: (VELOCITY-739) Do not throw exception for quiet references in strict reference checking mode In-Reply-To: <308019044.1255713511573.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772850#action_12772850 ] Will Glass-Husain commented on VELOCITY-739: -------------------------------------------- In the interests of conservatism, I'm going to leave this alone. If more people want it speak up. > Do not throw exception for quiet references in strict reference checking mode > ----------------------------------------------------------------------------- > > Key: VELOCITY-739 > URL: https://issues.apache.org/jira/browse/VELOCITY-739 > Project: Velocity > Issue Type: Improvement > Components: Engine > Affects Versions: 1.6.2 > Reporter: Will Glass-Husain > > I used strict reference checking for the first time and discovered that it throws exceptions even for quiet references. > <input class="signupInput" type="text" id="StxtFirstNames" > name="firstName" value="$!user.firstName"/> > org.apache.velocity.exception.MethodInvocationException: Variable > $user has not been set at layout/slide_login.vm[line 13, column 117] > This doesn't make sense to me. If a template author designates a reference as quiet, it's explicitly not an error. We're preventing the use of this convenient feature. > It's not a hard change to fix this. Does it break backwards compatibility if we change this? > Incidentally, there's an identical problem for InvalidReferenceEventHandler. I'll file a separate issue. -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 02:56:23 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 53748 invoked from network); 3 Nov 2009 02:56:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 02:56:23 -0000 Received: (qmail 75914 invoked by uid 500); 3 Nov 2009 02:56:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 75862 invoked by uid 500); 3 Nov 2009 02:56:22 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 75852 invoked by uid 500); 3 Nov 2009 02:56:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 75848 invoked by uid 99); 3 Nov 2009 02:56:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:56:22 +0000 X-ASF-Spam-Status: No, hits=-10.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 02:56:19 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id B137B234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 18:55:59 -0800 (PST) Message-ID: <1058309136.1257216959704.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 02:55:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Resolved: (VELOCITY-738) It would be useful to know that the error is occurred in which context. In-Reply-To: <797060368.1255595311300.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-738?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-738. ---------------------------------------- Resolution: Won't Fix If you catch the ParseException, it contains properties for the template name, line, and column number, > It would be useful to know that the error is occurred in which context. > ----------------------------------------------------------------------- > > Key: VELOCITY-738 > URL: https://issues.apache.org/jira/browse/VELOCITY-738 > Project: Velocity > Issue Type: Improvement > Components: Engine > Affects Versions: 1.6.2 > Reporter: Siri C. > > It would be better, if an error message display surroundings of the place where the error is. > For example: > To display that an "(" character is illegal (there are hundreds of those characters in a template) > but it would be useful to know that this character occurred in the context "product.getName()". -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 03:06:25 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 56655 invoked from network); 3 Nov 2009 03:06:25 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 03:06:25 -0000 Received: (qmail 80669 invoked by uid 500); 3 Nov 2009 03:06:25 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 80592 invoked by uid 500); 3 Nov 2009 03:06:24 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 80582 invoked by uid 500); 3 Nov 2009 03:06:24 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 80579 invoked by uid 99); 3 Nov 2009 03:06:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 03:06:23 +0000 X-ASF-Spam-Status: No, hits=-10.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 03:06:21 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id A5DD5234C1F2 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 19:06:00 -0800 (PST) Message-ID: <1082409423.1257217560678.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 03:06:00 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Updated: (VELOCITY-715) Leaked object in FileResourceLoader#templatePaths In-Reply-To: <1580642853.1241784105594.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain updated VELOCITY-715: --------------------------------------- Fix Version/s: (was: 1.7) > Leaked object in FileResourceLoader#templatePaths > ------------------------------------------------- > > Key: VELOCITY-715 > URL: https://issues.apache.org/jira/browse/VELOCITY-715 > Project: Velocity > Issue Type: Bug > Components: Engine > Reporter: Atsushi Isobe > Priority: Minor > Attachments: FileResourceLoader.patch, FileResourceLoaderLeakedObjectTest.java > > > org.apache.velocity.runtime.resource.loader.FileResourceLoader#templatePaths has stored templatename and real file path permanently.So if VelocityEngine#getTemplate(String) has called by too many files, #templatePaths have been enlarged. > Bellow my test results. > ---------------------------------------- > 2009-05-08 19:16:54,571 INFO [FileResourceLoaderLeakedObjectTest] count: 000,000 total: 002,696,488 > 2009-05-08 19:19:23,381 INFO [FileResourceLoaderLeakedObjectTest] count: 065,536 total: 014,689,896 > 2009-05-08 19:22:03,782 INFO [FileResourceLoaderLeakedObjectTest] count: 131,072 total: 025,374,944 > 2009-05-08 19:24:14,756 INFO [FileResourceLoaderLeakedObjectTest] count: 196,608 total: 036,282,696 > 2009-05-08 19:26:37,864 INFO [FileResourceLoaderLeakedObjectTest] count: 262,144 total: 046,776,168 > 2009-05-08 19:28:55,090 INFO [FileResourceLoaderLeakedObjectTest] count: 327,680 total: 057,119,560 > 2009-05-08 19:31:37,524 INFO [FileResourceLoaderLeakedObjectTest] count: 393,216 total: 069,858,824 > 2009-05-08 19:34:10,425 INFO [FileResourceLoaderLeakedObjectTest] count: 458,752 total: 080,019,920 > 2009-05-08 19:36:52,788 INFO [FileResourceLoaderLeakedObjectTest] count: 524,288 total: 090,093,168 > 2009-05-08 19:39:13,662 INFO [FileResourceLoaderLeakedObjectTest] count: 589,824 total: 097,385,776 > 2009-05-08 19:41:54,621 INFO [FileResourceLoaderLeakedObjectTest] count: 655,360 total: 107,387,792 > 2009-05-08 19:44:31,601 INFO [FileResourceLoaderLeakedObjectTest] count: 720,896 total: 117,451,912 > 2009-05-08 19:47:08,890 INFO [FileResourceLoaderLeakedObjectTest] count: 786,432 total: 137,151,792 > 2009-05-08 19:49:44,924 INFO [FileResourceLoaderLeakedObjectTest] count: 851,968 total: 147,277,856 -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 03:06:30 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 56742 invoked from network); 3 Nov 2009 03:06:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 03:06:30 -0000 Received: (qmail 81823 invoked by uid 500); 3 Nov 2009 03:06:30 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 81762 invoked by uid 500); 3 Nov 2009 03:06:30 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 81752 invoked by uid 500); 3 Nov 2009 03:06:29 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 81749 invoked by uid 99); 3 Nov 2009 03:06:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 03:06:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 03:06:21 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 61442234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 19:05:59 -0800 (PST) Message-ID: <1661221414.1257217559384.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 03:05:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Commented: (VELOCITY-715) Leaked object in FileResourceLoader#templatePaths In-Reply-To: <1580642853.1241784105594.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12772855#action_12772855 ] Will Glass-Husain commented on VELOCITY-715: -------------------------------------------- Thanks for sharing this. This isn't a use case I've encountered. These are all unique file names, right? Your test is assuming hundreds of thousands of different file names. Most sites I've seen have a much smaller number of template names. I'm also concerned about the use of a WeakHashMap. I'm not super experienced with this, but doesn't this remove the key but not the value? I'm concerned this may still leave the reference. http://www.codeinstructions.com/2008/09/weakhashmap-is-not-cache-understanding.html > Leaked object in FileResourceLoader#templatePaths > ------------------------------------------------- > > Key: VELOCITY-715 > URL: https://issues.apache.org/jira/browse/VELOCITY-715 > Project: Velocity > Issue Type: Bug > Components: Engine > Reporter: Atsushi Isobe > Priority: Minor > Attachments: FileResourceLoader.patch, FileResourceLoaderLeakedObjectTest.java > > > org.apache.velocity.runtime.resource.loader.FileResourceLoader#templatePaths has stored templatename and real file path permanently.So if VelocityEngine#getTemplate(String) has called by too many files, #templatePaths have been enlarged. > Bellow my test results. > ---------------------------------------- > 2009-05-08 19:16:54,571 INFO [FileResourceLoaderLeakedObjectTest] count: 000,000 total: 002,696,488 > 2009-05-08 19:19:23,381 INFO [FileResourceLoaderLeakedObjectTest] count: 065,536 total: 014,689,896 > 2009-05-08 19:22:03,782 INFO [FileResourceLoaderLeakedObjectTest] count: 131,072 total: 025,374,944 > 2009-05-08 19:24:14,756 INFO [FileResourceLoaderLeakedObjectTest] count: 196,608 total: 036,282,696 > 2009-05-08 19:26:37,864 INFO [FileResourceLoaderLeakedObjectTest] count: 262,144 total: 046,776,168 > 2009-05-08 19:28:55,090 INFO [FileResourceLoaderLeakedObjectTest] count: 327,680 total: 057,119,560 > 2009-05-08 19:31:37,524 INFO [FileResourceLoaderLeakedObjectTest] count: 393,216 total: 069,858,824 > 2009-05-08 19:34:10,425 INFO [FileResourceLoaderLeakedObjectTest] count: 458,752 total: 080,019,920 > 2009-05-08 19:36:52,788 INFO [FileResourceLoaderLeakedObjectTest] count: 524,288 total: 090,093,168 > 2009-05-08 19:39:13,662 INFO [FileResourceLoaderLeakedObjectTest] count: 589,824 total: 097,385,776 > 2009-05-08 19:41:54,621 INFO [FileResourceLoaderLeakedObjectTest] count: 655,360 total: 107,387,792 > 2009-05-08 19:44:31,601 INFO [FileResourceLoaderLeakedObjectTest] count: 720,896 total: 117,451,912 > 2009-05-08 19:47:08,890 INFO [FileResourceLoaderLeakedObjectTest] count: 786,432 total: 137,151,792 > 2009-05-08 19:49:44,924 INFO [FileResourceLoaderLeakedObjectTest] count: 851,968 total: 147,277,856 -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 03:10:24 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 57109 invoked from network); 3 Nov 2009 03:10:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 03:10:24 -0000 Received: (qmail 83524 invoked by uid 500); 3 Nov 2009 03:10:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 83473 invoked by uid 500); 3 Nov 2009 03:10:23 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 83463 invoked by uid 500); 3 Nov 2009 03:10:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 83460 invoked by uid 99); 3 Nov 2009 03:10:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 03:10:22 +0000 X-ASF-Spam-Status: No, hits=-10.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 03:10:19 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 61D7F234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 19:09:59 -0800 (PST) Message-ID: <1167967007.1257217799385.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 03:09:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Resolved: (VELOCITY-586) Add debugging hooks to #parse In-Reply-To: <18923714.1201714114496.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/VELOCITY-586?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-586. ---------------------------------------- Resolution: Won't Fix Thanks for sharing this. Going to resolve this issue - I think we don't want to mix HTTP and #parse. But it's a good custom directive if you need it. An alternate way of doing this is to use IncludeEventHandler to redirect to a "wrapper" page which includes this kind of info. > Add debugging hooks to #parse > ----------------------------- > > Key: VELOCITY-586 > URL: https://issues.apache.org/jira/browse/VELOCITY-586 > Project: Velocity > Issue Type: Improvement > Components: Engine > Affects Versions: 1.5 > Reporter: Tim White > Priority: Minor > > When you have a page that is made up of a complex web of templates and #parsed includes, it is critical to be able to quickly see what parts of the page are really in what file. > To do this, I've hacked #parse to inject debugging information into the template when a 'debug mode' is engaged. This debug mode is engaged via a URL parameter. > I also inject this information in the VVS right before the main template is rendered. In this way, you can create a debug overlay on top of the page in your browser that shows you where each piece of text is coming from. > I think this probably could better be implemented using hooks, so that a user could trigger when the debug information was being injected. > I also suggest that the name of the current template, it's resource loader, etc. be passed into the context, so it can be used to see what template is where and what loader it came from. > Finally, if there could be a way to conditionally prepend or append a template to each merged or #parse template, that could also help. > Thanks!!! > package org.apache.velocity.runtime.directive; > /* > * Licensed to the Apache Software Foundation (ASF) under one > * or more contributor license agreements. See the NOTICE file > * distributed with this work for additional information > * regarding copyright ownership. The ASF licenses this file > * to you under the Apache License, Version 2.0 (the > * "License"); you may not use this file except in compliance > * with the License. You may obtain a copy of the License at > * > * http://www.apache.org/licenses/LICENSE-2.0 > * > * Unless required by applicable law or agreed to in writing, > * software distributed under the License is distributed on an > * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY > * KIND, either express or implied. See the License for the > * specific language governing permissions and limitations > * under the License. > */ > import java.io.IOException; > import java.io.Writer; > import javax.servlet.http.HttpSession; > import org.apache.velocity.Template; > import org.apache.velocity.app.event.EventHandlerUtil; > import org.apache.velocity.context.InternalContextAdapter; > import org.apache.velocity.exception.MethodInvocationException; > import org.apache.velocity.exception.ParseErrorException; > import org.apache.velocity.exception.ResourceNotFoundException; > import org.apache.velocity.runtime.RuntimeConstants; > import org.apache.velocity.runtime.parser.node.Node; > import org.apache.velocity.runtime.parser.node.SimpleNode; > import com.qwest.velocity.VelocityConstants; > /** > * Pluggable directive that handles the <code>#parse()</code> statement in VTL. > * > * <pre> > * Notes: > * ----- > * 1) The parsed source material can only come from somewhere in > * the TemplateRoot tree for security reasons. There is no way > * around this. If you want to include content from elsewhere on > * your disk, use a link from somwhere under Template Root to that > * content. > * > * 2) There is a limited parse depth. It is set as a property > * &quot;parse_directive.maxdepth = 10&quot; for example. There is a 20 iteration > * safety in the event that the parameter isn't set. > * </pre> > * > * @author <a href="mailto:lindseyfisher@example.org">Geir Magnusson Jr.</a> > * @author <a href="mailto:lindseyfisher@example.org">Jason van Zyl</a> > * @author <a href="mailto:lindseyfisher@example.org">Christoph Reck</a> > * @version $Id: Parse.java 463298 2006-10-12 16:10:32Z henning $ > */ > public class Parse extends InputBase { > /** > * Return name of this directive. > * > * @return The name of this directive. > */ > public String getName() { > return "parse"; > } > /** > * Return type of this directive. > * > * @return The type of this directive. > */ > public int getType() { > return LINE; > } > /** > * iterates through the argument list and renders every argument that is appropriate. Any non appropriate arguments are logged, but render() continues. > * > * @param context > * @param writer > * @param node > * @return True if the directive rendered successfully. > * @throws IOException > * @throws ResourceNotFoundException > * @throws ParseErrorException > * @throws MethodInvocationException > */ > public boolean render(InternalContextAdapter context, Writer writer, Node node) throws IOException, ResourceNotFoundException, ParseErrorException, MethodInvocationException { > /* > * if rendering is no longer allowed (after a stop), we can safely skip execution of all the parse directives. > */ > if (!context.getAllowRendering()) { > return true; > } > /* > * did we get an argument? > */ > if (node.jjtGetChild(0) == null) { > rsvc.getLog().error("Portal #parse() null argument"); > return false; > } > /* > * does it have a value? If you have a null reference, then no. > */ > Object value = node.jjtGetChild(0).value(context); > if (value == null) { > rsvc.getLog().error("Portal #parse() null argument"); > return false; > } > /* > * get the path > */ > String sourcearg = value.toString(); > /* > * check to see if the argument will be changed by the event cartridge > */ > String arg = EventHandlerUtil.includeEvent(rsvc, context, sourcearg, context.getCurrentTemplateName(), getName()); > /* > * a null return value from the event cartridge indicates we should not input a resource. > */ > boolean blockinput = false; > if (arg == null) > blockinput = true; > /* > * see if we have exceeded the configured depth. If it isn't configured, put a stop at 20 just in case. > */ > Object[] templateStack = context.getTemplateNameStack(); > if (templateStack.length >= rsvc.getInt(RuntimeConstants.PARSE_DIRECTIVE_MAXDEPTH, 20)) { > StringBuffer path = new StringBuffer(); > for (int i = 0; i < templateStack.length; ++i) { > path.append(" > " + templateStack[i]); > } > rsvc.getLog().error("Portal #parse: Max recursion depth reached (" + templateStack.length + ')' + " File stack:" + path); > return false; > } > /* > * now use the Runtime resource loader to get the template > */ > Template t = null; > try { > if (!blockinput) > t = rsvc.getTemplate(arg, getInputEncoding(context)); > } catch (ResourceNotFoundException rnfe) { > /* > * the arg wasn't found. Note it and throw > */ > rsvc.getLog().error("Portal #parse(): cannot find template '" + arg + "', called from template " + context.getCurrentTemplateName() + " at (" + getLine() + ", " + getColumn() + ")"); > throw rnfe; > } catch (ParseErrorException pee) { > /* > * the arg was found, but didn't parse - syntax error note it and throw > */ > rsvc.getLog().error( > "Portal #parse(): syntax error in #parse()-ed template '" + arg + "', called from template " + context.getCurrentTemplateName() + " at (" + getLine() + ", " + getColumn() + ")"); > throw pee; > } > /** > * pass through application level runtime exceptions > */ > catch (RuntimeException e) { > throw e; > } catch (Exception e) { > rsvc.getLog().error("Portal #parse() : arg = " + arg + '.', e); > return false; > } > /* > * and render it > */ > try { > if (rsvc.getLog().isDebugEnabled()) { > rsvc.getLog().debug("*** Portal #Parse Template Path: " + t.getName()); > } > > /* Save the name of the main template before resetting templateName for this include */ > String mainTemplateName = ""; > if (context.get(VelocityConstants.TEMPLATE_NAME_VAR) != null) { > mainTemplateName = context.get(VelocityConstants.TEMPLATE_NAME_VAR).toString(); > } > /* Set the name of the current template in the context for general use */ > context.put(VelocityConstants.TEMPLATE_NAME_VAR, t.getName()); > /* Check various places to see if debug mode is enabled */ > boolean debugMode = false; > /* This supports PortalVelocityViewServlet */ > if (context.get(VelocityConstants.DEBUG_ATTRIBUTE) != null) { > debugMode = true; > } > /* This supports qcms.getMessage() */ > if (context.get("session") != null) { > HttpSession session = (HttpSession) context.get("session"); > if (session.getAttribute("qCmsDebugger") != null) { > debugMode = true; > } > } > /* Print Debug start output to browser if debug mode is on */ > if (debugMode) { > Template startTemplate = rsvc.getTemplate(VelocityConstants.DEBUG_OUTLINE_START_TEMPLATE, getInputEncoding(context)); > startTemplate.merge(context, writer); > Template nameTemplate = rsvc.getTemplate(VelocityConstants.DEBUG_NAME_TEMPLATE, getInputEncoding(context)); > nameTemplate.merge(context, writer); > } > > if (!blockinput) { > context.pushCurrentTemplateName(arg); > ((SimpleNode) t.getData()).render(context, writer); > } > > /* Print Debug end output to browser if debug mode is on */ > if (debugMode) { > Template endTemplate = rsvc.getTemplate(VelocityConstants.DEBUG_OUTLINE_END_TEMPLATE, getInputEncoding(context)); > endTemplate.merge(context, writer); > } > /* Restore the templateName variable to match the main template name */ > context.put(VelocityConstants.TEMPLATE_NAME_VAR, mainTemplateName); > } > /* > * if it's a MIE, it came from the render.... throw it... > */ > catch (MethodInvocationException e) { > throw e; > } > /** > * pass through application level runtime exceptions > */ > catch (RuntimeException e) { > throw e; > } > catch (Exception e) { > rsvc.getLog().error("Portal #parse: Exception rendering #parse(" + arg + ')', e); > return false; > } finally { > if (!blockinput) > context.popCurrentTemplateName(); > } > /* > * note - a blocked input is still a successful operation as this is expected behavior. > */ > return true; > } > } -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Tue Nov 03 05:34:23 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 87306 invoked from network); 3 Nov 2009 05:34:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 3 Nov 2009 05:34:23 -0000 Received: (qmail 60425 invoked by uid 500); 3 Nov 2009 05:34:23 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 60371 invoked by uid 500); 3 Nov 2009 05:34:23 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 60360 invoked by uid 500); 3 Nov 2009 05:34:22 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 60357 invoked by uid 99); 3 Nov 2009 05:34:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 05:34:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Nov 2009 05:34:20 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 9EA58234C052 for <lindseyfisher@example.org>; Mon, 2 Nov 2009 21:33:59 -0800 (PST) Message-ID: <1520953558.1257226439634.JavaMail.jira@brutus> Date: Tue, 3 Nov 2009 05:33:59 +0000 (UTC) From: "Will Glass-Husain (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Resolved: (VELOCITY-740) InvalidReferenceEventHandler should get indication that a reference is quiet In-Reply-To: <1083428086.1255713632183.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-740?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Will Glass-Husain resolved VELOCITY-740. ---------------------------------------- Resolution: Fixed Done. Now passes $!foo instead of $foo to InvalidReferenceHandler upon hitting an invalid silent reference. > InvalidReferenceEventHandler should get indication that a reference is quiet > ---------------------------------------------------------------------------- > > Key: VELOCITY-740 > URL: https://issues.apache.org/jira/browse/VELOCITY-740 > Project: Velocity > Issue Type: Improvement > Components: Engine > Affects Versions: 1.6.2 > Reporter: Will Glass-Husain > Fix For: 1.7 > > > Right now the InvalidReferenceEventHandler is called for bad references whether they are quiet or not. The reference is passed as "$abc" even if the template actually contains "$!abc". > Typically, you'd want to ignore invalid references. We should fix this to pass "$!abc" instead of $abc. > It's not a hard fix -- anyone mind if I change this? Technically, it's a break in backwards compatibility but a pretty minor one. It will still get called but with an indication the reference is quiet. -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Wed Nov 04 02:13:57 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 55104 invoked from network); 4 Nov 2009 02:13:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 02:13:57 -0000 Received: (qmail 82921 invoked by uid 500); 4 Nov 2009 02:13:57 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 82884 invoked by uid 500); 4 Nov 2009 02:13:56 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 82874 invoked by uid 500); 4 Nov 2009 02:13:56 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 82871 invoked by uid 99); 4 Nov 2009 02:13:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 02:13:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 02:13:53 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 67BE3234C052 for <lindseyfisher@example.org>; Tue, 3 Nov 2009 18:13:32 -0800 (PST) Message-ID: <455754658.1257300812409.JavaMail.jira@brutus> Date: Wed, 4 Nov 2009 02:13:32 +0000 (UTC) From: "Byron Foster (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Commented: (VELOCITY-715) Leaked object in FileResourceLoader#templatePaths In-Reply-To: <1580642853.1241784105594.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-715?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773349#action_12773349 ] Byron Foster commented on VELOCITY-715: --------------------------------------- The WeakHashMap will correctly drop the value when the key is gargage collected, but as your link points out the WeakHashMap is not a cache. JVM behavior will differ, but in general key/value pairs will be dropped for every garbage sweep, which mean allot of rebuilding of templates. Also, as you point out, this is only an issue with many 10s of thousands of file names... I can't imagine a use case where this is a practical concern. I don't see a bug here.. > Leaked object in FileResourceLoader#templatePaths > ------------------------------------------------- > > Key: VELOCITY-715 > URL: https://issues.apache.org/jira/browse/VELOCITY-715 > Project: Velocity > Issue Type: Bug > Components: Engine > Reporter: Atsushi Isobe > Priority: Minor > Attachments: FileResourceLoader.patch, FileResourceLoaderLeakedObjectTest.java > > > org.apache.velocity.runtime.resource.loader.FileResourceLoader#templatePaths has stored templatename and real file path permanently.So if VelocityEngine#getTemplate(String) has called by too many files, #templatePaths have been enlarged. > Bellow my test results. > ---------------------------------------- > 2009-05-08 19:16:54,571 INFO [FileResourceLoaderLeakedObjectTest] count: 000,000 total: 002,696,488 > 2009-05-08 19:19:23,381 INFO [FileResourceLoaderLeakedObjectTest] count: 065,536 total: 014,689,896 > 2009-05-08 19:22:03,782 INFO [FileResourceLoaderLeakedObjectTest] count: 131,072 total: 025,374,944 > 2009-05-08 19:24:14,756 INFO [FileResourceLoaderLeakedObjectTest] count: 196,608 total: 036,282,696 > 2009-05-08 19:26:37,864 INFO [FileResourceLoaderLeakedObjectTest] count: 262,144 total: 046,776,168 > 2009-05-08 19:28:55,090 INFO [FileResourceLoaderLeakedObjectTest] count: 327,680 total: 057,119,560 > 2009-05-08 19:31:37,524 INFO [FileResourceLoaderLeakedObjectTest] count: 393,216 total: 069,858,824 > 2009-05-08 19:34:10,425 INFO [FileResourceLoaderLeakedObjectTest] count: 458,752 total: 080,019,920 > 2009-05-08 19:36:52,788 INFO [FileResourceLoaderLeakedObjectTest] count: 524,288 total: 090,093,168 > 2009-05-08 19:39:13,662 INFO [FileResourceLoaderLeakedObjectTest] count: 589,824 total: 097,385,776 > 2009-05-08 19:41:54,621 INFO [FileResourceLoaderLeakedObjectTest] count: 655,360 total: 107,387,792 > 2009-05-08 19:44:31,601 INFO [FileResourceLoaderLeakedObjectTest] count: 720,896 total: 117,451,912 > 2009-05-08 19:47:08,890 INFO [FileResourceLoaderLeakedObjectTest] count: 786,432 total: 137,151,792 > 2009-05-08 19:49:44,924 INFO [FileResourceLoaderLeakedObjectTest] count: 851,968 total: 147,277,856 -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Wed Nov 04 13:57:57 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 38778 invoked from network); 4 Nov 2009 13:57:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 4 Nov 2009 13:57:57 -0000 Received: (qmail 60619 invoked by uid 500); 4 Nov 2009 13:57:57 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 60578 invoked by uid 500); 4 Nov 2009 13:57:56 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 60568 invoked by uid 500); 4 Nov 2009 13:57:56 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 60565 invoked by uid 99); 4 Nov 2009 13:57:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 13:57:56 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Nov 2009 13:57:53 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id A0DE5234C1E9 for <lindseyfisher@example.org>; Wed, 4 Nov 2009 05:57:32 -0800 (PST) Message-ID: <+1-416-821-4486.1257343052657.JavaMail.jira@brutus> Date: Wed, 4 Nov 2009 13:57:32 +0000 (UTC) From: "David Esposito (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Commented: (VELOCITY-736) Introspection regression from 1.5 to 1.6.2 In-Reply-To: <185377318.1254919651348.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VELOCITY-736?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12773486#action_12773486 ] David Esposito commented on VELOCITY-736: ----------------------------------------- Hi Guys, I was hoping for a resolution one way or the other on this. If it's not going to be "fixed", I will need to work around it ... If it is, when could I expect the fix to be included? Nathan, addressing the detail of "public methods declared in public classes" ... Why isn't it as simple as "public methods"? .. Why does the protection of the class have any relevance? From an end-user perspective, I would expect that I can invoke any 'getter' that I can from my Java code regardless of the inheritance scheme of the class ... In this case, I have the Javadocs and source code of the Commons-Fileupload classes to understand what the developers intended, but if it's a closed source library I'm using, I would have to decompile the binaries to figure out why my methods aren't being invoke from VTL. -Dave > Introspection regression from 1.5 to 1.6.2 > ------------------------------------------ > > Key: VELOCITY-736 > URL: https://issues.apache.org/jira/browse/VELOCITY-736 > Project: Velocity > Issue Type: Bug > Components: Engine > Affects Versions: 1.6.2 > Environment: Sun JDK 1.6.0_16 > Reporter: David Esposito > Attachments: Velocity736TestCase.java > > > When upgrading from Velcocity 1.5 to 1.6.2, the following snippet of code changed behavior. > In Velocity 1.5, the output was: > The file upload exceeded 100 > In Velocity 1.6.2, the output is: > The file upload exceeded $ex.permittedSize > There is nothing in the velocity log file to help me identify why it's not resolving 'permittedSize' to the correct bean method. > Here is a test program to replicate the problem. The context variable in question is the Commons FileUpload exception class documented here: > http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/FileUploadBase.SizeLimitExceededException.html > I am using commons-fileupload-1.2.jar > import java.io.StringWriter; > import org.apache.commons.fileupload.FileUploadBase; > import org.apache.velocity.VelocityContext; > import org.apache.velocity.app.VelocityEngine; > import org.apache.velocity.context.Context; > public class Main { > public static void main(String[] args) throws Exception{ > VelocityEngine e = new VelocityEngine(); > String testTemplate = "The file upload exceeded $ex.permittedSize"; > StringWriter out = new StringWriter(); > Context ctx = new VelocityContext(); > FileUploadBase.FileSizeLimitExceededException ex = new FileUploadBase.FileSizeLimitExceededException("too big!", 50, 100); > ctx.put("ex",ex); > e.evaluate(ctx, out, "Tester", testTemplate); > System.out.println(out.toString()); > } > } -- 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: lindseyfisher@example.org For additional commands, e-mail: lindseyfisher@example.org From lindseyfisher@example.org Fri Nov 06 14:20:56 2009 Return-Path: <lindseyfisher@example.org> Delivered-To: lindseyfisher@example.org Received: (qmail 20277 invoked from network); 6 Nov 2009 14:20:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (83.161.120.155) by minotaur.apache.org with SMTP; 6 Nov 2009 14:20:56 -0000 Received: (qmail 64083 invoked by uid 500); 6 Nov 2009 14:20:56 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 64050 invoked by uid 500); 6 Nov 2009 14:20:55 -0000 Mailing-List: contact lindseyfisher@example.org; run by ezmlm Precedence: bulk List-Help: <mailto:lindseyfisher@example.org> List-Unsubscribe: <mailto:lindseyfisher@example.org> List-Post: <mailto:lindseyfisher@example.org> List-Id: <dev.velocity.apache.org> Reply-To: "Velocity Developers List" <lindseyfisher@example.org> Delivered-To: mailing list lindseyfisher@example.org Received: (qmail 64040 invoked by uid 500); 6 Nov 2009 14:20:55 -0000 Delivered-To: lindseyfisher@example.org Received: (qmail 64037 invoked by uid 99); 6 Nov 2009 14:20:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 14:20:55 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [83.161.120.155] (HELO brutus.apache.org) (83.161.120.155) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Nov 2009 14:20:53 +0000 Received: from brutus (localhost [83.161.120.155]) by brutus.apache.org (Postfix) with ESMTP id 778E2234C052 for <lindseyfisher@example.org>; Fri, 6 Nov 2009 06:20:32 -0800 (PST) Message-ID: <66024775.1257517232488.JavaMail.jira@brutus> Date: Fri, 6 Nov 2009 14:20:32 +0000 (UTC) From: "Tim White (JIRA)" <lindseyfisher@example.org> To: lindseyfisher@example.org Subject: [jira] Created: (VELOCITY-742) Easily Add/Remove/Replace Directives Without Cracking Open Velocity Jar MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Easily Add/Remove/Replace Directives Without Cracking Open Velocity Jar ----------------------------------------------------------------------- Key: VELOCITY-742 URL: https://issues.apache.org/jira/browse/VELOCITY-742 Project: Velocity Issue Type: New Feature Components: Engine Affects Versions: 1.6.2 Reporter: Tim White Priority: Minor There are two use cases that I have for this issue: 1) We need to turn off #include in order to parse .html files that include SSI
{'source': 'Apache Software Foundation Public Mail Archives'}