· Jun 14, 2021

What does this error occur?

I am getting the following error when trying to fect data from DeepSee:

"Error":"ERROR #5002: Cache error: <PROTECT>%Construct+3^%DeepSee.ResultSet.1 ^DeepSee.Cache.LocalResults(\"session\"),e:\\hs-db\\tfoms\\"

However, I cannot find the place this error points me to.

Specifically, it says 'Label %Construct + 3 lines, in the %DeepSee.ResultSet.1', but there does not seem to be such a place. I could only find the %DeepSee.ResultSet class and it does not have a lable named %Construct.

Product version: Caché 2018.1
Discussion (4)1
Log in or sign up to continue


When a label begins with % it is often a sign that it is something that has been generated as part of the class compilation process.

In this case %Construct is the generated constructor code for the class.  More specifically, if any property in your class definition has an initial value specification then the %Construct code will be generated in your .int routine and will initialise the values of these properties.

By default, the .int code for the class %DeepSee.ResultSet.cls will not be present on your system, but you can create it by recompiling this class with the k flag which indicates that .int code should be kept.

Do Compile^%apiOBJ("%DeepSee.ResultSet","k")

Once you have re-compiled this class then you should be able to inspect the .int code and locate the line that is responsible for your <PROTECT> error.

When executing a query, DeepSee will store intermediate and final results in the cache globals. As the engine was trying to create a new session, it looks like it could not access the database in e:\hs-db\tfoms\. Either this database is mounted read only (in this case you will need to create some DeepSee mappings) or the user executing the query does not have r/w permissions on this database.