APAR status
Closed as program error.
Error description
Environment: WDI 3.3 MultiPlatform SFP4. Problem recreated on Windows and reported against both Windows and AIX. WDIEmailNotify sample java program is not usable when multiple events are being serviced from designated WMQ queue, i.e. WDIQueue2Session is used for CEH. Error message from log: Exception caught from Handler Plug-in null java.lang.NullPointerException at com.ibm.edi.wdievents.email.Logger.write(Logger.java:90) at com.ibm.edi.wdievents.email.WDIEmailNotify.handleLogSession (WDIEmailNotify.java:254) at com.ibm.edi.wdievents.WDIEventBroker.<init>(WDIEventBroker. java:110) at com.ibm.edi.wdievents.WDIEventBroker.main(WDIEventBroker. java:166) Test scenario: - change wdi.properties to use: wdiSource=com.ibm.edi.wdievents.WDIQueue2Session - run wditest.bat twice to get 2 event (XML prtfiles) in the designated MQ queue. - Then send to email via command: wdirunceh.bat >wdiceh_stdout.log 2>&1 - One email, for the 1st event, is sent successfully. However, two should have been sent. - Note that queue specified for "dlqueuename" contains the 2nd "missing" event. The NullPointerException occurs while processing the 2nd event. A null pointer exception is thrown in public class Logger, and method write(String) fos.write(sb.toString().getBytes()); After a logger.close() then fos = null. However logger itself is still an valid object. For the next message the method logger.getInstance does not create a new instance as Logger.logger != null. Therefore fos is still null. And for the next write() you will see the null pointer exception. Test files: CEH_setup.pdf - Setup documentation CEH_profiles.eif - Appdef, Event, MQ, mailbox profiles wdi.properties - Used by wdirunceh.bat wdiceh.log - "logFile" from wdi.properties setting wdiceh_stdout.log - stdout from wdirunceh.bat WDISessionLog1279836030562.txt - (first) event sent to email Keywords: common event handler handling Email Notification
Local fix
Problem summary
The NullPointerException occurs while processing the 2nd event when using WDIQueue2Session source and the sample WDI email notification.
Problem conclusion
The sample code in edicevhsample.jar has been altered to set the logger reference to null, exiting from WDIEmailNotify method to handle the individual log sessions. Also, the Logger class resets its static member variable if the log file gets closed.
Temporary fix
The client may alter the Java sample code and build an appropriate class. This sample shows features of event handling, but it is not robust enough for a production environment.
Comments
CMVC defect P8012150 integrated from WDIEventHandler component. The sample e-mail JAR is on several platforms.
APAR Information
APAR number
IC70171
Reported component name
WEBS DI MP
Reported component ID
5724C5003
Reported release
330
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2010-07-23
Closed date
2010-09-27
Last modified date
2010-09-27
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WEBS DI MP
Fixed component ID
5724C5003
Applicable component levels
R330 PSY
UP
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCFJHL","label":"WDI 3.3 MP"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"3.3","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
27 September 2010