03-10-2014 05:45 AM
I need help. Nuxeo happened 3 days after study Add a Document Type error occurs I do not know why.
schema.xsd
<xs:element name="test" type="xs:string" />
type-contrib.xml
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="schema">
<schema name="testTp" src="schema/testTp.xsd" prefix="testTp" />
</extension>
<extension target="org.nuxeo.ecm.core.schema.TypeService" point="doctype">
<doctype name="TestFolder" extends="Document">
<schema name="testTp" />
<schema name="common"/>
<schema name="dublincore"/>
<facet name="Folderish"/>
<subtypes>
<type>Folder</type>
<type>File</type>
<type>Note</type>
</subtypes>
</doctype>
</extension>
WebEngine source
DocumentModel dm = systemSession.createDocumentModel("/asset-library/test", "type_test", "TestFolder");
DocumentType type = dm.getDocumentType();
for (Schema schema : type.getSchemas()) {
log.error(" ===== " + type.getName());
for (Field f : schema.getFields()) {
log.error(">>>> " + f.getName().getLocalName());
}
}
Map<String, Object> map = dm.getProperties("testTp");
log.error("====================");
for (String key : map.keySet()) {
log.error(key + " : " + map.get(key));
}
log.error("====================");
log.error("====================");
DocumentHelper.setProperty(systemSession, dm, "mime_type", "ssssss");
result
===== TestFolder
>>>> mime_type
===== TestFolder
>>>> icon
>>>> icon-expanded
>>>> size
===== TestFolder
>>>> creator
>>>> source
>>>> nature
>>>> contributors
>>>> created
>>>> description
>>>> rights
>>>> subjects
>>>> publisher
>>>> valid
>>>> format
>>>> issued
>>>> modified
>>>> language
>>>> coverage
>>>> expired
>>>> lastContributor
>>>> title
====================
ubion:mime_type : null
====================
====================
error msg
Caused by: org.nuxeo.ecm.core.model.NoSuchPropertyException: The property at 'testTp:test' doesn't exists
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.makeProperties(SQLSession.java:1038)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLSession.makeProperty(SQLSession.java:993)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.getProperty(SQLDocumentLive.java:164)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLComplexProperty.setPropertyValue(SQLComplexProperty.java:222)
at org.nuxeo.ecm.core.storage.sql.coremodel.SQLDocumentLive.writeDocumentPart(SQLDocumentLive.java:178)
at org.nuxeo.ecm.core.api.DocumentModelFactory.writeDocumentModel(DocumentModelFactory.java:298)
at org.nuxeo.ecm.core.api.AbstractSession.writeModel(AbstractSession.java:557)
at org.nuxeo.ecm.core.api.AbstractSession.saveDocument(AbstractSession.java:1968)
11-13-2015 08:55 AM
The question is one-year-old, but
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.