cancel
Showing results for 
Search instead for 
Did you mean: 

Cant seem to query records via CMIS

zmsil
Champ in-the-making
Champ in-the-making
Hi guys

I am currently facing a big problem. I cant seem to be able to run CMIS queries to records in the RM site. i can query documents and almost everything else outside of the RM site but when it comes to records i get errors. i have even tried(and failed) navigating to the files on CMISworkbench and on /cmisbrowse but i can navigate to the records from either share or explorer. does anyone have a clue as to what the problem could be?

This is the error i receive from cmisbrowse:

java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/alfresco/s/cmis/s/workspaceSmiley FrustratedpacesStore/i/8ef1a2cf-0378-44bc-b3ac-74eccaaaa74f/c...
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1368)
   at java.security.AccessController.doPrivileged(Native Method)
   at sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1362)
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1016)
   at org.apache.opencmis.browser.BrowseServlet.doBrowse(BrowseServlet.java:212)
   at org.apache.opencmis.browser.BrowseServlet.doGet(BrowseServlet.java:142)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
   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: java.io.IOException: Server returned HTTP response code: 500 for URL: http://127.0.0.1:8080/alfresco/s/cmis/s/workspaceSmiley FrustratedpacesStore/i/8ef1a2cf-0378-44bc-b3ac-74eccaaaa74f/c...
   at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1313)
   at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
   at org.apache.opencmis.browser.BrowseServlet.doBrowse(BrowseServlet.java:197)
   … 18 more

3 REPLIES 3

zmsil
Champ in-the-making
Champ in-the-making
93 views and not a single response. could you guys tell me if you can at least navigate to your records in root collection of cmisbrowse. By the way, i am using 3.4.d

Hi Zmsil,

This looks like it might be a bug with the community version of RM you are using.  I'm guessing from the stack trace that despite being 'admin' .. CMIS is trying to make a call on a RM artifact with a method it's not allowed to use.

This is because the normal entry voter is bypassed when dealing with a RM artifact in favor of the RM Entry Voter.  This voter looks for the RM related method level security and if none is provided it will default to DENY.  So I'm guessing this is what's happening here.

This has been resolved in the most recent 2.1 community drop .. which has a much more configurable way of extending the RM method level security checks if something is missing.

There is probably a way to bypass this check, but you will need to delve into the code.  Alternatively I'd suggest moving to a more recent community release, the latest being 4.2.e, which has a far more feature rich and stable RM offering.

Cheers,
Roy

zmsil
Champ in-the-making
Champ in-the-making
Here is the log from CMIS Workbench for when i try to navigate to records in the RM site




> 21:36:54 ERROR hemistry.opencmis.workbench.ClientHelper: CmisRuntimeException: Internal Server Error
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: Internal Server Error
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:450)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.read(AbstractAtomPubService.java:552)
   at org.apache.chemistry.opencmis.client.bindings.spi.atompub.NavigationServiceImpl.getChildren(NavigationServiceImpl.java:90)
   at org.apache.chemistry.opencmis.client.runtime.FolderImpl$2.fetchPage(FolderImpl.java:259)
   at org.apache.chemistry.opencmis.client.runtime.util.AbstractIterator.getCurrentPage(AbstractIterator.java:132)
   at org.apache.chemistry.opencmis.client.runtime.util.CollectionIterator.hasNext(CollectionIterator.java:48)
   at org.apache.chemistry.opencmis.workbench.model.ClientModel.loadFolder(ClientModel.java:160)
   at org.apache.chemistry.opencmis.workbench.FolderTable.doAction(FolderTable.java:196)
   at org.apache.chemistry.opencmis.workbench.FolderTable.access$000(FolderTable.java:61)
   at org.apache.chemistry.opencmis.workbench.FolderTable$3.mouseClicked(FolderTable.java:131)
   at java.awt.AWTEventMulticaster.mouseClicked(Unknown Source)
   at java.awt.Component.processMouseEvent(Unknown Source)
   at javax.swing.JComponent.processMouseEvent(Unknown Source)
   at java.awt.Component.processEvent(Unknown Source)
> 21:36:54 ERROR hemistry.opencmis.workbench.ClientHelper: Error code: 0
> 21:36:54 ERROR hemistry.opencmis.workbench.ClientHelper: Error content: <!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="/alfresco/css/webscripts.css" type="text/css" />
   </head>
   <body>
      <div>
         <table>
            <tr>
               <td><img src="/alfresco/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="%2Falfresco%2Fs%2Fcmis%2Fs%2Fworkspace%3ASpacesStore%2Fi%2F668aa6b0-1b57-4e4d-81a4-6f9331b0f666%2Fchildren%3Ffilter%3Dcmis%3AbaseTypeId%2Ccmis%3AcontentStreamFileName%2Ccmis%3AcontentStreamLength%2Ccmis%3AcontentStreamMimeType%2Ccmis%3AcreatedBy%2Ccmis%3AcreationDate%2Ccmis%3AlastModificationDate%2Ccmis%3AlastModifiedBy%2Ccmis%3Aname%2Ccmis%3AobjectId%2Ccmis%3AobjectTypeId%26includeAllowableActions%3Dfalse%26includeRelationships%3Dnone%26renditionFilter%3Dcmis%3Anone%26includePathSegment%3Dfalse%26maxItems%3D10000%26skipCount%3D0">/alfresco/s/cmis/s/workspaceSmiley FrustratedpacesStore/i/668aa6b0-1b57-4e4d-81a4-6f9331b0f666/children</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>09030026 Wrapped Exception (with status template): 09030162 Error during processing of the template '09030161 Access Denied.  You do not have the appropriate permissions to perform this operation.'. Please contact your system administrator.</td></tr>
            <tr><td></td><td> </td></tr>
   <tr><td><b>Exception:</b></td><td>net.sf.acegisecurity.AccessDeniedException - Access is denied.</td></tr>
   <tr><td></td><td> </td></tr>
         <tr><td></td><td>net.sf.acegisecurity.vote.AffirmativeBased.decide(AffirmativeBased.java:93)</td></tr>
         <tr><td></td><td>net.sf.acegisecurity.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:394)</td></tr>
         <tr><td></td><td>net.sf.acegisecurity.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:77)</td></tr>
         <tr><td></td><td>org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)</td></tr>
         <tr><td></td><td>org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:44)</td></tr>
         <tr><td></td><td>org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)</td></tr>
         <tr><td></td><td>org.alfresco.repo.audit.AuditMethodInterceptor.proceedWithAudit(AuditMethodInterceptor.java:217)</td></tr>
         <tr><td></td><td>org.alfresco.repo.audit.AuditMethodInterceptor.proceed(AuditMethodInterceptor.java:184)</td></tr>
         <tr><td></td><td>org.alfresco.repo.audit.AuditMethodInterceptor.invoke(AuditMethodInterceptor.java:137)</td></tr>
         <tr><td></td><td>org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)</td></tr>
         <tr><td></td><td>org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)</td></tr>
         <tr><td></td><td>org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)</td></tr>
         <tr><td></td><td>org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)</td></tr>
         <tr><td></td><td>$Proxy50.getLockType(Unknown Source)</td></tr>
         <tr><td></td><td>org.alfresco.cmis.mapping.AbstractVersioningProperty.hasWorkingCopy(AbstractVersioningProperty.java:77)</td></tr>
         <tr><td></td><td>org.alfresco.cmis.mapping.IsVersionSeriesCheckedOutProperty.getValue(IsVersionSeriesCheckedOutProperty.java:50)</td></tr>
         <tr><td></td><td>org.alfresco.cmis.mapping.CMISServicesImpl.getProperty(CMISServicesImpl.java:751)</td></tr>
         <tr><td></td><td>org.alfresco.repo.cmis.rest.CMISPropertyValueMethod.exec(CMISPropertyValueMethod.java:118)</td></tr>
         <tr><td></td><td>freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)</td></tr>
         <tr><td></td><td>freemarker.core.Expression.getAsTemplateModel(Expression.java:89)</td></tr>
         <tr><td></td><td>freemarker.core.Expression.isTrue(Expression.java:138)</td></tr>
         <tr><td></td><td>freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:77)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.MixedContent.accept(MixedContent.java:92)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.IfBlock.accept(IfBlock.java:82)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.MixedContent.accept(MixedContent.java:92)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.Macro$Context.runMacro(Macro.java:172)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:603)</td></tr>
         <tr><td></td><td>freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.MixedContent.accept(MixedContent.java:92)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:395)</td></tr>
         <tr><td></td><td>freemarker.core.BodyInstruction.accept(BodyInstruction.java:93)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.MixedContent.accept(MixedContent.java:92)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.Macro$Context.runMacro(Macro.java:172)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:603)</td></tr>
         <tr><td></td><td>freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.Macro$Context.runMacro(Macro.java:172)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:603)</td></tr>
         <tr><td></td><td>freemarker.core.UnifiedCall.accept(UnifiedCall.java:106)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.IfBlock.accept(IfBlock.java:82)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:417)</td></tr>
         <tr><td></td><td>freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.MixedContent.accept(MixedContent.java:92)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:299)</td></tr>
         <tr><td></td><td>freemarker.core.CompressedBlock.accept(CompressedBlock.java:73)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.MixedContent.accept(MixedContent.java:92)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.visit(Environment.java:210)</td></tr>
         <tr><td></td><td>freemarker.core.Environment.process(Environment.java:190)</td></tr>
         <tr><td></td><td>freemarker.template.Template.process(Template.java:237)</td></tr>
         <tr><td></td><td>org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:197)</td></tr>
         <tr><td></td><td>org.springframework.extensions.webscripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:589)</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:377)</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:127)</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:298)</td></tr>
         <tr><td></td><td>org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:859)</td></tr>
         <tr><td></td><td>org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)</td></tr>
         <tr><td></td><td>org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1555)</td></tr>
         <tr><td></td><td>java.lang.Thread.run(Thread.java:619)</td></tr>
   <tr><td></td><td> </td></tr>
   <tr><td><b>Exception:</b></td><td>org.alfresco.repo.security.permissions.AccessDeniedException - 09030161 Access Denied.  You do not have the appropriate permissions to perform this operation.</td></tr>
   <tr><td></td><td> </td></tr>
      <tr><td></td><td>org.alfresco.repo.security.permissions.impl.ExceptionTranslatorMethodInterceptor.invoke(ExceptionTranslatorMethodInterceptor.java:48)</td></tr>
   <tr><td></td><td> </td></tr>
   <tr><td><b>Exception:</b></td><td>org.alfresco.service.cmr.repository.TemplateException - 09030162 Error during processing of the template '09030161 Access Denied.  You do not have the appropriate permissions to perform this operation.'. Please contact your system administrator.</td></tr>
   <tr><td></td><td> </td></tr>
      <tr><td></td><td>org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)</td></tr>
   <tr><td></td><td> </td></tr>
   <tr><td><b>Exception:</b></td><td>org.springframework.extensions.webscripts.WebScriptException - 09030026 Wrapped Exception (with status template): 09030162 Error during processing of the template '09030161 Access Denied.  You do not have the appropriate permissions to perform this operation.'. Please contact your system administrator.</td></tr>
   <tr><td></td><td> </td></tr>
      <tr><td></td><td>org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)</td></tr>
   <tr><td></td><td> </td></tr>
            <tr><td><b>Server</b>:</td><td>Community v3.4.0 (d 3370) schema 4,113</td></tr>
            <tr><td><b>Time</b>:</td><td>03 Oct 2013 9:36:54 PM</td></tr>
            <tr><td></td><td> </td></tr>
            <tr><td><b>Diagnostics</b>:</td><td><a href="/alfresco/s/script/org/alfresco/cmis/children.get">Inspect Web Script (org/alfresco/cmis/children.get)</a></td></tr>
         </table>
      </div>
   </body>
</html>




I am logged on as an administrator and am an administrator of the RM site so i don't understand how i do not have access to the records