Informix Error -9491: User threads are not allowed in this context, must be a DBAThread.
Cause and resolution
User threads are not allowed in this context, must be a DBAThread.
Java threads created by users from within user-defined routines are not allowed to open JDBC connections.
If such threads need to execute SQL statements, then they need to open Solano connections to run the queries against.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9491 fires when a user-created Java thread, spawned from within a UDR, attempts to open a JDBC connection — per the official guidance.
- A user thread (not the UDR's own executing thread) attempting to open a JDBC connection, per the official guidance — the direct, only cause; Java threads created by users from within UDRs aren't allowed to open JDBC connections.
Solutions / Resolution
- Have the user thread open a Solano connection instead, to run queries against, per the official guidance, if it needs to execute SQL statements.
Examples
N/A
No specific triggering statement is documented beyond a user-created thread opening a JDBC connection.
Diagnostic Checks
- Check the UDR's code for threads it spawns, and switch any SQL access on those threads to a Solano connection instead of JDBC.
Related Errors / Related Topics
- -9468 — "Cannot make UDR connection in non-UDR thread." The related, general case of this restriction, for JDBC connections from non-UDR threads.
- -9472 — "Error creating Solano connection: (%s)." A related connection error, for the Solano-protocol alternative this guidance recommends.
A user-created thread tried to open a JDBC connection, which isn't allowed — use a Solano connection from that thread instead.