Written by

Integration Engineer at ReStart Consulting
Question William Glover · Jan 10, 2023

Using irisNative.ClassMethodStatusCode to call a class method, returns <REMOTE EXECUTE INVALID WRITE> error.

   InterSystems.Data.IRISClient.IRISException (0x00000000): ERROR #5002: ObjectScript error: <REMOTE EXECUTE INVALID WRITE>Load+20^%apiOBJ
   at InterSystems.Data.IRISClient.ADO.IRIS.ClassMethodStatusCode(String className, String methodName, Object[] args)
   at Setup.core.CacheCRUD.RunDeploymentClass() 

Throwing this error when calling  the ##class(%Studio.Project).InstallFromFile() remotely.

The method works when ran through studio, but not when accessing via ADO.Net, seems to be a limitation on the access to the location of the file, but if I make it accessible by anyone in windows it is still not accessible through the code.

Product version: IRIS 2021.1

Comments

Stefan Rieger · Jan 18, 2023

this always happens when you call Methods who try to "output" something to a stream other than the internal .net message stream - very much Methods do that to signal status and progress with the terminal.

Fortunately some of them can be forced to behave silent - e.g. For the Method %SYSTEM.OBJ.Load you must provide qspec with argument "/display=none"

hope that helps

0
Eduard Lebedyuk · Jan 18, 2023

Try: ##class(%Studio.Project).InstallFromFile( "/display=none /displaylog=0 /displayerror=0")

0
William Glover  Jan 31, 2023 to Eduard Lebedyuk

Thanks Eduard, 

That worked, is there a way of using this Qspec when writing out to a global, I am getting the same error when trying to do this with a global subscript.

0