JDBCException when provisioning on OpenNMS-17.0.0

Description

Hi,

I've stumbled upong the following error when trying to provision new nodes with OpenNMS-17 on my dev box:

2015-11-04 09:44:34,734 INFO [scanExecutor-1] o.o.n.p.s.NewSuspectScan: Attempting to scan new suspect address 10.4.1.143 for foreign source null
2015-11-04 09:44:34,839 WARN [scanExecutor-1] o.h.u.JDBCExceptionReporter: SQL Error: 0, SQLState: 23502
2015-11-04 09:44:34,839 ERROR [scanExecutor-1] o.h.u.JDBCExceptionReporter: ERROR: null value in column "monitoringarea" violates not-null constraint

Is there any valid reason why monitoringarea shall be not-null? And, how should I work around this (I haven't found any requisition policy allowing me to set this value)?

Best regards,

Environment

OpenNMS Version: 17.0.0-SNAPSHOT Home Directory: /usr/share/opennms RRD store by group enabled? False RRD store by foreign source enabled? False Reports directory: /var/lib/opennms/reports Jetty HTTP host: Unspecified Jetty HTTP port: 8980 Jetty HTTPS host: Unspecified Jetty HTTPS port: Unspecified SNMP trap port: 162 Syslog port: 10514 System Configuration Server Time: Wed Nov 04 09:50:53 CET 2015 Client Time: Wed Nov 04 2015 09:50:34 GMT+0100 (Romance Standard Time) Java Version: 1.8.0_45 Oracle Corporation Java Virtual Machine: 25.45-b02 Oracle Corporation Operating System: Linux 3.13.0-65-generic (amd64) Servlet Container: jetty/8.1.10.v20130312 (Servlet Spec 3.0) User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Seth Leger November 6, 2015 at 4:26 PM

monitoringarea is intended to be a not-null field, the code just needs to be updated to provide a default value for it. In future versions, it will be editable from the provisioning UI.

Cyrille Bollu November 4, 2015 at 3:58 AM

The following SQL command indeed solves the problem:

ALTER TABLE monitoringLocations ALTER COLUMN monitoringarea DROP NOT NULL;

Duplicate

Details

Assignee

Reporter

Components

Affects versions

Priority

PagerDuty

Created November 4, 2015 at 3:54 AM
Updated November 6, 2015 at 4:26 PM
Resolved November 6, 2015 at 4:25 PM