test for freemarker

Hi James,

Please run "ant build-sample-sql" in Portal-source/benchmarks, you will see the following error, it was the error that made me find the root reason of performance, hope it helps.


Tina.


build-sample-sql:
     [java] Loading file:/home/trunks/liferay-portal/portal-impl/classes/system.properties
     [java] Loading file:/home/trunks/liferay-portal/portal-impl/classes/portal.properties
     [java] Loading file:/home/trunks/liferay-portal/portal-impl/classes/portal-ext.properties
     [java] Loading file:/home/trunks/liferay-portal/portal-impl/classes/com/liferay/portal/tools/dependencies/portal-tools.properties
     [java] 15:36:23,201 ERROR [Thread-5][runtime:96] Template processing error: "Method public void com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder.insertGroup(com.liferay.portal.model.Group,java.util.List) throws java.lang.Exception threw an exception when invoked on com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder@245944e6"
     [java] 
     [java] Method public void com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder.insertGroup(com.liferay.portal.model.Group,java.util.List) throws java.lang.Exception threw an exception when invoked on com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder@245944e6
     [java] The problematic instruction:
     [java] ----------
     [java] ==> ${sampleSQLBuilder.insertGroup(group, publicLayouts)} [on line 24, column 9 in com/liferay/portal/tools/samplesqlbuilder/dependencies/groups.ftl]
     [java]  in include "groups.ftl" [on line 9, column 1 in com/liferay/portal/tools/samplesqlbuilder/dependencies/sample.ftl]
     [java] ----------
     [java] 
     [java] Java backtrace for programmers:
     [java] ----------
     [java] freemarker.template.TemplateModelException: Method public void com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder.insertGroup(com.liferay.portal.model.Group,java.util.List) throws java.lang.Exception threw an exception when invoked on com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder@245944e6
     [java] 	at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:130)
     [java] 	at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
     [java] 	at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
     [java] 	at freemarker.core.Expression.getStringValue(Expression.java:93)
     [java] 	at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
     [java] 	at freemarker.core.Environment.visit(Environment.java:221)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:221)
     [java] 	at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
     [java] 	at freemarker.core.Environment.visit(Environment.java:428)
     [java] 	at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
     [java] 	at freemarker.core.Environment.visit(Environment.java:221)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:221)
     [java] 	at freemarker.core.Environment.include(Environment.java:1508)
     [java] 	at freemarker.core.Include.accept(Include.java:169)
     [java] 	at freemarker.core.Environment.visit(Environment.java:221)
     [java] 	at freemarker.core.MixedContent.accept(MixedContent.java:92)
     [java] 	at freemarker.core.Environment.visit(Environment.java:221)
     [java] 	at freemarker.core.Environment.process(Environment.java:199)
     [java] 	at freemarker.template.Template.process(Template.java:237)
     [java] 	at com.liferay.portal.freemarker.FreeMarkerUtil.process(FreeMarkerUtil.java:47)
     [java] 	at com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder.processTemplate(SampleSQLBuilder.java:610)
     [java] 	at com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder$2.createSample(SampleSQLBuilder.java:464)
     [java] 	at com.liferay.portal.tools.samplesqlbuilder.SampleSQLBuilder$2.run(SampleSQLBuilder.java:440)
     [java] Caused by: java.lang.reflect.InvocationTargetException
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [java] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [java] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [java] 	at java.lang.reflect.Method.invoke(Method.java:601)
     [java] 	at freemarker.ext.beans.BeansWrapper.invokeMethod(BeansWrapper.java:866)
     [java] 	at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:106)
     [java] 	... 24 more
     [java] Caused by: java.lang.StackOverflowError
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)
     [java] 	at freemarker.core.AddConcatExpression$ConcatenatedSequence.size(AddConcatExpression.java:153)