<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=409162118-15092006><FONT face=Arial
color=#0000ff size=2>The API is sometimes a bit inconsistent about the meaning
of 'resource name' or 'resource path' in method signatures: sometimes it's
relative to the site root, and sometimes it's absolute. Are you sure you
are using the right variant for CmsObject.copyResource()? I've not used
the method, but I imagine it takes a site-root-relative value.. yet your symbol
'source' is absolute. Try using the relative equivalent and see if that
helps.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=409162118-15092006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=409162118-15092006><FONT face=Arial
color=#0000ff size=2>Jon</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> opencms-dev-bounces@opencms.org
[mailto:opencms-dev-bounces@opencms.org] <B>On Behalf Of </B>Daniel
Rhoden<BR><B>Sent:</B> 15 September 2006 19:11<BR><B>To:</B> The OpenCms mailing
list<BR><B>Subject:</B> [opencms-dev] Tell me if this makes
sense...<BR></FONT><BR></DIV>
<DIV></DIV>I am trying to copy a large number of files by writing a jsp that
uses CmsObject.copyResource(). Now tell me if this makes sense to you:
<BR>(assume ob is an instance of CmsObject and <B>source</B> =
"/sites/mySite/myImage.jpg") <BR>
<OL>
<LI>When I do ob.existsResource(<B>source</B>) it returns true. <BR>
<LI>I can even CmsResource rec = ob.readResource(<B>source</B>), and
<B>source</B>.equals(rec.getRootPath() ). <BR>
<LI>Looks good, right? </LI></OL>But when I try to
ob.copyResource(<B>source</B>, destination), I get the following
exception:<BR><BR>org.opencms.file.<B>CmsVfsResourceNotFoundException</B>: Error
creating the resource "/sites/mySite/myImage.jpg"<BR><BR>Not Found??? Not
Found?? Then what the heck was it doing with those previous
calls??<TT><BR><BR></TT>My installed OpenCms version is: 6.2.0<BR><SPAN
class=small>Running on Sun Microsystems Inc. Java HotSpot(TM) Client VM
1.5.0_07-b03 mixed mode, sharing with Linux 2.6.9-34.EL
(i386)<BR>MySql<BR><BR><BR></SPAN><BR><BR></BODY></HTML>