Scope overwrite error

I’m having a problem with Lucee/Railo thinking that I’m trying to overwrite
a scope.

Within a script function, I have a “execute” call to access a Perl library.
One of the attributes that needs to be passed to “execute” is “arguments.”
But Railo (4.2.1) errors out with a “can not overwrite arguments scope”
error, even though I’m not replacing the function’s arguments.

Here’s the code:

public struct function setImageMetadata(required struct metadata, required
string imagePath){
var arMetadata = ;
var key = ‘’;
var exifArgs = ‘’;
for(key in arguments.metadata){
arrayAppend(arMetadata,arguments.metadata[key]);
}
arrayAppend(arMetadata,’-overwrite_original’);
arrayAppend(arMetadata,arguments.imagePath);
exifArgs = arrayToList(arMetadata,’ ');
if(fileExists(arguments.imagePath)){
lock
name=“ImageMetadataAccessLock#hash(arguments.imagePath)#”
type=“exclusive”
timeout=“30” {
execute{
name=variables.exifTool
arguments = exifArgs;
variable = metadata
timeout = 30
}
}
}
return getImageMetadata(arguments.imgPath);
}

Any help would be greatly appreciated.–
Thanks,

Tom

Tom McNeer
MediumCool
http://www.mediumcool.com
1735 Johnson Road NE
Atlanta, GA 30306
404.589.0560

Hi Tom

You seem to have a semi-colon after “arguments = exifArgs”. If
removing that doesn’t help, try getting rid of the curly braces around
the attributes, ie:

execute name=variables.exifTool arguments=exifArgs variable=metadata timeout=30;

Julian.On 8 July 2015 at 17:48, Tom McNeer <@Tom_McNeer> wrote:

execute{
name=variables.exifTool
arguments = exifArgs;
variable = metadata
timeout = 30
}