hi,
I am just trying to migrate the aem 6 to mongodb as in the adobe site as in the website http://docs.adobe.com/docs/en/aem/6-0/deploy/upgrade.html
I did the steps as disscussed in the above link ...
And I am succeeded in start the aem 6 in mongodb but how to create the node in aem 6 which running on mongodb
I used the code to create the node in aem 6 i.e.,
Repository repository = JcrUtils.getRepository("http://localhost:1802/crx/server");
Session session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
Node root = session.getRootNode();
root.addNode("Hellooooo","nt:unstructured");
session.save();
but here is the problem
- when i am trying to run the jar file independently (i.e., not on mongodb) then this code is working perfectly
- when i am trying to run the jar file on the mongodb then this code is not working it is throwing the error as follows :
Exception in thread "main" java.lang.IllegalArgumentException: Unknown nodetype rep:root
at org.apache.jackrabbit.jcr2spi.NodeImpl.<init>(NodeImpl.java:104)
at org.apache.jackrabbit.jcr2spi.ItemManagerImpl.createNodeInstance(ItemManagerImpl.java:316)
at org.apache.jackrabbit.jcr2spi.ItemManagerImpl.created(ItemManagerImpl.java:341)
at org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory.notifyCreated(AbstractItemStateFactory.java:74)
at org.apache.jackrabbit.jcr2spi.state.TransientISFactory.created(TransientISFactory.java:153)
at org.apache.jackrabbit.jcr2spi.state.AbstractItemStateFactory.notifyCreated(AbstractItemStateFactory.java:74)
at org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(WorkspaceItemStateFactory.java:349)
at org.apache.jackrabbit.jcr2spi.state.WorkspaceItemStateFactory.createNodeState(WorkspaceItemStateFactory.java:101)
at org.apache.jackrabbit.jcr2spi.state.TransientISFactory.createNodeState(TransientISFactory.java:97)
at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.doResolve(NodeEntryImpl.java:990)
at org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.resolve(HierarchyEntryImpl.java:134)
at org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyEntryImpl.getItemState(HierarchyEntryImpl.java:253)
at org.apache.jackrabbit.jcr2spi.hierarchy.NodeEntryImpl.getItemState(NodeEntryImpl.java:71)
at org.apache.jackrabbit.jcr2spi.ItemManagerImpl.getItem(ItemManagerImpl.java:193)
at org.apache.jackrabbit.jcr2spi.SessionImpl.getRootNode(SessionImpl.java:232)
at cts.CreateNode.CreateNodeAem.main(CreateNodeAem.java:18)
Can you guys please help me out ........................
Thanks,
Pavan