Handling of Blank Parameter by JDBC Adapter in IS 7.1

Ever since our company migrate our Wm IS to 7.1 we encounter errors when calling a JDBC Adapter Service (Stored Procedure) where an empty string parameter was not accepted by the adapter with error log as below:

  • Cannot set data for the input field “update_datetime”
  • Timestamp format must be yyyy-mm-dd hh:mm:ss.fffffffff

update_datetime is a nullable Datetime column in Sybase DB and declared as Timestamp JDBC type in the adapter.

In our flow service, update_datetime is stored in a document field with in string format:“yyyyMMdd”, which can also be blank(empty string) if the value is not set. Before calling the adapter, the service tries to re-format the field to the format “yyyy-mm-dd hh:mm:ss.fffffffff” if it’s not null, else the field remains as blank (empty string not null).

The simple fix is: if the value is not set, I just clear it from the pipeline (making it null), so null value instead of empty string is passed to the adapter, which works fine. The things is: before migration to Wm IS 7.1, the service works alright and never complains about the empty string parameter. :confused:

I just want to know if anyone has encounter the same kind of error. And can some experts confirm on the different behavior of Adapter service in Wm IS 7.1. Thanks!

I’m not an expert, but on JDBC adapters, I typically use String objects as my input even if the column type is a timestamp. That way, things work a little smoother. That way, your nullable column will still get set null, and the JDBC adapter doesn’t complain. Within WM, I try to avoid setting things other than Strings because they do cause some side effects when you don’t expect them too.

_brett.