Hi Cesar, It may be because the node, which you are trying to checkout is not versionable. or the former version does not have a primary property associated with that.
>From javadocs: Node will throw ItemNotFoundException if this node does not >have a primary child item, either because none is declared in the node type or >because a declared primary item is not present on this node instance. please double check whether the node actually have a primary property. if yes, then did you set the property at the time of node addition. i.e. before update. /Sunil Dhage ________________________________________ From: CesarX [[email protected]] Sent: Monday, November 30, 2009 10:08 PM To: [email protected] Subject: Error Updating a node Hi everybody, i'm using jackrabbit with liferay 5.1, it was very good but 3 weeks ago when i want to do an update of anyfile, my console show the next error: this error appear in any cases and other files are normal. com.liferay.portal.SystemException: javax.jcr.ItemNotFoundException: 38dfef6e-ecd2-470e-bd47-bb459f57d683 at com.liferay.documentlibrary.util.JCRHook.updateFile(JCRHook.java:626) at com.liferay.documentlibrary.service.impl.DLLocalServiceImpl.updateFile(DLLocalServiceImpl.java:187) at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.updateFileEntry(DLFileEntryLocalServiceImpl.java:906) at com.liferay.portlet.documentlibrary.service.impl.DLFileEntryLocalServiceImpl.updateFileEntry(DLFileEntryLocalServiceImpl.java:732) at com.liferay.portlet.documentlibrary.service.DLFileEntryLocalServiceUtil.updateFileEntry(DLFileEntryLocalServiceUtil.java:454) at com.liferay.portlet.documentlibrary.action.EditFileEntryAction.updateFileEntry(EditFileEntryAction.java:308) at com.liferay.portlet.documentlibrary.action.EditFileEntryAction.processAction(EditFileEntryAction.java:103) at com.liferay.portal.struts.PortletRequestProcessor.process(PortletRequestProcessor.java:178) at com.liferay.portlet.StrutsPortlet.processAction(StrutsPortlet.java:197) i have done a debug and i found the error appear in this line: session = JCRFactoryUtil.createSession(); Node rootNode = getRootNode(session, companyId); Node repositoryNode = getFolderNode(rootNode, repositoryId); Node fileNode = repositoryNode.getNode(fileName); Node contentNode = fileNode.getNode(JCRConstants.JCR_CONTENT); contentNode.checkout();//ERROR IS HERE contentNode.setProperty(JCRConstants.JCR_MIME_TYPE, "text/plain"); contentNode.setProperty(JCRConstants.JCR_DATA, is); contentNode.setProperty( JCRConstants.JCR_LAST_MODIFIED, Calendar.getInstance()); session.save(); -- View this message in context: http://n4.nabble.com/Error-Updating-a-node-tp931412p931412.html Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
