상세 컨텐츠

본문 제목

BW6 DateTime

TIBCO/BW6

by 야솔아빠 2021. 7. 22. 10:58

본문

반응형

Http response 의 date type 이 String이다.

DateTime format으로 변경하기 위해서 아래처럼 해야 함.

 

tib:parse-dateTime('EEE, dd MMM yyyy HH:mm:ss Z', 'Wed, 30 Jun 2021 06:31:07 GMT')

 

그런데 만약 에러가 발생하면..

아래 내용을 참고하자.

 

Description:

============

On some environments tib:parse-dateTime('EEE, dd MMM yyyy HH:mm:ss', 'Wed, 30 Jun 2021 06:31:07 GMT') or similar expression might throw: com.tibco.xml.cxf.runtime.exceptions.FunctionException: Unparseable date: "Wed, 30 Jun 2021 06:31:07 GMT" In above example, although the date seems to be fine, 'Jun' word is used as the abbreviation for English 'June' month name. In such case JVM language must be also set to English for BW to be able to properly parse that expression.

Environment:

============

TIBCO BusinessWorks™ (BW) all versions.

Cause:

======

Java method used to parse the dateTime function will use Regional Language settings to parse the date. If the date expression contains abbreviation for month names or day of the week names (e.g. Jan, Feb or Mon, Tue) the language setting for JVM must match the language used in the expression.

By default BW's JVM inherits the Regional Settings after the OS.

Resolution:

===========

Enable Trace.Startup=true tracing property end verify below setting in the startup banner of BW Engine:

user.language=en

 

This setting must show the same language that is used in month names or days of the week names otherwise mentioned exception will be thrown.

To resolve change the OS Regional Setting for language to match the language used in the date expression you want to parse.

Alternatively you can also override the OS Settings using below Engine property:

java.property.user.language=en

 

 

그래서 난 TIBCOBusinessStudio.ini 파일에 아래 내용을 추가 하여 해결

-Duser.language=en

반응형

관련글 더보기

댓글 영역