As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<model name="cms:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>F1 CMS Content Model</description> <author>Alacre</author> <published>2005-10-05</published> <version>0.1</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <namespaces> <namespace uri="http://www.alacre.com/cms/content-model-1.0" prefix="cms"/> </namespaces> <types> <type name="cms:object"> <title>Object</title> <parent>cm:cmobject</parent> </type> <type name="cms:container"> <title>Container</title> <parent>cms:object</parent> <associations> <child-association name="cms:contains"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>cm:cmobject</class> <!– This would've been cms:object –> <mandatory>false</mandatory> <many>true</many> </target> <duplicate>false</duplicate> </child-association> </associations> </type> <type name="cms:project"> <title>Project</title> <parent>cms:container</parent> </type> <type name="cms:folder"> <title>Folder</title> <parent>cms:container</parent> </type> <!–type name="cms:asset"> <!– My failed attempt to derive from cm:content. The derivation works, but not the import –> <title>Asset</title> <parent>cm:content</parent> </type–> <!– cms:asset is exactly analogous to cm:content, except that the auditable aspect has been made mandatory. <type name="cms:asset"> <!– The original definition –> <title>Asset</title> <parent>cms:object</parent> <properties> <property name="cm:contentUrl"> <type>d:text</type> <mandatory>false</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised> </index> </property> <property name="cm:mimetype"> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="cm:encoding"> <type>d:text</type> <mandatory>false</mandatory> </property> <property name="cm:size"> <type>d:long</type> <mandatory>false</mandatory> </property> </properties> <mandatory-aspects> <aspect>cm:versionable</aspect> </mandatory-aspects> </type> –> </types> </model>
2005-11-03 14:30:40,351 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'importerBootstrap' defined in class path resource [alfresco/application-context.xml]: Initialization of bean failed; nested exception is org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed org.alfresco.error.AlfrescoRuntimeException: Bootstrap failed at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:238) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:971) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:941) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:334) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:281) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:146) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:277) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:310) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:230) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:156) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:48) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3669) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4104) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.apache.catalina.core.StandardContext.init(StandardContext.java:5005) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503) at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:150) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeployInternal(TomcatDeployer.java:274) at org.jboss.web.tomcat.tc5.TomcatDeployer.performDeploy(TomcatDeployer.java:91) at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java:357) at org.jboss.web.WebModule.startModule(WebModule.java:68) at org.jboss.web.WebModule.startService(WebModule.java:46) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:418) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy28.start(Unknown Source) at org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:394) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738) at sun.reflect.GeneratedMethodAccessor48.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy8.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:325) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:501) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:897) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:418) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:273) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:121) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:434) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:315) at org.jboss.Main.boot(Main.java:195) at org.jboss.Main$1.run(Main.java:463) at java.lang.Thread.run(Thread.java:595) Caused by: javax.transaction.RollbackException: The transaction was not committed - The node must be an instance of type content at org.alfresco.util.transaction.SpringAwareUserTransaction.commit(SpringAwareUserTransaction.java:269) at org.alfresco.repo.importer.ImporterBootstrap.bootstrap(ImporterBootstrap.java:230) … 135 more
The transaction was not committed - The node must be an instance of type content
dictionary.isSubClass(QName, QName)
<model name="cms:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>F1 CMS Content Model</description> <author>Alacre</author> <published>2005-10-05</published> <version>0.1</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <namespaces> <namespace uri="http://www.alacre.com/cms/content-model-1.0" prefix="cms"/> </namespaces> <types> <type name="cms:object"> <title>Object</title> <parent>cm:cmobject</parent> </type> <type name="cms:container"> <title>Container</title> <parent>cms:object</parent> <associations> <child-association name="cms:contains"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>cm:cmobject</class> <mandatory>false</mandatory> <many>true</many> </target> <duplicate>false</duplicate> </child-association> </associations> </type> <type name="cms:project"> <title>Project</title> <parent>cms:container</parent> </type> <type name="cms:folder"> <title>Folder</title> <parent>cms:container</parent> </type> <type name="cms:asset"> <title>Asset</title> <parent>cm:content</parent> </type> <!– cms:asset is exactly analogous to cm:content, except that the versionable aspect has also been made mandatory. <type name="cms:asset"> <title>Asset</title> <parent>cms:object</parent> <properties> <property name="cm:contentUrl"> <type>d:text</type> <mandatory>false</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised> </index> </property> <property name="cm:mimetype"> <type>d:text</type> <mandatory>true</mandatory> </property> <property name="cm:encoding"> <type>d:text</type> <mandatory>false</mandatory> </property> <property name="cm:size"> <type>d:long</type> <mandatory>false</mandatory> </property> </properties> <mandatory-aspects> <aspect>cm:auditable</aspect> <aspect>cm:versionable</aspect> </mandatory-aspects> </type> –> </types> </model>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:cms="http://www.alacre.com/cms/content-model-1.0" xmlns:app="http://www.alfresco.org/model/application/1.0"> <cm:folder> <cm:name>Project Root</cm:name> <cm:contains> <cms:project view:childName="cms:Project_1"> <cm:name>Project 1</cm:name> <cms:contains> <cms:folder> <cm:name>Folder, Level 01, 03</cm:name> <cms:contains> <cms:asset> <cm:name>Alfresco Tutorial.pdf</cm:name> <cm:contentUrl>classpath:alfresco/bootstrap/Alfresco-Tutorial.pdf</cm:contentUrl> <cm:mimetype>application/pdf</cm:mimetype> </cms:asset> <cms:folder> <cm:name>Folder, Level 02, 10</cm:name> </cms:folder> <cms:folder> <cm:name>Folder, Level 02, 02</cm:name> </cms:folder> </cms:contains> </cms:folder> </cms:contains> </cms:project> </cm:contains> </cm:folder> </view:view>
<model name="cms:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>F1 CMS Content Model</description> <author>Alacre</author> <published>2005-10-05</published> <version>0.1</version> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> <import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/> <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </imports> <namespaces> <namespace uri="http://www.alacre.com/cms/content-model-1.0" prefix="cms"/> </namespaces> <types> <type name="cms:object"> <title>Object</title> <parent>cm:cmobject</parent> </type> <type name="cms:container"> <title>Container</title> <parent>cms:object</parent> <associations> <child-association name="cms:contains"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>cms:object</class> <mandatory>false</mandatory> <many>true</many> </target> <duplicate>false</duplicate> </child-association> </associations> </type> <type name="cms:project"> <title>Project</title> <parent>cms:container</parent> </type> <type name="cms:folder"> <title>Folder</title> <parent>cms:container</parent> </type> <!– cms:asset is exactly analogous to cm:content, except that the versionable aspect has also been made mandatory. –> <type name="cms:asset"> <title>Asset</title> <parent>cms:object</parent> <properties> <property name="cms:content"> <type>d:content</type> <mandatory>false</mandatory> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>true</tokenised> </index> </property> </properties> <mandatory-aspects> <aspect>cm:auditable</aspect> <aspect>cm:versionable</aspect> </mandatory-aspects> </type> </types> </model>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:cms="http://www.alacre.com/cms/content-model-1.0" xmlns:app="http://www.alfresco.org/model/application/1.0"> <cm:folder> <cm:name>Project Root</cm:name> <cm:contains> <cms:project view:childName="cms:Project_1"> <cm:name>Project 1</cm:name> <cms:contains> <cms:folder> <cm:name>Folder, Level 01, 03</cm:name> <cms:contains> <cms:asset> <cm:name>Alfresco Tutorial.pdf</cm:name> <cms:content>contentUrl=classpath:alfresco/bootstrap/Alfresco-Tutorial.pdf|mimetype=application/pdf|size=|encoding=</cms:content> </cms:asset> <cms:folder> <cm:name>Folder, Level 02, 10</cm:name> </cms:folder> <cms:folder> <cm:name>Folder, Level 02, 02</cm:name> </cms:folder> </cms:contains> </cms:folder> </cms:contains> </cms:project> </cm:contains> </cm:folder> </view:view>
nodeService.getProperty(nodeRef, propertyQName).toString()
If I put the loading-up configuration for my data model in extension.dictionaryBootstrap, the importer would throw an exception saying that my content model's URI had not been published with the dictionary service. Moving my content model to dictionaryBootstrap (the one in application-context.xml) solved my problem. Seems like the data models listed under extension.dictionaryBootstrap are not getting imported (at least mine wasn't). Is there some other configuration that I missed?
depends-on="dictionaryBootstrap"
depends-on="extension.dictionaryBootstrap"
Since content is now a property type, what happens when one does nodeService.getProperties(NodeRef)? Does all of the content end up loaded into memory? This could easily be in 10s of MBs (or more). Exactly what "Serializable" object is returned in the Map for a property of type d:content?
I noticed in the Data Dictionary Guide wiki that d:content corresponds to String. Does this mean all of the data corresponding to d:content ends up being loaded as a single String? Somehow I doubt that.
I was thinking that I would probably need to determine the type of the property, and if it is of type d:content, I would have to get a ContentReader and use that to both get at the bytes representing the content and its properties like mimetype, size, date created etc.
How about the handling of non-d:content properties? Has that changed? Or is it ok (other than null-checking etc.) to do something like…