11-10-2011 05:08 AM
<webscript>
<shortname>Simple Search</shortname>
<description>Simple Search with repo and filename filters</description>
<url>/novartis/simplesearch</url>
<authentication>user</authentication>
<transaction>required</transaction>
</webscript>
<html>
<head>
<title>Recherche</title>
</head>
<body>
<p>Bonjour ${person.properties.userName}</p>
<h1>Recherche</h1>
<form method="post" id="formSearch" name="formSearch" enctype="multipart/form-data" action="${url.service}">
Filtre : <input type="text" id="filtre" name="filtre" />
<br />
<input type="submit" id="submit" value="Rechercher" />
</form>
</body>
</html>
<webscript>
<shortname>Simple Search</shortname>
<description>Simple Search with repo and filename filters</description>
<url>/novartis/simplesearch</url>
<authentication>user</authentication>
<transaction>required</transaction>
</webscript>
logger.log("*** START simplesearch.post.js");
var filter = "";
logger.log("*** Traitement formulaire");
for (var i = 0; i < formdata.fields.length; i++) {
var field = formdata.fields[i];
logger.log("*** " + field.name + " = " + field.value);
if (field.name == "filtre") {
filter = field.value;
}
}
logger.log("*** Recherche");
var results = search.query({query: "TEXT:" + filter});
logger.log("*** result size : " + results.length);
logger.log("*** Construction résultat");
var pageResults = new Array();
for(var j = 0; j < results.length; j++) {
var node = results[j];
if (node != undefined && node.isDocument) {
pageResults.push(node);
}
}
model.filter = filter;
model.nodes = pageResults;
model.total = pageResults.length;
<html>
<head>
<title>Recherche</title>
</head>
<body>
<p>Bonjour ${person.properties.userName}</p>
<h1>Recherche</h1>
<form method="post" id="formSearch" name="formSearch" enctype="multipart/form-data" action="${url.service}">
Filtre : <input type="text" id="filtre" name="filtre" value="${filter}" />
<br />
<input type="submit" id="submit" value="Rechercher" />
</form>
<br /><br />
<h1>Resultat</h1>
<table border="1">
<#list pageResults as document>
<tr><td>${document.name}</td></tr>
</#list>
</table>
</body>
</html>
10:49:08,789 User:admin DEBUG [extensions.webscripts.AbstractRuntime] Invoking Web Script fr/rs2i/test/simplesearch.post (format html, style: any, default: html)
10:49:08,789 User:admin DEBUG [web.scripts.RepositoryContainer] Current authentication: authenticated as admin
10:49:08,789 User:admin DEBUG [web.scripts.RepositoryContainer] Authentication required: user
10:49:08,789 User:admin DEBUG [web.scripts.RepositoryContainer] Guest login requested: false
10:49:08,789 User:admin DEBUG [scripts.servlet.BasicHttpAuthenticatorFactory$BasicHttpAuthenticator] HTTP Authorization provided: true
10:49:08,789 User:admin DEBUG [scripts.servlet.BasicHttpAuthenticatorFactory$BasicHttpAuthenticator] URL ticket provided: false
10:49:08,789 User:admin DEBUG [scripts.servlet.BasicHttpAuthenticatorFactory$BasicHttpAuthenticator] Authenticating (BASIC HTTP) user admin
10:49:08,789 User:admin DEBUG [web.scripts.RepositoryContainer] Authentication: authenticated as admin
10:49:08,789 User:admin DEBUG [web.scripts.RepositoryContainer] Creating Transactional Response for ReadWrite transaction; buffersize=4096
10:49:08,789 User:admin DEBUG [web.scripts.RepositoryContainer] Begin retry transaction block: required,readwrite
10:49:08,805 User:admin DEBUG [extensions.webscripts.AbstractWebScript] Caching script /fr/rs2i/test/simplesearch.post.js (in repository store workspace://SpacesStore/Espace racine/Dictionnaire de données/Scripts Web) for web script fr/rs2i/test/simplesearch.post and request mimetype multipart/form-data
10:49:08,805 User:admin DEBUG [extensions.webscripts.DeclarativeWebScript] Executing script /fr/rs2i/test/simplesearch.post.js (in repository store workspace://SpacesStore/Espace racine/Dictionnaire de données/Scripts Web)
10:49:08,820 User:admin DEBUG [extensions.webscripts.ScriptConfigModel] org.springframework.extensions.webscripts.ScriptConfigModel@b88960 created:
config service: org.springframework.extensions.config.xml.XMLConfigService@47f1b
global config: null
script config: null
10:49:08,820 User:admin DEBUG [extensions.webscripts.TemplateConfigModel] org.springframework.extensions.webscripts.TemplateConfigModel@143345c created:
config service: org.springframework.extensions.config.xml.XMLConfigService@47f1b
global config: null
script config: null
10:49:08,820 User:admin DEBUG [repo.jscript.RhinoScriptProcessor] Resolving and compiling script path: workspace://SpacesStore/Espace racine/Dictionnaire de données/Scripts Web/fr/rs2i/test/simplesearch.post.js
10:49:08,820 User:admin DEBUG [repo.jscript.RhinoScriptProcessor] Imports resolved, adding resource '_root
10:49:08,820 User:admin DEBUG [repo.jscript.ScriptLogger] *** START simplesearch.post.js
10:49:08,820 User:admin DEBUG [repo.jscript.ScriptLogger] *** Traitement formulaire
10:49:08,820 User:admin DEBUG [repo.jscript.ScriptLogger] *** filtre = FACTURE
10:49:08,820 User:admin DEBUG [repo.jscript.ScriptLogger] *** Recherche
10:49:08,836 User:admin DEBUG [repo.jscript.ScriptLogger] *** result size : 2
10:49:08,836 User:admin DEBUG [repo.jscript.ScriptLogger] *** Construction r?sultat
10:49:08,836 User:admin DEBUG [repo.jscript.RhinoScriptProcessor] Time to execute script: 6.197786ms
10:49:08,836 User:admin DEBUG [extensions.webscripts.AbstractWebScript] Executed script /fr/rs2i/test/simplesearch.post.js (in repository store workspace://SpacesStore/Espace racine/Dictionnaire de données/Scripts Web) in 13.135195ms
10:49:08,836 User:admin DEBUG [webscripts.servlet.WebScriptServletResponse] Cache - set response header Cache-Control: no-cache
10:49:08,836 User:admin DEBUG [webscripts.servlet.WebScriptServletResponse] Cache - set response header Pragma: no-cache
10:49:08,836 User:admin DEBUG [extensions.webscripts.DeclarativeWebScript] Rendering response: content type=text/html, status=200
10:49:08,836 User:admin DEBUG [extensions.webscripts.DeclarativeWebScript] Rendering template 'fr/rs2i/test/simplesearch.post.html'
10:49:08,851 User:admin ERROR [freemarker.runtime] Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.
Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.
The problematic instruction:
———-
==> ${document .name} [on line 1, column 2211 in fr/rs2i/test/simplesearch.post.html.ftl]
———-
Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
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.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
10:49:08,851 User:admin DEBUG [extensions.webscripts.DeclarativeWebScript] Caught exception; decorating with appropriate status template : org.alfresco.service.cmr.repository.TemplateException: 10100017 Erreur lors du traitement du modèle 'Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: freemarker.core.InvalidReferenceException: Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
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.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)
… 27 more
10:49:08,851 User:admin DEBUG [web.scripts.RepositoryContainer] Transaction exception: required: 10100022 Wrapped Exception (with status template): 10100017 Erreur lors du traitement du modèle 'Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
10:49:08,851 User:admin DEBUG [web.scripts.RepositoryContainer] Transaction status: 0
10:49:08,851 User:admin DEBUG [web.scripts.RepositoryContainer] Marking web script transaction for rollback
10:49:08,851 User:admin DEBUG [web.scripts.RepositoryContainer] End retry transaction block: required,readwrite
10:49:08,851 User:admin DEBUG [web.scripts.RepositoryContainer] Authentication reset: authenticated as admin
10:49:08,851 User:admin DEBUG [extensions.webscripts.AbstractRuntime] Web Script fr/rs2i/test/simplesearch.post executed in 65.23399ms
10:49:08,851 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 10100022 Wrapped Exception (with status template): 10100017 Erreur lors du traitement du modèle 'Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
org.springframework.extensions.webscripts.WebScriptException: 10100022 Wrapped Exception (with status template): 10100017 Erreur lors du traitement du modèle 'Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.service.cmr.repository.TemplateException: 10100017 Erreur lors du traitement du modèle 'Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
… 24 more
Caused by: freemarker.core.InvalidReferenceException: Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
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.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)
… 27 more
10:49:08,851 User:admin DEBUG [webscripts.servlet.WebScriptServletRequest] Content Type: multipart/form-data
10:49:08,851 User:admin DEBUG [extensions.webscripts.WebScriptRequestImpl] Converting request (mimetype: multipart/form-data) to org.springframework.extensions.webscripts.servlet.FormData
10:49:09,070 User:admin DEBUG [extensions.webscripts.AbstractWebScript] Caching template status.ftl for web script fr/rs2i/test/simplesearch.post and status 500 (format: html)
10:49:09,070 User:admin DEBUG [extensions.webscripts.AbstractRuntime] Force success status header in response: false
10:49:09,070 User:admin DEBUG [extensions.webscripts.AbstractRuntime] Sending status 500 (Template: status.ftl)
10:49:09,070 User:admin DEBUG [extensions.webscripts.AbstractRuntime] Rendering response: content type=text/html
10:49:09,070 User:admin DEBUG [webscripts.servlet.WebScriptServletResponse] Cache - set response header Cache-Control: no-cache
10:49:09,070 User:admin DEBUG [webscripts.servlet.WebScriptServletResponse] Cache - set response header Pragma: no-cache
10:49:09,070 User:admin DEBUG [extensions.webscripts.AbstractRuntime] Processed script url (POST) /novartis/simplesearch in 292.30386ms
11-10-2011 05:40 AM
<#list pageResults as document>
model.nodes = pageResults;
<#list nodes as node>
<tr><td>${node.name}</td></tr>
</#list>
11-10-2011 07:49 AM
13:46:23,721 User:admin ERROR [freemarker.runtime] Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.
Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.
The problematic instruction:
———-
==> ${node.name} [on line 1, column 1982 in fr/rs2i/test/simplesearch.post.html.ftl]
———-
Java backtrace for programmers:
———-
freemarker.core.InvalidReferenceException: Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
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.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
13:46:23,721 User:admin ERROR [extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 10100011 Wrapped Exception (with status template): 10100003 Erreur lors du traitement du modèle 'Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
org.springframework.extensions.webscripts.WebScriptException: 10100011 Wrapped Exception (with status template): 10100003 Erreur lors du traitement du modèle 'Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
at org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:171)
at org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)
at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)
at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)
at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)
at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)
at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.alfresco.service.cmr.repository.TemplateException: 10100003 Erreur lors du traitement du modèle 'Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.'. Veuillez contacter votre administrateur système.
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)
at org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)
at org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)
at org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
… 24 more
Caused by: freemarker.core.InvalidReferenceException: Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.
at freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:124)
at freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:134)
at freemarker.core.Dot._getAsTemplateModel(Dot.java:78)
at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
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.Environment.process(Environment.java:190)
at freemarker.template.Template.process(Template.java:237)
at org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)
… 27 more
11-10-2011 07:54 AM
Expression node is undefined
Il n'est plus question de "name".11-10-2011 08:00 AM
Expression document is undefined on line 1, column 2213 in fr/rs2i/test/simplesearch.post.html.ftl.
The problematic instruction:
———-
==> ${document .name} [on line 1, column 2211 in fr/rs2i/test/simplesearch.post.html.ftl]
Expression node is undefined on line 1, column 1984 in fr/rs2i/test/simplesearch.post.html.ftl.
The problematic instruction:
———-
==> ${node.name} [on line 1, column 1982 in fr/rs2i/test/simplesearch.post.html.ftl]
11-10-2011 08:09 AM
Les erreurs sont les même …
undefined on line 1, column 2213
undefined on line 1, column 1984
11-10-2011 08:15 AM
logger.log("*** START simplesearch.post.js");
var filter = "";
logger.log("*** Traitement formulaire");
for (var i = 0; i < formdata.fields.length; i++) {
var field = formdata.fields[i];
logger.log("*** " + field.name + " = " + field.value);
if (field.name == "filtre") {
filter = field.value;
}
}
logger.log("*** Recherche");
var results = search.query({query: "TEXT:" + filter});
logger.log("*** result size : " + results.length);
logger.log("*** Construction r?sultat");
var pageResults = new Array();
for(var j = 0; j < results.length; j++) {
var node = results[j];
if (node != undefined && node.isDocument) {
pageResults.push(node);
}
}
model.filter = filter;
model.nodes = pageResults;
model.total = pageResults.length;
<html>
<head>
<title>Recherche</title>
</head>
<body>
<p>Bonjour ${person.properties.userName}</p>
<h1>Recherche</h1>
<form method="post" id="formSearch" name="formSearch" enctype="multipart/form-data" action="${url.service}">
Filtre : <input type="text" id="filtre" name="filtre" value="${filter}" />
<br /><br />
<input type="submit" id="submit" value="Rechercher" />
</form>
<br /><br />
<h1>Resultat</h1>
<table border="1">
<#list nodes as node>
<tr><td>${node.name}</td></tr>
</#list>
</table>
</body>
</html>
11-10-2011 08:50 AM
11-10-2011 09:42 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.