Hi,
at our old Oracle database 12c we have a Java stored procedure getDirList which works fine but after migration to Oracle 19c i get the error illegal character: '#' at compilation when invoking an SQL command by prefix with #sql. Below is the java code of the java stored procedure.
Has somebody an idea what's wrong?
Many thanks in advance.
Regards,
Martin
// Find all directories in a directory and
// insert them into the table rsi_dir_file_list.
// directory: Directory to be searched.
public static String getDirList(String directory)
{
String vReturn = "Y";
try
{
File path = new File(directory);
String[] list = path.list();
String element;
File foundFile;
for(int i = 0; i < list.length; i++)
{
element = list[i];
foundFile = new File(directory, element);
// Ignore Directories.
if (foundFile.isDirectory())
{
#sql {INSERT INTO rsi_dir_file_list(filename) VALUES (:element)};
}
}
return vReturn;
}
catch(Exception ex)
{
vReturn = ex.getMessage();
}
return vReturn;
}