Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-9489

JobExecutionException when using cron job with Provisiond

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 20.0.0
    • Fix Version/s: None
    • Component/s: None
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      The following cron job was added in provisiond-configuration.xml:

      <requisition-def import-name="Websites" import-url-resource="file:///websites.xml">
          <cron-schedule>0 30 17 * * ? *</cron-schedule>
      </requisition-def>
      

      The is located on the file system of the server on /websites.xml

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
      <model-import xmlns="http://xmlns.opennms.org/xsd/config/model-import" foreign-source="Websites">
          <node node-label="yum.opennms.org" foreign-id="yum.opennms.org">
              <interface ip-addr="46.101.211.239" snmp-primary="P">
                  <monitored-service service-name="Web-Landing-Page-SSL"/>
                  <monitored-service service-name="Web-Landing-Page"/>
                  <monitored-service service-name="SSL-Cert-HTTPS-443"/>
              </interface>
              <category name="type:website"/>
              <category name="category:service"/>
              <category name="organisation:opennms-org"/>
              <category name="environment:production"/>
          </node>
          <node node-label="xmlns.opennms.org" foreign-id="xmlns.opennms.org">
              <interface ip-addr="46.101.211.239" snmp-primary="P">
                  <monitored-service service-name="SSL-Cert-HTTPS-443"/>
              </interface>
              <category name="type:website"/>
              <category name="category:service"/>
              <category name="organisation:opennms-org"/>
              <category name="environment:production"/>
          </node>
          <node node-label="jabber.opennms.org" foreign-id="jabber.opennms.org">
              <interface ip-addr="45.55.222.142" snmp-primary="P">
                  <monitored-service service-name="SSL-Cert-XMPP-5223"/>
              </interface>
              <category name="type:website"/>
              <category name="category:service"/>
              <category name="organisation:opennms-org"/>
              <category name="environment:production"/>
          </node>
      </model-import>
      

      The error message in provisiond.log:

      2017-07-03 17:30:00,008 INFO  [provisiond_Worker-1] o.q.c.JobRunShell: Job Provisiond.Websites threw a JobExecutionException:
      org.quartz.JobExecutionException: java.lang.ClassCastException: Identified object is not a String.
              at org.opennms.netmgt.provision.service.ImportJob.execute(ImportJob.java:66) ~[opennms-provisiond-21.0.0-SNAPSHOT.jar:?]
              at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.3.jar:?]
              at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.3.jar:?]
      Caused by: java.lang.ClassCastException: Identified object is not a String.
              at org.quartz.utils.StringKeyDirtyFlagMap.getString(StringKeyDirtyFlagMap.java:378) ~[quartz-2.2.3.jar:?]
              at org.opennms.netmgt.provision.service.ImportJob.execute(ImportJob.java:58) ~[opennms-provisiond-21.0.0-SNAPSHOT.jar:?]
              ... 2 more
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              indigo Ronny Trommer
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: