Hi,
I was trying to add a new schema that has a number of TYPEs to SQLcl Projects (using SQLcl version: 25.4.1.0 build: 25.4.1.022.0618).
A small handful (about 10%) of my TYPE SPECS fail on the project stage step with the error:
Error processing TYPE_SPEC <MY_TYPE_OBJECT>, encountered exception Cannot invoke "String.contains(java.lang.CharSequence)" because the return value of "oracle.dbtools.extension.project.commands.stage.objectclasses.DbDiffObject.getMasterFileContent()" is null
...
ERROR: The following files were not processed, please confirm they have a hash at the bottom of the
file and all other content is correct. Once they are corrected please rerun the stage command
...
The file does indeed end with a -- sqlcl_snapshot { … } line – as far as I can tell, I can't see (notice) any difference in the failing ~10% compared to the working ~90%.
The body and spec is (again, as far as I can tell) both seem to have valid SQL in the files:
./src/database/<schema_name>/type_specs/<my_type_object>.sql
./src/database/<schema_name>/type_bodies/<my_type_object>.sql
But due to the above mentioned error, only the TYPE BODY is processed by the project stage command :
./dist/releases/next/changes/<my_branch>/<schema_name>/type_bodies/<my_type_object>.sql
Any suggestions on what I can do to try to help debug this further? (Adding --verbose to the stage command doesn't seem to create any additional output in this particular case.)
Any clues as to what the "oracle.dbtools.extension.project.commands.stage.objectclasses.DbDiffObject.getMasterFileContent()" is null actually means or what might be triggering it? And what I maybe should look for as the offending part of the src/ SQL file? So that I can hopefully produce a sharable, reproducible test case.
Thanks.