AnsweredAssumed Answered

REST API Error by JSON.

Question asked by turutosiya on Aug 16, 2011
Latest reply on Aug 16, 2011 by zladuric
Hello.

I'm trying to retrive infomation about stores via REST API  by using the package: /org/alfresco/repository/store
http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference#Package:_.2Forg.2Falfresco.2Frepository.2Fstore

I got it worked with xml(atom) formatting, but It doesn't work with prameter : "format=json".

That is, After I send a request, I got HTTP 500 with a message which tells me that
"07160001 Cannot locate template processor for template org/alfresco/cmis/children.get.json".

How can I fix this? I have no idea….
Any suggestion?

REQUEST:
http://host/alfresco/service/api/node/workspace/SpacesStore/1634e356-4970-4e42-ae89-8bcaf06f7470/children

RESPONSE:

{
    "status" :
  {
    "code" : 500,
    "name" : "Internal Error",
    "description" : "An error inside the HTTP server which prevented it from fulfilling the request."
  }, 
 
  "message" : "07160002 Cannot locate template processor for template org\/alfresco\/cmis\/children.get.json", 
  "exception" : "org.springframework.extensions.webscripts.WebScriptException - 07160002 Cannot locate template processor for template org\/alfresco\/cmis\/children.get.json",
 
  "callstack" :
  [
       ""      ,"org.springframework.extensions.webscripts.WebScriptException: 07160002 Cannot locate template processor for template org\/alfresco\/cmis\/children.get.json"
      ,"org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:596)"
      ,"org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)"
      ,"org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:377)"
      ,"org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)"
      ,"org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)"
      ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)"
      ,"org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)"
      ,"org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)"
      ,"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.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)"
      ,"org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)"
      ,"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:127)"
      ,"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:298)"
      ,"org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852)"
      ,"org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)"
      ,"org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)"
      ,"java.lang.Thread.run(Thread.java:619)"

  ],
 
  "server" : "Community v3.4.0 (d 3370) schema 4,113",
  "time" : "Aug 16, 2011 4:07:09 PM"
}

Outcomes