CMIS Custom Aspect Query Exception

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
pb8226
Member II

CMIS Custom Aspect Query Exception

Hi everyone,

I'm performing a cmis query with a custom aspect. I spent some time searching the forums and trying different things but no luck. I think I copied the examples exactly.  When I perform the query with a custom type, everything works well.  Also when I try to perform the query with an out of the box aspect such as cm:titled, everything works well again.  The problem happens when I try to run a CMIS query on a custom aspect. My question specifically is, is there anything special that needs to be done when adding custom aspects to your model to make them exposed to cmis?
The error in the logs is
2013-02-01 14:57:21,036  ERROR [solr.servlet.SolrDispatchFilter] [http-8443-1] org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Type is unsupported in query: mis:recordable

Here's my setup;

my problem query

select d.*, o.* from mis:museumRecord as d join mis:recordable as o on d.cmisSmiley SurprisedbjectId = o.cmisSmiley SurprisedbjectId


Java
alfresco-opencmis-extension version 0.4
alfresco enterprise 4.1.2
atom pub url http://localhost:8080/alfresco/cmisatom
object factory class org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl

my custom aspect definition

   <aspect name="mis:recordable">
         <title>Recordable</title>
         <parent>cm:generalclassifiable</parent>
         <properties>
                <property name="mis:sisn">
               <type>d:text</type>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>      
                </property>
                <property name="mis:extent">
               <type>d:text</type>
               <multiple>true</multiple>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>   
                </property>
                <property name="mis:accessionNumber">
               <type>d:text</type>
               <multiple>true</multiple>
               <index enabled="true">
                  <atomic>true</atomic>
                  <stored>true</stored>
                  <tokenised>true</tokenised>
               </index>
                </property>
         </properties>
         <associations>
               <association name="mis:creator">
                  <source>
                    <mandatory>false</mandatory>
                    <many>true</many>
                  </source>
                  <target>
                    <class>misSmiley Tongueerson</class>
                    <mandatory>false</mandatory>
                    <many>true</many>
                  </target>
               </association>
         </associations>
      </aspect>


type definition

   <type name="mis:museumRecord">
            <title>Museum Record</title>
            <parent>cm:content</parent>
            <properties>
       </properties>
            <mandatory-aspects>
      <aspect>cm:titled</aspect>
                <aspect>mis:recordable</aspect>
            </mandatory-aspects>
   </type>
1 Reply
pb8226
Member II

Re: CMIS Custom Aspect Query Exception

So I figured out the issue in case anyone is reading this. My custom content model inside solr was out of date from my custom content model in alfresco.  Deleting the custom content model in solr caused it to regenerate it on restart and now I am able to query custom aspects.