Informix Error -9452: Error processing null argument. Use Java object form of type (%s).
Cause and resolution
Error processing null argument. Use Java object form of type (%s).
You have probably used a Java primitive type as an argument to a Java method that maps to the specified Java UDR. A null value for a primative-type argument is invalid. Replace the Java primitive type with a Java Object type. For example, replace "int" with "java.lang.Integer".
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9452 fires when a null value is passed to a Java UDR method parameter declared as a primitive type — per the official guidance.
- A null argument passed for a Java primitive-type parameter, per the official guidance — the direct, only cause; a null value for a primitive-type argument is invalid.
Solutions / Resolution
- Replace the Java primitive type with a Java Object type — for example, replace
intwithjava.lang.Integer, per the official guidance.
Examples
A primitive-type parameter receiving null
public static int myMethod(int a) { ... } -- -9452 if the SQL argument is NULL
Corrected — using the boxed type
public static Integer myMethod(Integer a) { ... }
Diagnostic Checks
- Check whether the SQL call can pass NULL for the argument, and change the Java method's parameter to the corresponding object (boxed) type if so.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -9452 in this set yet.
A null argument was passed to a Java primitive-type parameter — use the object (boxed) form of the type instead.