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".