1 Reply Latest reply on Feb 8, 2012 6:46 AM by aklimets

    ItemNotFoundException during vlt commit

    kshih@scripps Level 1

      Hello,

       

      I see these errors like this when vlt committing:

       

      "[WARN ] Newly created node not found by uuid /content/Scripps-from-Demo2/jcr:content: javax.jcr.ItemNotFoundException: f6aa34bf-f403-4e30-bb32-7bb9d8e80c71"

       

      The content in question was exported from a different CQ data store, in order to be imported into a different data store (where all the nodes in my import set would be new to my target data source -- i.e. no conflicts)

       

      Any idea what might be causing this? or how I can get a good vlt import after this error?

       

      Perhaps I am not using this as intended, so i'll describe step-by-step what i'm doing in more detail:

       

      1. in one instance of CQ, where I've done some development work locally, I've done a "vlt co" using filter.xml to check out some nodes i created and edited (or perhaps i used "vlt export")

      2. i close that test instance of CQ, and copy those dirs (jcr_root & META-INF) to a different location

      3. i startup a DIFFERENT instance of CQ (which has other work i want to merge with what i've exported in #1)

      4. i double-check to make sure the copied filter.xml is good, cd to my copied jcr_root and do a "vlt co --force --filter ../META-INF/vault/filter.xml http://localhost:4502/crx/-/jcr:root ."

      5. i do a "vlt add *" to what you have under jcr_root

      6. in directories like content/ and app/ i update .context.xml to add any new directories i've added e.g. "<Scripps-from-Demo2/>" (i still get error if i skip this step)

      7. i do a "vlt commit".

           many "adding....." statements pass by

           then, after "Transmitting filte data", i get a number of "[WARN ] Newly created node not found by uuid" (the error I mentiona at the start of this msg)

           i also get one or two errors like this: "[ERROR] Error during processing of /content/Scripps-from-Demo2/en/products/triangle/jcr:content/par/1_1219674803642/file: javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content"

           before finally: "[ERROR] commit: com.day.jcr.vault.vlt.VltException: Error while committing caused by: javax.jcr.PathNotFoundException: jcr:data"

      8. Looking in the directory "Scripps-from-Demo2" (in reponse to the error 1st described), this is what my .content.xml looks like this:

      "<?xml version="1.0" encoding="UTF-8"?>

      <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://w

      ww.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://

      www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"

          jcr:primaryType="cq:Page">

          <en/>

          <jcr:content

              cq:allowedTemplates="[/apps/scripps-app/templates/.*,/libs/collab/blog/t

      emplates/.*]"

              cq:designPath="/etc/designs/scripps-apps"

              cq:lastModified="{Date}2011-11-17T15:39:17.755-05:00"

              cq:lastModifiedBy="admin"

              cq:lastReplicated="{Date}2011-12-02T15:38:38.665-05:00"

              cq:lastReplicatedBy="admin"

              cq:lastReplicationAction="Activate"

              cq:lastRolledout="{Date}2011-11-17T15:39:17.946-05:00"

              cq:lastRolledoutBy="admin"

              cq:siteOwner=""

              jcr:isCheckedOut="{Boolean}true"

              jcr:mixinTypes="[cq:LiveSync,cq:ReplicationStatus,mix:versionable]"

              jcr:primaryType="nt:unstructured"

              jcr:title="Scripps-from-Demo2"

              jcr:uuid="f6aa34bf-f403-4e30-bb32-7bb9d8e80c71"

              sling:resourceType="foundation/components/redirect"

              redirectTarget="/content/Scripps-from-Demo2/en">

              <cq:LiveSyncConfig

                  cq:isDeep="{Boolean}true"

                  cq:master="/content/scripps-app"

                  jcr:primaryType="cq:LiveSyncConfig"/>

          </jcr:content>

          <modules/>

          <regions/>

          <newregion/>

          <region2/>

          <region3/>

          <region4/>

          <region5/>

          <page-with-region/>

          <scottregionpage/>

          <recipes/>

          <demo-region-page-ken-1/>

      </jcr:root>"

       

      Should having specific "uuid"s trouble me when trying to import these nodes? what about jcr:isCheckedOut="{Boolean}true"?

       

      Am I not using vlt as intended? I realize i could have used Package Manger to package my nodes up per directory as *.crx or *.zip files; but, I did it this way, because we need to be able to store our files & changes to our corporate svn or hg repository. Conversely, other developers must be able to take this code an check it out to their own machines. While this has worked for some of my trivial sample tests, exporting this project has been causing these errors. Any ideas?

       

      Best,

      Ken

        • 1. Re: ItemNotFoundException during vlt commit
          aklimets Adobe Employee

          I can't really help with the issue at hand, but for your use case - have you looked at the vlt rcp option to transfer from one repository to another?

           

          Here is the help text:

           

          $ vlt --help rcp
          Usage:                                                                                                                                                                                     
           rcp -q|-r|-b |-t |-u|-n|-e  [ ...]                                                                                                                   
          
          Description:
            Copies a node tree from one remote repository to another. Note that  points at the source node, and points at the destination path, which parent node must exist.              
                                                                                                                                                                                                     
            Note: Due to bug in command line processing, the --exclude options need to be followed by another option before the  and  arguments.                                           
            Example:                                                                                                                                                                                 
              vlt rcp -e ".*\.txt" -r http://localhost:4502/crx/-/jcr:root/content http://admin:admin@localhost:4503/crx/-/jcr:root/content_copy                                                     
                                                                                                                                                                                                     
          
          Options:                                                                                                                                                                                   
            -q (--quiet)                        print as little as possible                                                                                                                          
            -r (--recursive)                    descend recursively                                                                                                                                  
            -b (--batchSize)              number of nodes until intermediate save                                                                                                              
            -t (--throttle)            number of seconds to wait after an intermediate save                                                                                                 
            -u (--update)                       overwrite/delete existing nodes.                                                                                                                     
            -n (--newer)                        respect lastModified properties for update.                                                                                                          
            -e (--exclude)  [ ...]    regexp of excluded source paths.                                                                                                                     
                                           the repository address of the source tree                                                                                                            
                                           the repository address of the destination node
          
          1 person found this helpful