Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Attaching files returns "file not found"
Bowker
TS 6.5
CSSDK 2.5
WIN 2K
Trying to attach a file that exists but CSSDK status comes back "file not found" and the file is not attached.
Below is some information about this - any clues why it says the file is not found?
Attaching file is returning "no file or directory found"
Status returned from attachFiles = No file or directory found
Path information:
--- com.interwoven.cssdk.filesys.impl.CSWorkareaImpl{ name=development baseEdition=/ILC2CHA-2570/contentManagement/main/content/EDITION/INITIAL creationDate=Tue Jan 25 16:23:28 CST 2005 creator=ent/ddb description= owner=ent/ddb group=ent/WEB-IW-CM modificationDate=Mon Feb 07 13:14:54 CST 2005 readable=true writable=true vpath=/ILC2CHA-2570/contentManagement/main/content/WORKAREA/development } --- /TemplateData/content/promotion/learnmore/data/import_040820_50.xml
The directory listing on that machine:
Directory of Y:\contentManagement\main\content\WORKAREA\development\TemplateData\content\promotion\learnmore\data
10/21/2004 04:49p 1,615 import_040820_50.xml
1 File(s) 1,615 bytes
Dan Bowker
Northern Trust
Web Publishing Technology
Find more posts tagged with
Comments
Migrateduser
Hi,
Could you please post the code snippet that's doing the attach? The stack trace of the exception would also be useful.
Best Regards,
Narendra
Bowker
Narendra,
There is no exception. The error is returned in status[]. And yes - I'm using 'get trusted client' here too.
int i;
CSAreaRelativePath csPath[] = new CSAreaRelativePath[filenames.length];
for(i = 0; i < filenames.length; i++) {
csPath
= new CSAreaRelativePath();
String tempFile = csTask.getArea() + "/" + filenames
;
csPath
= csPath
.concat(tempFile);
}
CSPathStatus status[] = csTask.attachFiles(csPath);
for (i = 0; i < status.length; i++) {
System.out.println("file #" + i + " = <b><i>" + status
.getStatusMessage() + "</b></i>");
System.out.println("file #" + i + " = <b><i>" + status
.getAreaRelativePath().toString() + "</b></i>");
}
Dan Bowker
Northern Trust
Web Publishing Technology
Migrateduser
I think I see the problem. I think you are constructing the full VPath of the file to be attached (area + '/' + filename). The required input into the attachFiles call is to pass the path relative to the workarea root, for example, if you want to attach - "/default/main/WORKAREA/testWorkarea/dir1/dir2/file1", you would need to construct it like this - CSAreaRelativePath fileToBeAttached = new CSAreaRelativePath("dir1/dir2/file1");
Best Regards,
Narendra
Bowker
Thanks - that fixed it.
Dan Bowker
Northern Trust
Web Publishing Technology