Webmethods 9.9 Impossible to insert row with timestamp column

Hi

I am using a custom JDBC dapter. the relevant bit of the sql request is as follows


?,
to_timestamp_tz(?, ‘YYYY-MM-DD HH24:MI:SS,FF3TZH:TZM’),
?,

I pass the value: 2016-04-14 13:53:27,652+02:00

I get the error:

Unable to invoke adapter service …
NumberFormat Exception for field: DATE_DOCUMENT. Error: For input string: “27,652+02:00”

I am unable to figure out what I am doing wrong, weirdly the request:

select to_timestamp_tz(‘2016-04-14 13:53:27,652+02:00’, ‘YYYY-MM-DD HH24:MI:SS,FF3TZH:TZM’) from dual;

executed in the same oracle database works fine.

Any suggestions ?

Best regards

which version of wM you are using ?

Set below one as part of extended settings:

watt.adapter.JDBC.DateWithTimestamp=true
watt.adapter.JDBC.DateWithTimestampAndMilliseconds=true

Thanks,

Hi

Thanks for your answer
I am using WM 9.9.

I kind of stumbled partly on the solution, in case anybody’s interested, I decided to set “Input Field Type” to “SetAstring”, which went well.
But Still the timezone bit is not inserted into the column but I guess I would have to add a parameter to the Extended Settings such as watt.adapter.JDBC.DateWithTimestampAndMillisecondsAndTimeZone or something.
Could you tell me where I can find a link to the 9.9 JDBC Adapter guide please ?

Best regards.

Hi,

Was the error coming from the Oracle server or from the Wm adaptor?

In the latter case, was it waiting to receive a datetime type and you gave it a string? was the string formatted according to the system’s locale definition?

Best regards,

Setting “Input Field Type” to “SetAstring” or to “java.lang.String” should work. For documentation kindly refer Empower or SAG Tech Community

http://techcommunity.softwareag.com/ecosystem/communities/public/webmethods/.links/documentation-webmethods

Hi

Eventually I remembered that the timezone bit is down to the column type, not the adapter, so “timestamp” was quickly switched to “timestamp with timezone”, so basically problem solved!

Thanks everyone.

Glad to hear issue got solved.

Can you tell what did you set as part of “InputJDBCType” & “InputFieldType”. Also did you write in ExtendedSettings ?

Thanks,

I first tried adding the two parameters to extended Settings but still got the same error.
Then on a hunch I tried SetAstring instead of String for “Input Field Type” which made it possible to insert the date but still without the timestamp, and then I switched timestamp to timestamp with timezone.

Best regards