Return-Path: Delivered-To: apmail-jackrabbit-users-archive@locus.apache.org Received: (qmail 7585 invoked from network); 26 Oct 2006 04:40:01 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2006 04:40:01 -0000 Received: (qmail 72445 invoked by uid 500); 25 Oct 2006 00:13:32 -0000 Delivered-To: apmail-jackrabbit-users-archive@jackrabbit.apache.org Received: (qmail 72433 invoked by uid 500); 25 Oct 2006 00:13:31 -0000 Mailing-List: contact users-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@jackrabbit.apache.org Delivered-To: mailing list users@jackrabbit.apache.org Received: (qmail 72424 invoked by uid 99); 25 Oct 2006 00:13:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 17:13:31 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of ntoper@gmail.com designates 66.249.82.230 as permitted sender) Received: from [66.249.82.230] (HELO wx-out-0506.google.com) (66.249.82.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2006 17:13:18 -0700 Received: by wx-out-0506.google.com with SMTP id t13so2155800wxc for ; Tue, 24 Oct 2006 17:12:56 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=dtILI3WWYDxR23qojVfiGjNpBNGFqUYyHFX3ImRe2rDiiLXRwOsN0xTswo9DApyTkXp/NnU7c0VfaR4OnLHbxM/nNxKslISioyW2C3SN7un57usvO+iBRY241CgZ5po9d767Kc3dkauhob7UdgeDT3PDog//EiPl3APEtdxkDbw= Received: by 10.70.90.14 with SMTP id n14mr10212842wxb; Tue, 24 Oct 2006 17:12:56 -0700 (PDT) Received: by 10.70.40.17 with HTTP; Tue, 24 Oct 2006 17:12:55 -0700 (PDT) Message-ID: Date: Wed, 25 Oct 2006 02:12:55 +0200 From: "Nicolas " To: users@jackrabbit.apache.org Subject: Re: ItemNotFoundException when importing from XML In-Reply-To: <6980719.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_22520_26099655.1161735175828" References: <6980719.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_22520_26099655.1161735175828 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, It is a bug we are working on. Please have a look at JCR 535. Nico On 10/24/06, pdog wrote: > > > When doing an import of XML I am receiving the following error: > javax.jcr.ItemNotFoundException: failed to build path of > 674a6021-77c7-4975-a26e-b1f56f6a6647: cafebabe-cafe-babe-cafe-babecafebabe > has no child entry for 674a6021-77c7-4975-a26e-b1f56f6a6647 > at > org.apache.jackrabbit.core.HierarchyManagerImpl.buildPath( > HierarchyManagerImpl.java:307) > at > org.apache.jackrabbit.core.CachingHierarchyManager.buildPath( > CachingHierarchyManager.java:158) > at > org.apache.jackrabbit.core.HierarchyManagerImpl.getPath( > HierarchyManagerImpl.java:356) > at > org.apache.jackrabbit.core.CachingHierarchyManager.getPath( > CachingHierarchyManager.java:220) > at > org.apache.jackrabbit.core.BatchedItemOperations.checkRemoveNode( > BatchedItemOperations.java:699) > at > org.apache.jackrabbit.core.BatchedItemOperations.recursiveRemoveNodeState( > BatchedItemOperations.java:1513) > at > org.apache.jackrabbit.core.BatchedItemOperations.removeNodeState( > BatchedItemOperations.java:1215) > at > org.apache.jackrabbit.core.xml.WorkspaceImporter.resolveUUIDConflict( > WorkspaceImporter.java:195) > at > org.apache.jackrabbit.core.xml.WorkspaceImporter.startNode( > WorkspaceImporter.java:473) > at > org.apache.jackrabbit.core.xml.DocViewImportHandler.startElement( > DocViewImportHandler.java:238) > at > org.apache.jackrabbit.core.xml.ImportHandler.startElement( > ImportHandler.java:234) > at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown > Source) > at > org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown > Source) > at > > org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook > (Unknown > Source) > at > > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch > (Unknown > Source) > at > org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XML11Configuration.parse(Unknown > Source) > at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) > at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown > Source) > at > org.apache.jackrabbit.core.WorkspaceImpl.importXML(WorkspaceImpl.java:731) > at > com.cc.framework.util.JackrabbitUtil.loadMenuFromXML(JackrabbitUtil.java > :158) > > When looking up the meaning behind cafebabe I found that that means the > root > menu. When I look at the root menu in my repository there is a menu node > that has a UUID of what is in the error. Here is the code I am using to > do > the import: > > Session currentSession = getSession(); > Workspace currentWorkspace = currentSession.getWorkspace(); > String xmlLocation = > System.getProperty(CCConstants.REPOSITORY_XML_LOCATION); > File inputFile = new File(xmlLocation+ "\\menuview.xml"); > FileInputStream in = new FileInputStream(inputFile); > > currentWorkspace.importXML("/", in, > ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING); > > getSession() is just a static method that retrieves a jackrabbit session > from a JNDI lookup that is started using the jackrabbit-jca-1.1.rar. Now > when I do this import just in a main method and create the JNDI lookup > using > the RegistryHelper it works without problem. It only happens when i'm > doing > the import when using the jca session. > > The xml was obtained by doing an exportDocumentView from /menu. So > basically I am just trying to do an import of an xml that was just > exported > of the same (just testing theories and getting used to Jackrabbit). > > Thanks. > -- > View this message in context: > http://www.nabble.com/ItemNotFoundException-when-importing-from-XML-tf2503854.html#a6980719 > Sent from the Jackrabbit - Users mailing list archive at Nabble.com. > > -- a+ Nico my blog! http://www.deviant-abstraction.net !! ------=_Part_22520_26099655.1161735175828--