jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Guggisberg" <stefan.guggisb...@gmail.com>
Subject Re: ItemNotFoundException when importing from XML
Date Wed, 25 Oct 2006 09:03:40 GMT
On 10/25/06, Nicolas <ntoper@gmail.com> wrote:
> Hi,
>
> It is a bug we are working on. Please have a look at JCR 535.

nico,

i don't think that this is related to JCR-535. pete exported /menu and tries
to import that under the root node. this should work fine (as he confirms).
pete said that it only occurs when he's using  the jca session for the import.

cheers
stefan

>
> Nico
>
> On 10/24/06, pdog <pete.mazur@connectyourcare.com> 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 !!
>
>

Mime
View raw message