Question

Memory issues with batch deploy


Badge
Hi, new to FME here

 

 

I've got a basic workbench that reads all xlsx files of addresses in a folder, joins them with an existing table to geoencode it, and then outputs it to one of three Oracle Spatial Object writers depending on some other attributes. It processes fine if I run it through the workbench, but I'd like to batch deploy it, which raises some problems.

 

 

I went through the batch deploy wizard, but when I run the autogenerated .bat file it stops after processing the first excel file with the message "The instruction at 0x107e183a referenced memory at 0x0000002c. The memory could not be read".

 

 

But if I change the .bat file's contents from  
 fme "D:\my_project_xlsxr2oracle8i.tcl
 to 
 fme "D:\my_project_xlsxr2oracle8i.fmw"
 It works fine, just like running it through the application.

 

 

These are the contents of the .tcl file 
 set workspacename {D:/my_project_xlsxr2oracle8i.fmw} set destDirList {} set recreateSourceTree "no" set superBatchFileName [FME_TempFilename] set superBatchFile [open $superBatchFileName "w"] lappend sourceDatasets {//network_machine/excel_addresses/*.xlsx} set logStandardOut {} set logTimings {} set sourceDatasets [lsort [eval FME_RecursiveGlob $sourceDatasets]] # When the "Recreate source directory tree" option has been selected, # find the deepest directory that all of the source datasets have in common. # This will be removed from each to form the destination dataset name. set commonSource {} if { [string first {yes} $recreateSourceTree] != -1 } {    # And now the interesting part.  We start out assuming that everything up    # to the last "/" in the first dataset is the common part, and then    # start shortening it until we've looked at all datasets.    foreach dataset $sourceDatasets {       regsub {/[^/]*/*$} $dataset / datasetDir       if { $commonSource == {} } {          # The first time through, we will take the whole dataset directory          # to seed our notion of what's in common          set commonSource "${datasetDir}"       } else {          # Compare this dataset's directory with our current notion of          # the commonPart.  We will iteratively remove path portions from          # the end one or the other (or both) until they match.          while { $datasetDir != $commonSource } {             if { [string length $datasetDir] >= [string length $commonSource] } {                regsub {[^/]*/*$} $datasetDir {} datasetDir             } else {                if { [string length $commonSource] >= [string length $datasetDir] } {                   regsub {[^/]*/*$} $commonSource {} commonSource                }             }          }       }    } } foreach sourceDataset $sourceDatasets {     # If we are replicating the directory structure, remove the common     # portion of the source dataset, and use it in the formation of the     # destination dataset.     if { ($commonSource != {}) &&          ([string first $commonSource $sourceDataset] == 0) } {        set baseName [file rootname [string range $sourceDataset [string length $commonSource] end]]        catch { file mkdir [file dirname $destDir$baseName] }     } else {        set baseName [file tail [file rootname $sourceDataset]]     }     set destDatasetLine {}     set destIndex 0     set numDest [llength $destDirList]     while {$destIndex < $numDest} {        set destDir [lindex $destDirList $destIndex]        set suffix [lindex $suffixList $destIndex]        set destDataset "$destDir$baseName$suffix"        set destDatasetLine "$destDatasetLine --[lindex $destMacroList \"$destIndex\"] \"$destDataset\""         incr destIndex     }     puts $superBatchFile "\"$workspacename\" --SourceDataset_XLSXR \"$sourceDataset\" $destDatasetLine $logStandardOut $logTimings" } close $superBatchFile if [ catch { fme COMMAND_FILE $superBatchFileName } ] {   puts "FME encountered an error. Please contact support@safe.com" } if [ catch { file delete $superBatchFileName } ] {   puts "Warning: unable to delete $superBatchFileName" }
 The .tcl file was autogenerated by the batch deploy wizard, and I'm not entirely sure what it does. It looks like it's just making a list of all the datasources and writers, but I thought that was already covered just from the .fmw file. I guess what I'm asking is if anyone knows why the .tcl file is failing, or if there's any way to step through and debug it.

0 replies

Be the first to reply!

Reply