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.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 errororg.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=historyas well as the solution.not able to do that way.Please any one help me…………….. ThanksNaveen