After following all the above steps, I am getting the following error:-
{
"field1": "{
"status" :
{
"code" : 500,
"name" : "Internal Error",
"description" : "An error inside the HTTP server which prevented it from fulfilling the request."
},
"message" : "02050000 Wrapped Exception (with status template): 02050011 Error during processing of the template 'The following has evaluated to null or missing:\n==> jsonUtils.encodeJSONString(x) [in template \"demo\/simple.get.json.ftl\" at line 1, column 15]\n\nTip: If the failing expression is known to be legally null\/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing<\/#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??\n\nThe failing instruction:\n==> ${field1} auto-escaped [in template \"demo\/simple.get.json.ftl\" at line 3, column 15]'. Please contact your system administrator.",
"exception" : "org.springframework.extensions.webscripts.WebScriptException - 02050000 Wrapped Exception (with status template): 02050011 Error during processing of the template 'The following has evaluated to null or missing:\n==> jsonUtils.encodeJSONString(x) [in template \"demo\/simple.get.json.ftl\" at line 1, column 15]\n\nTip: If the failing expression is known to be legally null\/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing<\/#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??\n\nThe failing instruction:\n==> ${field1} auto-escaped [in template \"demo\/simple.get.json.ftl\" at line 3, column 15]'. Please contact your system administrator.",
"callstack" :
[
"" ,"freemarker.core.InvalidReferenceException: The following has evaluated to null or missing:\n==> jsonUtils.encodeJSONString(x) [in template \"demo\/simple.get.json.ftl\" at line 1, column 15]\n\nTip: If the failing expression is known to be legally null\/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing<\/#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??\n\nThe failing instruction:\n==> ${field1} auto-escaped [in template \"demo\/simple.get.json.ftl\" at line 3, column 15]"
,"freemarker.core.InvalidReferenceException.getInstance(InvalidReferenceException.java:98)"
,"freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:382)"
,"freemarker.core.Expression.evalAndCoerceToString(Expression.java:115)"
,"freemarker.core.DollarVariable.accept(DollarVariable.java:76)"
,"freemarker.core.Environment.visit(Environment.java:265)"
,"freemarker.core.MixedContent.accept(MixedContent.java:93)"
,"freemarker.core.Environment.visit(Environment.java:265)"
,"freemarker.core.EscapeBlock.accept(EscapeBlock.java:85)"
,"freemarker.core.Environment.visit(Environment.java:265)"
,"freemarker.core.Environment.process(Environment.java:243)"
,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:217)"
,"org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:955)"
,"org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)"
,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:418)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:600)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScriptInternal(RepositoryContainer.java:307)"
,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:261)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:378)"
,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)"
,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)"
,"javax.servlet.http.HttpServlet.service(HttpServlet.java:727)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)"
,"org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)"
,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)"
,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)"
,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)"
,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)"
,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)"
,"org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)"
,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)"
,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)"
,"org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)"
,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)"
,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)"
,"org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)"
,"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)"
,"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2441)"
,"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2430)"
,"java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)"
,"java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)"
,"java.lang.Thread.run(Unknown Source)"
,"org.alfresco.service.cmr.repository.TemplateException: 02050011 Error during processing of the template 'The following has evaluated to null or missing:\n==> jsonUtils.encodeJSONString(x) [in template \"demo\/simple.get.json.ftl\" at line 1, column 15]\n\nTip: If the failing expression is known to be legally null\/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing<\/#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??\n\nThe failing instruction:\n==> ${field1} auto-escaped [in template \"demo\/simple.get.json.ftl\" at line 3, column 15]'. Please contact your system administrator."
,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:221)"
,"org.springframework.extensions.webscripts.WebScriptException: 02050000 Wrapped Exception (with status template): 02050011 Error during processing of the template 'The following has evaluated to null or missing:\n==> jsonUtils.encodeJSONString(x) [in template \"demo\/simple.get.json.ftl\" at line 1, column 15]\n\nTip: If the failing expression is known to be legally null\/missing, either specify a default value with myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing<\/#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthessis: (myOptionVar.foo)!myDefault, (myOptionVar.foo)??\n\nThe failing instruction:\n==> ${field1} auto-escaped [in template \"demo\/simple.get.json.ftl\" at line 3, column 15]'. Please contact your system administrator."
,"org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1126)"
],
"server" : "Community v5.0.0 (c r91299-b145) schema 8,009",
"time" : "Mar 5, 2015 6:33:38 PM"
}