Informix Error -9799: User-defined routine vitual-processor context-switch failed.
Cause and resolution
User-defined routine vitual-processor context-switch failed.
The database server could not switch to or back from the needed VP during load, unload, or execution. The VP class could be wrong in the routine definition, or the VPCLASS parameter could be missing from the onconfig file. The following error messages appear in the log:
ERROR: Routine execution VP switch failed -- new VP error_string
ERROR: Routine execution VP switch failed -- old VP id = VP_ID
Make sure the VP class is correct in the routine definition. Also, check the ONCONFIG file to make sure that it includes a VPCLASS parameter for this type of virtual processor and that the setting of the JVPCLASSPATH parameter is correct.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9799 fires when the database server can't switch to or back from the virtual processor
(VP) a UDR needs during load, unload, or execution — per the official guidance; logged as
ERROR: Routine execution VP switch failed -- new VP error_string and
ERROR: Routine execution VP switch failed -- old VP id = VP_ID.
- The wrong VP class specified in the routine's definition, per the official guidance — the first named cause.
- The ONCONFIG file missing a VPCLASS parameter for the needed VP type, per the official guidance — the second named cause.
Solutions / Resolution
- Make sure the VP class is correct in the routine's definition, per the official guidance.
- Check ONCONFIG includes a VPCLASS parameter for this VP type, per the official guidance.
- Check the JVPCLASSPATH parameter's setting is correct, per the official guidance.
Examples
Checking VPCLASS configuration
$ onstat -g glo | grep -i vpclass
Diagnostic Checks
- Check the routine's registered VP class and ONCONFIG's VPCLASS/JVPCLASSPATH settings, and correct whichever is missing or mismatched.
Related Errors / Related Topics
- -9436 — "Java UDR's VP class must be CLASS_JAVA." A related VP-class error, specific to Java UDRs requiring CLASS_JAVA rather than a general VP context-switch failure.
The server failed to switch to/from a UDR's virtual processor — check the routine's VP class and ONCONFIG's VPCLASS/JVPCLASSPATH settings.