APAR status
Closed as program error.
Error description
When referencing a date component and specifying a format string a NullPointerException may be thrown if the date component has not been assigned a value. This is because the WCM code is sending a null value to be formatted and thus resulting in a null pointer exception. The stack may resemble the following: .. IWKPC1085X: Exception while rendering inlined component type: class com.aptrix.pluto.cmpnt.CmpntReference - Exception: java.lang. NullPointerException java.lang NullPointerException at java.util.Calendar.setTime (Calendar.java:1062) at java.text.SimpleDateFormat.format (SimpleDateFormat.java:816) at java.text.SimpleDateFormat.format (SimpleDateFormat.java:809) at java.text.DateFormat.format (DateFormat.java:331) at com.aptrix.pluto.cmpnt.CmpntUtils.formatDate (CmpntUtils.java:617) at com.aptrix.pluto.cmpnt.CmpntUtils.formatDate (CmpntUtils.java:546) .. This issue was originally found when using a navigator cmpnt to reference a date component with the following tag: .. <Element context="autoFill" type="content" key="Document Date" format="dd MMM yyyy"/>
Local fix
Either populate the component or remove the format string from the reference.
Problem summary
NullPointerException encountered when navigator has an element tag that references a date component that is not set. . When referencing a date component with a format string a NullPointerException can occur if the date is not complete. The follow is an example of the stack: 11/28/08 11:31:08:722 SGT 00000037 Cmpnt W IWKPC1085X: Exception while rendering inlined component type: class at com.aptrix.pluto.cmpnt.CmpntUtils.formatDate (CmpntUtils.java:546) at com.aptrix.pluto.cmpnt.DateCmpnt.getStringValue (DateCmpnt.java:126) ..
Problem conclusion
This issue was discovered when a customer referenced a date component from within a navigator as follows <Element context="autoFill" type="content" key="DOC DATE" format="dd MMM yyyy"/> the issue is WCM is passing a blank date to be formatted and this results in a NullPointerException being thrown. . The code changes return an empty string if the date is null, thus bypassing the format in cases where there is no date to format.
Temporary fix
remove format from the reference.
Comments
APAR Information
APAR number
PK77063
Reported component name
LOTUS WEB CONT
Reported component ID
5724I2900
Reported release
610
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2008-12-07
Closed date
2008-12-16
Last modified date
2008-12-16
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
WCM
Fix information
Fixed component name
LOTUS WEB CONT
Fixed component ID
5724I2900
Applicable component levels
R610 PSY
UP
[{"Business Unit":{"code":"BU051","label":"N\/A"},"Product":{"code":"SUPPORT","label":"IBM Web Content Manager"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.1","Line of Business":{"code":"LOB33","label":"N\/A"}}]
Document Information
Modified date:
20 December 2021