Informix Error -9477: Cannot obtain UDR environment.
Cause and resolution
Cannot obtain UDR environment.
UDR environment objects are available only to Java UDR threads. Make sure the getUDREnv() method is not invoked by a child thread forked by the Java UDR.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9477 fires when getUDREnv() is called from a thread other than the one executing the
Java UDR — per the official guidance.
getUDREnv()invoked by a child thread forked by the Java UDR, per the official guidance — the direct, only cause; UDR environment objects are available only to Java UDR threads.
Solutions / Resolution
- Make sure
getUDREnv()isn't invoked by a child thread forked by the Java UDR, per the official guidance — call it directly on the UDR's own executing thread.
Examples
N/A
No specific triggering statement is documented beyond calling getUDREnv() from a forked
child thread.
Diagnostic Checks
- Check the Java UDR's code for where
getUDREnv()is called, and move it onto the UDR's own executing thread if it's on a child thread.
Related Errors / Related Topics
- -9468 — "Cannot make UDR connection in non-UDR thread." The same class of wrong-thread error, for JDBC connections rather than the UDR environment object.
getUDREnv() was called from a forked child thread instead of the UDR's own thread — call
it on the UDR's executing thread.