AnsweredAssumed Answered

REST - Can't get checkout to work

Question asked by tdinger on Jan 19, 2011
Latest reply on Nov 23, 2011 by jpotts
I'm developing a CMIS client for retrieving information from multiple back ends. The client is written in Java, but does not use any frameworks like OpenCMIS, etc. I'm simply using the repository information to generate HTTP requests for the various services.

I'm having trouble getting the checkout service to work on the public alfresco server. I'm using the collection URL for checked out documents – http://cmis.alfresco.com:80/service/cmis/checkedout. I'm POSTing the <entry> for the document I want to check out. The <allowableActions> for this entry say that checkout is allowed. I've added a request header to specify that the content-type is "application/atom+xml;type=entry". I can't think of anything else necessary.

The response is below. Seems like a server problem, but I've seen this kind of response when the server is expecting something different in the request. Can anyone help with this?

—————————————————————————————————————————————————

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
   <head>
      <title>Web Script Status 500 - Internal Error</title>
      <link rel="stylesheet" href="/css/webscripts.css" type="text/css" />
   </head>
   <body>
      <div>
         <table>
            <tr>
               <td><img src="/images/logo/AlfrescoLogo32.png" alt="Alfresco" /></td>
               <td><span class="title">Web Script Status 500 - Internal Error</span></td>
            </tr>
         </table>
         <br/>
         <table>
            <tr><td>The Web Script <a href="%2Fservice%2Fcmis%2Fcheckedout">/service/cmis/checkedout</a> has responded with a status of 500 - Internal Error.</td></tr>
         </table>
         <br/>
         <table>
            <tr><td><b>500 Description:</b></td><td> An error inside the HTTP server which prevented it from fulfilling the request.</td></tr>
            <tr><td> </td></tr>
            <tr><td><b>Message:</b></td><td>00192132 Cannot locate template processor for template org/alfresco/cmis/checkedout.post.atomentry</td></tr>
            <tr><td></td><td> </td></tr>
   <tr><td><b>Exception:</b></td><td>org.springframework.extensions.webscripts.WebScriptException - 00192132 Cannot locate template processor for template org/alfresco/cmis/checkedout.post.atomentry</td></tr>
   <tr><td></td><td> </td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:587)</td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:267)</td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)</td></tr>
         <tr><td></td><td>org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:383)</td></tr>
         <tr><td></td><td>org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:381)</td></tr>
         <tr><td></td><td>org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:436)</td></tr>
         <tr><td></td><td>org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:466)</td></tr>
         <tr><td></td><td>org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:304)</td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:333)</td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:189)</td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)</td></tr>
         <tr><td></td><td>javax.servlet.http.HttpServlet.service(HttpServlet.java:717)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</td></tr>
         <tr><td></td><td>org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:58)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)</td></tr>
         <tr><td></td><td>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)</td></tr>
         <tr><td></td><td>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)</td></tr>
         <tr><td></td><td>org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)</td></tr>
         <tr><td></td><td>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)</td></tr>
         <tr><td></td><td>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)</td></tr>
         <tr><td></td><td>org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)</td></tr>
         <tr><td></td><td>java.lang.Thread.run(Thread.java:619)</td></tr>
   <tr><td></td><td> </td></tr>
            <tr><td><b>Server</b>:</td><td>Community v3.4.0 (b @build-number@) schema 4,111</td></tr>
            <tr><td><b>Time</b>:</td><td>19-Jan-2011 22:09:26</td></tr>
            <tr><td></td><td> </td></tr>
            <tr><td><b>Diagnostics</b>:</td><td><a href="/service/script/org/alfresco/cmis/checkedout.post">Inspect Web Script (org/alfresco/cmis/checkedout.post)</a></td></tr>
         </table>
      </div>
   </body>
</html>

Outcomes