Property not available for alfresco query
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2013 07:35 AM
Hello,
I've created the aspect accident:Rappel which has the properties "accident:nbr", "accident:sortieLe" and "accident:destinataireRappel".
I can set/create the properties with the commands:
I can also read them out with:
without any problems at all.
But if I try to execute the following query:
I get the following error:
Does anyone knows why this is the case?
I've created the aspect accident:Rappel which has the properties "accident:nbr", "accident:sortieLe" and "accident:destinataireRappel".
I can set/create the properties with the commands:
pjProperties.put(accident:nbr, nombre);pjProperties.put(accident:sortieLe, cal);pjProperties.put(accident:destinataireRappel, destinataireRappel);alfrescoFacade.addAspectToDocument(alfrescoDocument, pjProperties, AlfrescoFacade.ASPECT_ACCIDENT_RAPPEL);
I can also read them out with:
BigInteger nombre = alfrescoDocument.getPropertyValue(accident:nbr);String destinataire = alfrescoDocument.getPropertyValue(accident:destinataireRappel);GregorianCalendar calendar = alfrescoDocument.getPropertyValue(accident:sortieLe);
without any problems at all.
But if I try to execute the following query:
select d.cmis:objectId from cmis:document as d join accident:rappel as a on d.cmis:objectId = a.cmis:objectId where IN_TREE(a, 'workspace://SpacesStore/b57d9fec-87c0-42e5-ab93-b34f39490bcf') and a.accident:sortieLe = '2012-12-31T23:00:00.000Z'
I get the following error:
SEVERE: org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException: Unknown column/property accident:sortieLe
Does anyone knows why this is the case?
Labels:
- Labels:
-
Archive
8 REPLIES 8
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2013 07:47 AM
Not sure but… shouldn't the aspect be prefixed with "P:" ? I think alfresco maps aspects as policies because the currently implemented CMIS version does not support secondary types.
Have you tried this:
select d.cmis
bjectId from cmis:document as d join P:accident:rappel as a on d.cmis
bjectId = a.cmis
bjectId where IN_TREE(a, 'workspace://SpacesStore/b57d9fec-87c0-42e5-ab93-b34f39490bcf') and a.accident:sortieLe = '2012-12-31T23:00:00.000Z'
Have you tried this:
select d.cmis



Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2013 08:15 AM
Thanks, I've tried this but it didn't solved the issue.
Strange thing is that I'm doing queries on other properties of other apects and they work without any problem.
Strange thing is that I'm doing queries on other properties of other apects and they work without any problem.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2013 08:19 AM
I've also tried this query:
which also works without any issue so it seems that the problem is related to the "sortieLe" property.
select d.cmis:objectId from cmis:document as d join accident:rappel as a on d.cmis:objectId = a.cmis:objectId where IN_TREE(a, 'workspace://SpacesStore/b57d9fec-87c0-42e5-ab93-b34f39490bcf') and a.accident:nbr = 3
which also works without any issue so it seems that the problem is related to the "sortieLe" property.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2013 02:56 AM
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2013 03:29 AM
I don't think that the date format is the problem because the error says "Unknown column/property" and other queries with dates work.
Nevertheless I tried my query with "TIMESTAMP", but: same result…
Nevertheless I tried my query with "TIMESTAMP", but: same result…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2013 04:14 AM
It seems property sortieLe didn't register into cmis dictionary correctly,not format problem. Could you paste your aspect definition here?
is your aspect subtype of versionable,auditable or referenceable?
is your aspect subtype of versionable,auditable or referenceable?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2013 07:49 AM
Here my aspect definition:
<?xml version='1.0' encoding='UTF-8'?><cmis:type xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="cmis:cmisTypePolicyDefinitionType"> <cmis:id>P:accident:rappel</cmis:id> <cmis:localName>rappel</cmis:localName> <cmis:localNamespace>accident.model</cmis:localNamespace> <cmis:displayName>Accident Rappel Document</cmis:displayName> <cmis:queryName>accident:rappel</cmis:queryName> <cmis:description>Accident Rappel Document</cmis:description> <cmis:baseId>cmis:policy</cmis:baseId> <cmis:parentId>P:cmisext:aspects</cmis:parentId> <cmis:creatable>false</cmis:creatable> <cmis:fileable>false</cmis:fileable> <cmis:queryable>true</cmis:queryable> <cmis:fulltextIndexed>true</cmis:fulltextIndexed> <cmis:includedInSupertypeQuery>true</cmis:includedInSupertypeQuery> <cmis:controllablePolicy>false</cmis:controllablePolicy> <cmis:controllableACL>false</cmis:controllableACL> <cmis:propertyStringDefinition> <cmis:id>accident:destinataireRappel</cmis:id> <cmis:localName>destinataireRappel</cmis:localName> <cmis:localNamespace>accident.model</cmis:localNamespace> <cmis:displayName>accident:destinataireRappel</cmis:displayName> <cmis:queryName>accident:destinataireRappel</cmis:queryName> <cmis:description>accident:destinataireRappel</cmis:description> <cmis:propertyType>string</cmis:propertyType> <cmis:cardinality>single</cmis:cardinality> <cmis:updatability>readwrite</cmis:updatability> <cmis:inherited>false</cmis:inherited> <cmis:required>false</cmis:required> <cmis:queryable>true</cmis:queryable> <cmis:orderable>false</cmis:orderable> </cmis:propertyStringDefinition> <cmis:propertyDateTimeDefinition> <cmis:id>accident:sortieLe</cmis:id> <cmis:localName>sortieLe</cmis:localName> <cmis:localNamespace>accident.model</cmis:localNamespace> <cmis:displayName>accident:sortieLe</cmis:displayName> <cmis:queryName>accident:sortieLe</cmis:queryName> <cmis:description>accident:sortieLe</cmis:description> <cmis:propertyType>datetime</cmis:propertyType> <cmis:cardinality>single</cmis:cardinality> <cmis:updatability>readwrite</cmis:updatability> <cmis:inherited>false</cmis:inherited> <cmis:required>false</cmis:required> <cmis:queryable>true</cmis:queryable> <cmis:orderable>true</cmis:orderable> </cmis:propertyDateTimeDefinition> <cmis:propertyIntegerDefinition> <cmis:id>accident:nbr</cmis:id> <cmis:localName>nbr</cmis:localName> <cmis:localNamespace>accident.model</cmis:localNamespace> <cmis:displayName>accident:nbr</cmis:displayName> <cmis:queryName>accident:nbr</cmis:queryName> <cmis:description>accident:nbr</cmis:description> <cmis:propertyType>integer</cmis:propertyType> <cmis:cardinality>single</cmis:cardinality> <cmis:updatability>readwrite</cmis:updatability> <cmis:inherited>false</cmis:inherited> <cmis:required>false</cmis:required> <cmis:queryable>true</cmis:queryable> <cmis:orderable>true</cmis:orderable> </cmis:propertyIntegerDefinition></cmis:type>
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2013 09:16 PM
It seems nothing was wrong with your aspect definition,You can set log4j.logger.org.alfresco.cmis.dictionary=debug in you log4j file,and restart your alfresco server to check whether your aspect and properties are registered correctly into cmis dictionary.
