Java API: Method getWeekOfYear of class Date Time generates IllegalArgumentException

book

Article ID: 84951

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine

Issue/Introduction

Error Message :
Exception in thread "main" java.lang.IllegalArgumentException: Illegal start time

 The Java API method getWeekOfYear of class Date Time generates an IllegalArgumentException if it is called using an invalid date.

A change was made in the fix versions listed below so that the method now returns zero and the IllegalArgumentException is not generated.

Entire exception:

Exception in thread "main" java.lang.IllegalArgumentException: Illegal start time 87720000
         at java.util.SimpleTimeZone.decodeStartRule(Unknown Source)
         at java.util.SimpleTimeZone.setStartRule(Unknown Source)
         at com.uc4.communication.requests.GetSessionTZ.getAndCalcSystemTimeZone(GetSessionTZ.java:115)
         at com.uc4.communication.requests.GetSessionTZ.handleContent(GetSessionTZ.java:53)
         at com.uc4.communication.requests.XMLRequest.handleResponse(XMLRequest.java:82)
         at com.uc4.communication.Connection.sendRequestAndWait(Connection.java:1269)
         at com.uc4.communication.Connection.sendLogin(Connection.java:1519)
         at com.uc4.communication.Connection.login(Connection.java:1486)
         at com.uc4.communication.Connection.login(Connection.java:1422)
         at com.bosch.framework.ae.CAEConnection.createAEConnection(CAEConnection.java:140)
         at com.bosch.framework.ae.CAEConnection.connect(CAEConnection.java:81)
         at com.bosch.framework.ae.CAEConnection.<init>(CAEConnection.java:36)
         at com.bosch.uc4.apps.test.TestConnection.main(TestConnection.java:13)

 

Cause

Cause type:
Defect
Root Cause: Method getWeekOfYear of class DateTime generates IllegalArgumentException if it is called on an invalid date. In that case the method now returns zero and IllegalArgumentException is not generated.

Environment

OS Version: N/A

Resolution

Update to a fix version listed below or a newer version if available.

Fix Status: In Progress

Fix Version(s):
Automation Engine 12.1.0 - Available
Automation Engine 12.0.2 - Available
Automation Engine 11.2.4 - Available

Additional Information

Workaround :
N/A