jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdog <pete.ma...@connectyourcare.com>
Subject Re: ItemNotFoundException when importing from XML
Date Thu, 26 Oct 2006 14:07:29 GMT

Here's the issue I entered.  If you need more information let me know and I
will enter whatever is needed.
https://issues.apache.org/jira/browse/JCR-607
https://issues.apache.org/jira/browse/JCR-607 

Thanks for the help
Pete


Stefan Guggisberg wrote:
> 
> hi pete,
> 
> On 10/25/06, pdog <pete.mazur@connectyourcare.com> wrote:
>>
>> Stefan,
>>
>> When using a "regular" session it doesn't occur.  It only occurs when the
>> session is accessed from the JCA.
> 
> thanks for the feedback. this definitely seems to be a bug.
> 
> would you mind creating a jira issue for this?
> 
> thanks a lot,
> stefan
> 
>>
>> Thanks
>> Pete
>>
>>
>> Stefan Guggisberg wrote:
>> >
>> > On 10/25/06, pdog <pete.mazur@connectyourcare.com> wrote:
>> >>
>> >> I have been trying different things to resolve the problem and noticed
>> >> that
>> >> when using the JCA connection if I try to import an xml that was
>> >> generated
>> >> not from the root, eg /menu/portal/privacypolicy then this works
>> without
>> >> issue.  The problem only happens when it is done when importing to the
>> >> root.
>> >>
>> >> I can work around this by just modifying the repository so that the
>> menu
>> >> that I use isn't on the root but I figured I would let you know this
>> in
>> >> case
>> >> it helps why the issue happens at the root.
>> >
>> > thanks, appreciated.
>> >
>> > can you still confirm that it doesn't occur when you're using a
>> > 'regular' session
>> > instead of the JCA session?
>> >
>> > cheers
>> > stefan
>> >
>> >>
>> >> Thanks
>> >> Pete
>> >>
>> >>
>> >>
>> >> Nicolas Toper wrote:
>> >> >
>> >> > Hi Stefan,
>> >> >
>> >> > You are totally right sorry.
>> >> >
>> >> > Nico
>> >> >
>> >> >
>> >> > On 10/25/06, Stefan Guggisberg <stefan.guggisberg@gmail.com>
wrote:
>> >> >>
>> >> >> 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 !!
>> >> >> >
>> >> >> >
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > a+
>> >> > Nico
>> >> > my blog! http://www.deviant-abstraction.net !!
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/ItemNotFoundException-when-importing-from-XML-tf2503854.html#a6994330
>> >> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/ItemNotFoundException-when-importing-from-XML-tf2503854.html#a6996985
>> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/ItemNotFoundException-when-importing-from-XML-tf2503854.html#a7011801
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.


Mime
View raw message