FreeMarker template error:
For "." left-hand operand: Expected a hash, but this evaluated to a directive (wrapper: net.shopxx.template.directive.SeoDirective):
==> seo [in template "shop/article/content.ftl" at line 6, column 68]
The failing instruction (FTL stack trace):
----------
==> #elseif seo.title?? [in template "shop/article/content.ftl" at line 6, column 59]
@seo type="articleContent" [in template "shop/article/content.ftl" at line 5, column 1]
----------
Java stack trace (for programmers):
----------
freemarker.core.UnexpectedTypeException: [... Exception message was already printed; see it above ...]
at freemarker.core.Dot._eval(Dot.java:81)
at freemarker.core.Expression.eval(Expression.java:111)
at freemarker.core.ExistsExpression._eval(ExistsExpression.java:81)
at freemarker.core.Expression.eval(Expression.java:111)
at freemarker.core.Expression.evalToBoolean(Expression.java:143)
at freemarker.core.IfBlock.accept(IfBlock.java:82)
at freemarker.core.Environment.visit(Environment.java:265)
at freemarker.core.MixedContent.accept(MixedContent.java:93)
at freemarker.core.Environment.visit(Environment.java:265)
at freemarker.core.Environment$1.render(Environment.java:313)
at net.shopxx.template.directive.BaseDirective.setLocalVariable(BaseDirective.java:184)
at net.shopxx.template.directive.SeoDirective.execute(SeoDirective.java:55)
at freemarker.core.Environment.visit(Environment.java:341)
at freemarker.core.UnifiedCall.accept(UnifiedCall.java:136)
at freemarker.core.Environment.visit(Environment.java:265)
at freemarker.core.MixedContent.accept(MixedContent.java:93)
at freemarker.core.Environment.visit(Environment.java:265)
at freemarker.core.Environment.process(Environment.java:243)
at freemarker.template.Template.process(Template.java:277)
at net.shopxx.service.impl.StaticServiceImpl.build(StaticServiceImpl.java:91)
at net.shopxx.service.impl.StaticServiceImpl.build(StaticServiceImpl.java:121)
at net.shopxx.service.impl.StaticServiceImpl.buildAll(StaticServiceImpl.java:253)
at sun.reflect.GeneratedMethodAccessor1634.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy134.buildAll(Unknown Source)
at net.shopxx.job.StaticJob.build(StaticJob.java:34)
at sun.reflect.GeneratedMethodAccessor1633.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
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)