AnsweredAssumed Answered

Error trying to retrieve json from out-of-the-box query web script

Question asked by jrorke on Oct 6, 2013
Latest reply on Oct 7, 2013 by kaynezhang
Newbie trying to use the out of the box web scripts to retrieve json data.  Does "format=json" work out of the box. Or do I need to install the cmis-query-webscript amp add on?

when doing this…


http://localhost:8080/alfresco/service/cmis/query?q=SELECT%20cmis:name%20FROM%20swaom:doc%20WHERE%20cmis:name%20=%20'Project%201'&alf_ticket=TICKET_396e54349fcfc04be1e3875906d18ab8dc72b97f&format=json


I get this…


{
    "status" :
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request."
  }, 
 
  "message" : "09060001 Cannot locate template processor for template org\/alfresco\/cmis\/query.get.json", 
  "exception" : "org.springframework.extensions.webscripts.WebScriptException - 09060001 Cannot locate template processor for template org\/alfresco\/cmis\/query.get.json",
 
  "callstack" :
  [
       ""      ,"org.springframework.extensions.webscripts.WebScriptException: 09060001 Cannot locate template processor for template org\/alfresco\/cmis\/query.get.json"
      ,"org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:904)"
      ,"org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)"
      ,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer$3.execute(RepositoryContainer.java:426)"
      ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:433)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:495)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:533)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:349)"
      ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)"
      ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)"
      ,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)"
      ,"javax.servlet.http.HttpServlet.service(HttpServlet.java:722)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)"
      ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)"
      ,"org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)"
      ,"org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)"
      ,"org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)"
      ,"org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)"
      ,"org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)"
      ,"org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)"
      ,"org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)"
      ,"org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)"
      ,"org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)"
      ,"org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)"
      ,"org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1002)"
      ,"org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)"
      ,"org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1813)"
      ,"java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)"
      ,"java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)"
      ,"java.lang.Thread.run(Thread.java:722)"

  ],
 
  "server" : "Community v4.2.0 (4576) schema 6,022",
  "time" : "Oct 6, 2013 8:34:13 AM"
}

Outcomes