Buggy code:
public class CreateExampleSchemaTask extends SwingWorker < Void , Void > { private MainFrame mainFrame ; private MenuController controller ; private String waterSoftware ; private String schemaName ; private String sridValue ; private boolean status ; public CreateExampleSchemaTask ( String waterSoftware , String schemaName , String sridValue ) { } public void setParentPanel ( MainFrame mainFrame ) { } public void setController ( MenuController controller ) { } private boolean loadRaster ( String schemaName , String rasterPath , String rasterName ) { String srid = MainDao . getTableSrid ( schemaName , "banks" ) . toString ( ) ; String logFolder = Utils . getLogFolder ( ) ; <START_BUG> String fileSql = logFolder + ( rasterName . replace ( ".asc" , ".sql" ) ) ; <END_BUG> if ( MainDao . checkTableHasData ( schemaName , "mdt" ) ) { String msg = "DTM<seq2seq4repair_space>table<seq2seq4repair_space>already<seq2seq4repair_space>loaded.<seq2seq4repair_space>Do<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>overwrite<seq2seq4repair_space>it?" ; int res = Utils . showYesNoDialog ( msg ) ; if ( res != ( JOptionPane . YES_OPTION ) ) return false ; } String bin = MainDao . getBinFolder ( ) ; String user = MainDao . getUser ( ) ; String host = MainDao . getHost ( ) ; String port = MainDao . getPort ( ) ; String db = MainDao . getDb ( ) ; String aux = ( ( ( ( ( ( ( ( ( "\"" + bin ) + "raster2pgsql\"<seq2seq4repair_space>-d<seq2seq4repair_space>-s<seq2seq4repair_space>" ) + srid ) + "<seq2seq4repair_space>-I<seq2seq4repair_space>-C<seq2seq4repair_space>-M<seq2seq4repair_space>\"" ) + rasterPath ) + "\"<seq2seq4repair_space>-F<seq2seq4repair_space>-t<seq2seq4repair_space>100x100<seq2seq4repair_space>" ) + schemaName ) + ".mdt<seq2seq4repair_space>><seq2seq4repair_space>\"" ) + fileSql ) + "\"" ; aux += "\n" ; aux += ( ( ( ( ( ( ( ( ( ( ( "\"" + bin ) + "psql\"<seq2seq4repair_space>-U<seq2seq4repair_space>" ) + user ) + "<seq2seq4repair_space>-h<seq2seq4repair_space>" ) + host ) + "<seq2seq4repair_space>-p<seq2seq4repair_space>" ) + port ) + "<seq2seq4repair_space>-d<seq2seq4repair_space>" ) + db ) + "<seq2seq4repair_space>-c<seq2seq4repair_space>\"drop<seq2seq4repair_space>table<seq2seq4repair_space>if<seq2seq4repair_space>exists<seq2seq4repair_space>" ) + schemaName ) + ".mdt\";" ; aux += "\n" ; aux += ( ( ( ( ( ( ( ( ( ( ( ( ( "\"" + bin ) + "psql\"<seq2seq4repair_space>-U<seq2seq4repair_space>" ) + user ) + "<seq2seq4repair_space>-h<seq2seq4repair_space>" ) + host ) + "<seq2seq4repair_space>-p<seq2seq4repair_space>" ) + port ) + "<seq2seq4repair_space>-d<seq2seq4repair_space>" ) + db ) + "<seq2seq4repair_space>-f<seq2seq4repair_space>\"" ) + fileSql ) + "\"<seq2seq4repair_space>><seq2seq4repair_space>\"" ) + logFolder ) + "raster2pgsql.log\"" ; aux += "\ndel<seq2seq4repair_space>" + fileSql ; aux += "\nexit" ; Utils . getLogger ( ) . info ( aux ) ; File batFile = new File ( ( logFolder + "raster2pgsql.bat" ) ) ; Utils . fillFile ( batFile , aux ) ; Utils . openFile ( batFile . getAbsolutePath ( ) ) ; return true ; } @ Override public Void doInBackground ( ) { } public void done ( ) { } No newline ; at end ; of file ; }

Fix:
String fileSql = logFolder + ( rasterName . replace ( ".tif" , ".sql" ) ) ;