Custom content types

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-25-2007 07:08 AM
I created my own content types, i want to use them while adding node using JCR API. lets take my content type is dml:rsscontent.
here is my java class.
while executing the above class i am getting this error
I found similar kind of problem in this link http://issues.alfresco.com/browse/AR-1179?page=history
as well as the solution.not able to do that way.
Please any one help me……………..
Thanks
Naveen
here is my java class.
Node rootNode = session.getRootNode(); // first, access the company home Node companyHome = rootNode.getNode("app:company_home"); Node rssFeeds = companyHome.getNode("app:user_homes"); //To get items from rss feeds. // create the content nodegud morning Node channelContent = rssFeeds.addNode("cm:","dml:rsscontent");
while executing the above class i am getting this error
org.alfresco.service.namespace.NamespaceException: Namespace prefix dml is not mapped to a namespace URI at org.alfresco.service.namespace.QName.createQName(QName.java:103) at org.alfresco.service.namespace.QName.createQName(QName.java:125) at org.alfresco.jcr.item.NodeImpl.addNode(NodeImpl.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.alfresco.jcr.util.JCRProxyFactory$SessionContextInvocationHandler.invoke(JCRProxyFactory.java:138) at $Proxy82.addNode(Unknown Source) at com.cognizant.digitalmedialab.cms.business.JCRManagerMeta.getJCRRepository(JCRManagerMeta.java:46) at com.cognizant.digitalmedialab.cms.business.RssFeeds.getChannelDetails(RssFeeds.java:34) at com.cognizant.digitalmedialab.cms.business.JCRManagerMeta.main(JCRManagerMeta.java:107)
I found similar kind of problem in this link http://issues.alfresco.com/browse/AR-1179?page=history
as well as the solution.not able to do that way.
Please any one help me……………..
Thanks
Naveen
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2007 12:27 PM
Hi,
You need to register a model that declares that namespace and the properties. See the sample file custom-model-context.xml.sample. (http://wiki.alfresco.com/wiki/Data_Dictionary_Guide).
Regards
You need to register a model that declares that namespace and the properties. See the sample file custom-model-context.xml.sample. (http://wiki.alfresco.com/wiki/Data_Dictionary_Guide).
Regards

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2007 01:32 AM
hi derek i followed this link http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Step_4:_Register_the_Model_with_the_Repository for registering my custom content types. whats the diff in using example-model-context.xml.sample and custom-model-context.xml.sample..both are same….
i found usage of custom content types is impossible through jcr api…
Please check here… http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Using_a_Custom_Model
Thanks
Naveen
i found usage of custom content types is impossible through jcr api…
Please check here… http://wiki.alfresco.com/wiki/Data_Dictionary_Guide#Using_a_Custom_Model
Thanks
Naveen

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-07-2007 02:03 AM
hi derek followed your reply getting same error……
thanks
Naveen
thanks
Naveen
