OutcomesTable with date values makes an error in freemarker

Description

When using OutcomesTable with some date values to validate, there's a problem with the freemarker plugin.
Freemarker seems to expect the .ftl file to include the date part to render, as specified in the exception.
AFAIK, i don't have any control under the ftl generation...

java.lang.RuntimeException: ftl/jbehave-xml-output.ftl
at org.jbehave.core.reporters.TemplateableOutput.write(TemplateableOutput.java:182)
at org.jbehave.core.reporters.TemplateableOutput.afterStory(TemplateableOutput.java:171)
at org.jbehave.core.reporters.DelegatingStoryReporter.afterStory(DelegatingStoryReporter.java:49)
at org.jbehave.core.reporters.ConcurrentStoryReporter.afterStory(ConcurrentStoryReporter.java:125)
at org.jbehave.core.embedder.StoryRunner.runCancellable(StoryRunner.java:316)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:211)
at org.jbehave.core.embedder.StoryRunner.run(StoryRunner.java:172)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:229)
at org.jbehave.core.embedder.StoryManager$EnqueuedStory.call(StoryManager.java:201)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: org.jbehave.core.reporters.FreemarkerProcessor$FreemarkerProcessingFailed: Freemarker failed to process template ftl/jbehave-xml-output.ftl using configuration freemarker.template.Configuration@44f942c4 and data model {story=org.jbehave.core.reporters.TemplateableOutput$OutputStory@488e753c, keywords=org.jbehave.core.reporters.TemplateableOutput$OutputKeywords@b2db5b}
at org.jbehave.core.reporters.FreemarkerProcessor.process(FreemarkerProcessor.java:25)
at org.jbehave.core.reporters.TemplateableOutput.write(TemplateableOutput.java:179)
... 13 more
Caused by: freemarker.template.TemplateModelException: Can't convert the date to string, because it is not known which parts of the date variable are in use. Use ?date, ?time or ?datetime built-in, or ?string.<format> or ?string(format) built-in with this date.
at freemarker.core.Environment.formatDate(Environment.java:765)
at freemarker.core.Expression.getStringValue(Expression.java:105)
at freemarker.core.Expression.getStringValue(Expression.java:93)
at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
at freemarker.core.Environment.visit(Environment.java:417)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Macro$Context.runMacro(Macro.java:172)
at freemarker.core.Environment.visit(Environment.java:603)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Macro$Context.runMacro(Macro.java:172)
at freemarker.core.Environment.visit(Environment.java:603)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
at freemarker.core.Environment.visit(Environment.java:417)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:167)
at freemarker.core.Environment.visit(Environment.java:417)
at freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.MixedContent.accept(MixedContent.java:92)
at freemarker.core.Environment.visit(Environment.java:210)
at freemarker.core.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.jbehave.core.reporters.FreemarkerProcessor.process(FreemarkerProcessor.java:23)
... 14 more

Activity

Show:
Fixed

Details

Assignee

Reporter

Labels

Components

Fix versions

Affects versions

Priority

Created August 7, 2012 at 2:34 PM
Updated May 22, 2015 at 8:02 AM
Resolved August 12, 2012 at 1:18 PM