SXI Forum

A place to collect usefull tips, tricks and implementation strategies.

You are not logged in.

#1 21-11-2018 10:58:30

SeanR
Administrator
Registered: 20-11-2018
Posts: 148

X-Notify 9.1.14.NullPointerException

Error:
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] java.lang.NullPointerException: Thread 'XNotifyXml' stopped unexpectedly: null, will restart it
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] StackTrace:
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] bin.NotificationService.sendNotification(NotificationService.java:197)
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] plugins.input.InputAbstractPlugin.sendNotification(InputAbstractPlugin.java:61)
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] plugins.input.XNotifyXml.processFile(XNotifyXml.java:44)
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] plugins.input.XNotifyXml.loopIteration(XNotifyXml.java:84)
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] plugins.input.InputAbstractPlugin.run(InputAbstractPlugin.java:69)
[za.co.sxi.concurrent.MonitoredThreadFactory$RecoverableThreadRunner.uncaughtException] java.lang.Thread.run(Unknown Source)

Cause:

  • In X-Notify/xml/Initialisation.xml, the Notifiers element children might be configured as follows (note the highlighted lines):

      <Notifiers>
        <EMail id="EMail">
          <SmtpServer>127.0.0.1</SmtpServer>
          <FromAddress>from@company.co.za</FromAddress>
          <SmtpAuthentication>
            <Basic Username="username@company.co.za" Password="mypassword"/>
          </SmtpAuthentication>
          <SmtpPort>25</SmtpPort>
        </EMail>
    	
        <XDec id="XDec"/>
    	
      </Notifiers>
  • Below the Notifiers element is the ApplicationGroups element, which is where the cause of the problem is located (see highlighted line):

     <ApplicationGroups>
       <ApplicationGroup applicationName="MyTest">
          <NotificationGroup name="Heartbeat Failure">
    	  
            <XDec notifier="EMail">
    		
              <Destination>127.0.0.1</Destination>
              <ESMTool>ServiceBroker</ESMTool>
              <MD>ServiceBroker1</MD>
              <Agent_Class>X-ServiceBroker</Agent_Class>
              <Agent_Instance>X-ServiceBroker</Agent_Instance>
              <Instance_Detail>X-ServiceBroker</Instance_Detail>
              <Server>ServiceBroker1</Server>
              <Client>ACME</Client>
              <Source>ServiceDesk</Source>
            </XDec>
          </NotificationGroup>
        </ApplicationGroup>
      </ApplicationGroups>
  • Effectively this means that we want to create an XDEC document using the EMAIL Notifier plugin, which is not possible. An XDEC document can only be created by using an XDEC Notifier plugin. The same applies to all Notifier plugins.



Resolution:

  • Change the ID in the affected ApplicationGroup config to reflect the correct Notifier ID:


     <ApplicationGroups>
       <ApplicationGroup applicationName="MyTest">
          <NotificationGroup name="Heartbeat Failure">
    
            <XDec notifier="XDec">
    
              <Destination>127.0.0.1</Destination>
              <ESMTool>ServiceBroker</ESMTool>
              <MD>ServiceBroker1</MD>
              <Agent_Class>X-ServiceBroker</Agent_Class>
              <Agent_Instance>X-ServiceBroker</Agent_Instance>
              <Instance_Detail>X-ServiceBroker</Instance_Detail>
              <Server>ServiceBroker1</Server>
              <Client>ACME</Client>
              <Source>ServiceDesk</Source>
            </XDec>
          </NotificationGroup>
        </ApplicationGroup>
      </ApplicationGroups>

Offline

Board footer

Powered by FluxBB