AnsweredAssumed Answered

Content model will not enable

Question asked by srowsell on Aug 16, 2013
Latest reply on Aug 19, 2013 by srowsell
I'm trying to get this model to go active:

<?xml version="1.0" encoding="UTF-8"?>
<model xmlns="http://www.alfresco.org/model/dictionary/1.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.alfresco.org/model/dictionary/1.0
   ../../../../webapps/alfresco/WEB-INF/classes/alfresco/model/modelSchema.xsd"
   name="SCap:model">
   <description>SC AP Model</description>
   <author>Steve Rowsell</author>
   <version>1.0</version>
   <imports>
      <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d" />
      <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
   </imports>
   <namespaces>
      <namespace uri="sc.ap.model" prefix="SCap" />
   </namespaces>
   <types>
     <type name="SCap:bundle">
         <title>SC Cheque Stub</title>
         <parent>cm:content</parent>
         <properties>
         <property name="SCap:chequeNo">
               <title>Cheque Number</title>
               <description>Cheque Number</description>
               <type>d:text</type>
           
            </property>
         <property name="SCap:chequeDate">
               <title>Cheque Date</title>
               <description>Cheque Date</description>
               <type>d:date</type>
           
            </property>
         <property name="SCap:vendorNo">
               <title>Vendor Number</title>
               <description>Vendor Number</description>
               <type>d:text</type>
           
            </property>
         <property name="SCap:invoiceDate">
               <title>Expiration Date</title>
               <description>Expiration Date</description>
               <type>d:date</type>
            <multiple>true</multiple>
           
            </property>
         <property name="SCap:invoiceNo">
               <title>Invoice Number</title>
               <description>Invoice Number</description>
               <type>d:text</type>
            <multiple>true</multiple>
           
            </property>
         <property name="SCap:invoiceAmount">
               <title>Invoice Amount</title>
               <description>Invoice Amount</description>
               <type>d:text</type>
            <multiple>true</multiple>
           
            </property>
         <property name="SCap:voucher">
               <title>Voucher Number</title>
               <description>Voucher Number</description>
               <type>d:text</type>
            <multiple>true</multiple>
           
            </property>
         </properties>
      <mandatory-aspects>
            <aspect></aspect>
        </mandatory-aspects>
      </type>
   </types>


   <aspects>
   </aspects>


</model>


And it fails.  I get the following exception in the alfresco.log:
09:24:19,169 ERROR [org.springframework.extensions.webscripts.AbstractRuntime] Exception from executeScript - redirecting to status template error: 07160123 Failed to compile model SCap:model
org.alfresco.service.cmr.dictionary.DictionaryException: 07160123 Failed to compile model SCap:model
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:108)
   at org.alfresco.repo.dictionary.M2Model.compile(M2Model.java:163)
   at org.alfresco.repo.dictionary.DictionaryModelType$DictionaryModelTypeTransactionListener$2.doWork(DictionaryModelType.java:672)
   at org.alfresco.repo.security.authentication.AuthenticationUtil.runAs(AuthenticationUtil.java:529)
   at org.alfresco.repo.dictionary.DictionaryModelType$DictionaryModelTypeTransactionListener.beforeCommit(DictionaryModelType.java:619)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:747)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.doBeforeCommit(AlfrescoTransactionSupport.java:727)
   at org.alfresco.repo.transaction.AlfrescoTransactionSupport$TransactionSynchronizationImpl.beforeCommit(AlfrescoTransactionSupport.java:687)
   at org.springframework.transaction.support.TransactionSynchronizationUtils.triggerBeforeCommit(TransactionSynchronizationUtils.java:95)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerBeforeCommit(AbstractPlatformTransactionManager.java:927)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:737)
   at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)
   at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:393)
   at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:472)
   at org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:410)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:479)
   at org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:517)
   at org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:333)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
   at org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
   at org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:118)
   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:61)
   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.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
   at org.apache.catalina.valves.RequestFilterValve.process(RequestFilterValve.java:316)
   at org.apache.catalina.valves.RemoteAddrValve.invoke(RemoteAddrValve.java:81)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
   at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
   at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
   at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
   at java.lang.Thread.run(Thread.java:722)
Caused by: org.alfresco.service.namespace.InvalidQNameException: A QName must consist of a local name
   at org.alfresco.service.namespace.QName.createQName(QName.java:84)
   at org.alfresco.service.namespace.QName.createQName(QName.java:121)
   at org.alfresco.repo.dictionary.M2ClassDefinition.<init>(M2ClassDefinition.java:177)
   at org.alfresco.repo.dictionary.M2TypeDefinition.<init>(M2TypeDefinition.java:41)
   at org.alfresco.repo.dictionary.CompiledModel.constructDefinitions(CompiledModel.java:149)
   at org.alfresco.repo.dictionary.CompiledModel.<init>(CompiledModel.java:88)
   … 39 more


The relevant part appears to be the "A QName must consist of a local name", but I can't see how my model doesn't conform.

Anyone have any suggestions?

Outcomes