NullPointerException thrown when using TransactionMonitor

Description

From https://answers.launchpad.net/erma/+question/44131:

When I'm trying to use TransactionMonitor with the following code:

TransactionMonitor txnmonitor = new TransactionMonitor(getClass(), "sometexthere", MonitoringLevel.INFO);
...
txnmonitor.succeeded();
txnmonitor.done();

I get the following exception:

[MonitoringEngine:623] [class com.orbitz.monitoring.api.monitor.TransactionMonitor attributes={sequenceId=m, threadId=11768ab, createdAt=Thu Sep 04 15:11:07 WAT 2008, name=[some.secret.here]}level=INFO] will be processed by [com.orbitz.monitoring.lib.processor.AsyncMonitorProcessor@1cc4e47]
[MonitoringEngine:631] Throwable caught while processing [class com.orbitz.monitoring.api.monitor.TransactionMonitor attributes={sequenceId=m, threadId=11768ab, createdAt=Thu Sep 04 15:11:07 WAT 2008, name=[some.secret.here]}level=INFO]; application is unaffected:
java.lang.NullPointerException
at com.orbitz.monitoring.api.monitor.AbstractCompositeMonitor.getSerializableMomento(AbstractCompositeMonitor.java:97)
at com.orbitz.monitoring.lib.processor.AsyncMonitorProcessor.monitorCreated(AsyncMonitorProcessor.java:61)
at com.orbitz.monitoring.api.MonitoringEngine$1.processWithProcessor(MonitoringEngine.java:225)
at com.orbitz.monitoring.api.MonitoringEngine.handleMonitor(MonitoringEngine.java:629)
at com.orbitz.monitoring.api.MonitoringEngine.monitorCreated(MonitoringEngine.java:218)
at com.orbitz.monitoring.api.monitor.AbstractMonitor.init(AbstractMonitor.java:255)
at com.orbitz.monitoring.api.monitor.AbstractMonitor.<init>(AbstractMonitor.java:57)
at com.orbitz.monitoring.api.monitor.AbstractCompositeMonitor.<init>(AbstractCompositeMonitor.java:38)
at com.orbitz.monitoring.api.monitor.TransactionMonitor.<init>(TransactionMonitor.java:51)
at com.orbitz.monitoring.api.monitor.TransactionMonitor.<init>(TransactionMonitor.java:91)
[... some secret stack continuation ...]

The _childMonitors member seems to be null..

Cheers,
Jakub

Environment

None

Assignee

Matthew Kemp

Reporter

Matthew O'Keefe

Labels

None

Fix versions

Affects versions

Priority

Major
Configure