AnsweredAssumed Answered

OpenCmis Extension, trying to query custom Aspects

Question asked by jba on Jun 28, 2011
Latest reply on Jan 8, 2014 by jpotts
Dear all,
It's been quite a few weeks now I am breaking my teeth against that, so I thought I would ask the community.
I have a custom made model looking roughly like this :
<type name="re:doc">
         <title>Document racine</title>
         <parent>cm:content</parent>
      </type>
      <aspect name="re:webable">
         <title>RAE Webable</title>
         <properties>
            <property name="re:published">
               <type>d:boolean</type>
            </property>
            <property name="re:isActive">
               <type>d:boolean</type>
               <default>false</default>
            </property>
         </properties>
      </aspect>
etc..
I understood that in order to query those custom made aspects , I had to include OpenCMIS Extension in my classpath. I suppose I did it well because when I go here :
http://localhost:8080/alfresco/cmisbrowse?url=http://localhost:8080/alfresco/service/cmis/type/cmis:policy/descendants
i can see all my custom aspects alright
[img]http://i740.photobucket.com/albums/xx44/tsushimaii/cmis.jpg[/img]
Now I try to query those aspects using curl so of course something like this works
SELECT cmis:name FROM cmis:document WHERE cmis:name LIKE '%ville%'
but something like this doesn't
SELECT cmis:name FROM cmis:document WHERE re:isActive = true
error code :
HTTP call to [http://localhost:8080/alfresco/service/cmis/queries] returned [500]. Response: Web Script Status 500 - Internal Error Web Script Status 500 - Internal Error The Web Script /alfresco/service/cmis/queries has responded with a status of 500 - Internal Error. 500 Description: An error inside the HTTP server which prevented it from fulfilling the request.   Message:05280002 Wrapped Exception (with status template): 05280003 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 05280002 Invalid column for cmis:document.re:isActive   Exception:org.alfresco.cmis.CMISQueryException - 05280002 Invalid column for cmis:document.re:isActive   org.alfresco.cmis.search.CMISQueryParser.buildColumnReference(CMISQueryParser.java:1538) org.alfresco.cmis.search.CMISQueryParser.getFunctionArgument(CMISQueryParser.java:1130) org.alfresco.cmis.search.CMISQueryParser.buildPredicate(CMISQueryParser.java:358) org.alfresco.cmis.search.CMISQueryParser.buildTest(CMISQueryParser.java:283) org.alfresco.cmis.search.CMISQueryParser.buildNegation(CMISQueryParser.java:263) org.alfresco.cmis.search.CMISQueryParser.buildConjunction(CMISQueryParser.java:232) org.alfresco.cmis.search.CMISQueryParser.buildDisjunction(CMISQueryParser.java:205) org.alfresco.cmis.search.CMISQueryParser.parse(CMISQueryParser.java:160) org.alfresco.cmis.search.CMISQueryServiceImpl.query(CMISQueryServiceImpl.java:126) org.alfresco.repo.cmis.rest.CMISScript.query(CMISScript.java:652) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.mozilla.javascript.MemberBox.invoke(MemberBox.java:155) org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:243) org.mozilla.javascript.optimizer.OptRuntime.call2(OptRuntime.java:76) org.mozilla.javascript.gen.c3._c0(file:/H:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js:67) org.mozilla.javascript.gen.c3.call(file:/H:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js) org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393) org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834) org.mozilla.javascript.gen.c3.call(file:/H:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js) org.mozilla.javascript.gen.c3.exec(file:/H:/Alfresco/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js) org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:472) org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:190) org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:282) org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102) org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:981) org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86) 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.Http11AprProcessor.process(Http11AprProcessor.java:861) org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579) org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584) java.lang.Thread.run(Thread.java:662)   Exception:org.alfresco.scripts.ScriptException - 05280003 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 05280002 Invalid column for cmis:document.re:isActive   org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:194)   Exception:org.springframework.extensions.webscripts.WebScriptException - 05280002 Wrapped Exception (with status template): 05280003 Failed to execute script 'classpath*:alfresco/templates/webscripts/org/alfresco/cmis/queries.post.cmisquery.js': 05280002 Invalid column for cmis:document.re:isActive   org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:758)   Server:Community v3.4.0 (e 3419) schema 4 113 Time:28 juin 2011 13:53:55   Diagnostics:Inspect Web Script (org/alfresco/cmis/queries.post) 

Really, i wonder where I have it completely wrong, so any help appreciated
thanks for viewing
JBA

Outcomes