Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

IllegalArgumentException when referencing pyPostEmailContent

SA-76403

Summary



IllegalArgumentException occurs when referencing the PegaSocial-Message.pyPostEmailContent section.


Error Messages



[sse-nio-8401-exec-27] [STANDARD] [ ] [CPSX:02.01.01] (pub.util.PRDateFormat) ERROR - Cannot create format "MMM dd, yyyy hh:mm A", default format is used
java.lang.IllegalArgumentException: Illegal pattern character 'A'
    at java.text.SimpleDateFormat.compile(SimpleDateFormat.java:826) ~[?:1.8.0_172]
    at java.text.SimpleDateFormat.initialize(SimpleDateFormat.java:634) ~[?:1.8.0_172]
    at java.text.SimpleDateFormat.<init>(SimpleDateFormat.java:605) ~[?:1.8.0_172]
    at com.pega.ibm.icu.impl.pega.LocaleElements.getSimpleDateFormat(LocaleElements.java:1373) ~[pricu2jdk.jar:?]
    at com.pega.ibm.icu.text.SimpleDateFormat.<init>(SimpleDateFormat.java:93) ~[pricu2jdk.jar:?]
    at com.pega.pegarules.pub.util.PRDateFormat.createRealFormat(PRDateFormat.java:1885) ~[prpublic.jar:?]
    at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source) ~[?:?]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_172]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_172]
    at com.pega.pegarules.pub.util.PerThreadCache$1.get(PerThreadCache.java:313) ~[prpublic.jar:?]
    at com.pega.pegarules.pub.util.PerThreadCache.getFormat(PerThreadCache.java:267) ~[prpublic.jar:?]
    at com.pega.pegarules.pub.util.PRDateFormat.format(PRDateFormat.java:504) ~[prpublic.jar:?]
    at com.pega.pegarules.exec.internal.util.PRDateTimeUtilsImpl.formatDateTime(PRDateTimeUtilsImpl.java:704) ~[prprivate.jar:?]
    at com.pega.pegarules.exec.internal.util.PRDateTimeUtilsImpl.formatDateTime(PRDateTimeUtilsImpl.java:723) ~[prprivate.jar:?]
    at com.pegarules.generated.pxFormatDateTime_071035_2530288085359727883.pxFormatDateTime07_10_35(pxFormatDateTime_071035_2530288085359727883.java:634) ~[?:?]
    at com.pegarules.generated.pxFormatDateTime_071035_2530288085359727883.invoke(pxFormatDateTime_071035_2530288085359727883.java:73) ~[?:?]
    at com.pega.pegarules.generation.internal.library.LibraryRuntime.resolveAndinvokeFunctionViaReflection(LibraryRuntime.java:222) ~[prprivate.jar:?]
    at com.pega.pegarules.generation.internal.library.LibraryRuntime.invokeLibraryRuntime(LibraryRuntime.java:119) ~[prprivate.jar:?]
    at com.pega.pegarules.session.internal.mgmt.Executable.invokeLibraryRuntime(Executable.java:9150) ~[prprivate.jar:?]
    at com.pega.pegarules.priv.generator.LibrarySupport.resolveAndInvokeFunctionViaReflectionWithException(LibrarySupport.java:275) ~[prpublic.jar:?]
    at com.pegarules.generated.html_section.ra_stream_pypostemailcontent_6beded40a74df89d5a328c7b1fc62dfd.inclFormattedVal_1(ra_stream_pypostemailcontent_6beded40a74df89d5a328c7b1fc62dfd.java:3361) ~[?:?]



Steps to Reproduce



Invoke the pyPostEmailContent section.


Root Cause



The pyPostEmailContent section had referenced the pxCreateDateTime property with the 'MMM dd, yyyy hh:mm A' date format instead of 'MMM dd, yyyy hh:mm a'.


Resolution



Apply HFix-52198.

Published August 19, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us