We're having an ellusive error calling a BP from Java code.
The Java code is this
public synchronized String executeBncCommand(String command, UniSession us, String params) throws UniSubroutineException,UniSessionException {
try {
UniSubroutine uSub = null;
uSub = us.subroutine("***ProgramName***", 3);
uSub.setArg(0, command);
uSub.setArg(1, params);
uSub.setArg(2, "");
uSub.call();
return uSub.getArg(2).toString();
} catch (UniSubroutineException | UniSessionException e) {
throw e;
}
}
The BASIC lines that are crashing are these ones:
* Devuelve el PID del usuario
CASE COMANDO='GET.PID'
RESPUESTA=XUSR
Where XUSR is a variable that contains the PID of the user.
The error is: asjava.uniobjects.UniSubroutineException: An argument was requested from the RPC that was of an invalid type.
Looking at the documentation the error code is 81008.
The problem is that this call is done several times and it works fine. Then, suddenly, fails.
It's failing on two different platforms:
Versión UV: 11.2.5 Build 4801 uv112_150724_4801 running on CentOS Linux release 7.9.2009 (Core)
Versión UV: 11.3.1 113_190426_6025 hf22 running on CentOS Linux release 7.9.2009 (Core)
------------------------------
Héctor Cortiguera
Quiter Servicios Informaticos SL
------------------------------