Search code examples
hudsonclearcase

How to avoid the Hudson/ClearCase error message "not a valid snapshot view path"?


Though I am using Dynamic View in ClearCase, my Hudson is throwing below "is not a valid snapshot view path." error message.

build] $ cmd.exe /C '"ant.bat -file build.xml -DCC_BASELINE_NAME=<baselinename> update-view && exit %%ERRORLEVEL%%"'
Buildfile: build.xml
update-view:
 [ccupdate] cleartool: Error: 'E:\Views\<view-tag>' is not a valid snapshot view path.

BUILD FAILED
: Failed executing: cleartool update -overwrite -ctime -log log.log E:/Views/<view-tag>

Please suggest me to resolve the issue.


Solution

  • If you are using a dynamic view, this is the expected message: ClearCase cannot "update" a dynamic view - this is for snapshot views only.

    If you are using a snapshot view, then use the full path (instead of a shortcut through the Windows command subst)

    The full path of a snapshot view should be:

    C:\path\to\YourSnapshotView
    

    In it, you should at least see one VOB folder, and subfolders.

    E:\Views isn't the path to a snapshot view (it may be the path where several snapshot views are defined, but not just one)


    The ClearCase plugin for Hudson/Jenkins can use either dynamic or snapshot views, but:

    • You need to make sure you don't select options like load rules if your view tag is a dynamic view.
    • Click the "Advanced" button to reveal the advanced options, including the dynamic view options.

    https://wiki.jenkins-ci.org/download/attachments/2916537/base_dynamic_config.png?version=1&modificationDate=1252688398000

    (If the slave is on Windows, you would put M:\ instead of /view)


    The OP Karthik Was commented below:

    First I have created a Snapshot view and then created a Dynamic View.
    So, when I have created the Snapshot view a View.dat file has been generated; Hudson has identified the Snapshot view and passed that step.
    Then I have created a Dynamic view created on M:\