jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pete Mazur (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-607) Importing XML at root level using a session from JCA throws a javax.jcr.ItemNotFoundException
Date Thu, 26 Oct 2006 14:06:16 GMT
Importing XML at root level using a session from JCA throws a javax.jcr.ItemNotFoundException
---------------------------------------------------------------------------------------------

                 Key: JCR-607
                 URL: http://issues.apache.org/jira/browse/JCR-607
             Project: Jackrabbit
          Issue Type: Bug
          Components: jca, xml
    Affects Versions: 1.1
         Environment: JBoss 4.0.4 Application Server

            Reporter: Pete Mazur
            Priority: Minor


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. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message