AnsweredAssumed Answered

How to use the move-to script ?

Question asked by andreim on Aug 25, 2009
Latest reply on Aug 26, 2009 by andreim
Hi ,

I need to move a file from one Alfresco space to another using a REST api.

I tried to use the
/alfresco/service/slingshot/doclib/action/move-to/node/{store_type}/{store_id}/{id}/{path}
url with the following parameters:

store_type = workspace
store_id = SpacesStore
id = the id of the file I want to move
path = the path of the space where I want to move the file

I got the following error :
{
    "status" :
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request.
"
  }, 
 
  "message" : "07250010 Wrapped Exception (with status template): 07250009 Error during processing of
the template 'Error executing macro: resultsJSON\nrequired parameter: results is not specified.'. Please
contact your system administrator.", 
  "exception" : "org.alfresco.web.scripts.WebScriptException - 07250010 Wrapped Exception (with status
template): 07250009 Error during processing of the template 'Error executing macro: resultsJSON\nrequired
parameter: results is not specified.'. Please contact your system administrator.",
 
  "callstack" :
  [
       ""      ,"freemarker.template.TemplateException: Error executing macro: resultsJSON\nrequired parameter
: results is not specified."
      ,"freemarker.core.Macro$Context.sanityCheck(Macro.java:181)"
      ,"freemarker.core.Macro$Context.runMacro(Macro.java:161)"
      ,"freemarker.core.Environment.visit(Environment.java:601)"
      ,"freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)"
      ,"freemarker.core.Environment.visit(Environment.java:208)"
      ,"freemarker.core.MixedContent.accept(MixedContent.java:92)"
      ,"freemarker.core.Environment.visit(Environment.java:208)"
      ,"freemarker.core.Environment.process(Environment.java:188)"
      ,"freemarker.template.Template.process(Template.java:237)"
      ,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:202)"
      ,"org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:523)"
      ,"org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java
:241)"
      ,"org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:357)"
      ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper
.java:326)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java
:407)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer
.java:424)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:288
)"
      ,"org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:262)"
      ,"org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)"
      ,"org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:122)"
      ,"javax.servlet.http.HttpServlet.service(HttpServlet.java:717)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java
:290)"
      ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)"
      ,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)"
      ,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)"
      ,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)"
      ,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)"
      ,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)"
      ,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)"
      ,"org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)"
      ,"org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583
)"
      ,"org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)"
      ,"java.lang.Thread.run(Thread.java:619)"
      ,"org.alfresco.service.cmr.repository.TemplateException: 07250009 Error during processing of the
template 'Error executing macro: resultsJSON\nrequired parameter: results is not specified.'. Please
contact your system administrator."
      ,"org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:206)"
      ,"org.alfresco.web.scripts.WebScriptException: 07250010 Wrapped Exception (with status template
): 07250009 Error during processing of the template 'Error executing macro: resultsJSON\nrequired parameter
: results is not specified.'. Please contact your system administrator."
      ,"org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:613)
"

  ],
 
  "server" : "Alfresco Community v3.2.0 (2039) schema 2,019",
  "time" : "Aug 25, 2009 2:24:28 PM"
}


Could someone please explain why the script returns an error ?

Thanks in advance,
Andrei

Outcomes