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

ConstraintViolationException in Enlinkd for OSPF

    Details

      Description

      On a customer install, the following exception keeps appearing in output.log.

      Exception in thread "Scheduler-Thread-6-of-5" org.springframework.dao.DataIntegrityViolationException: could not insert: [org.opennms.netmgt.model.OspfElement]; SQL [insert into ospfElement (nodeId, ospfASBdrRtrStatus, ospfAdminStat, ospfBdrRtrStatus, ospfNodeCreateTime, ospfNodeLastPollTime, ospfRouterId, ospfRouterIdIfindex, ospfRouterIdNetmask, ospfVersionNumber, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)]; constraint [ospfrouteridnetmask]; nested exception is org.hibernate.exception.ConstraintViolationException: could not insert: [org.opennms.netmgt.model.OspfElement]
              at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:659)
              at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:414)
              at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:416)
              at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:379)
              at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:938)
              at org.opennms.netmgt.dao.hibernate.AbstractDaoHibernate.flush(AbstractDaoHibernate.java:94)
              at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl.store(EnhancedLinkdServiceImpl.java:442)
              at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$FastClassBySpringCGLIB$$fe4d2451.invoke(<generated>)
              at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
              at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
              at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:98)
              at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:262)
              at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:95)
              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
              at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)
              at org.opennms.netmgt.enlinkd.EnhancedLinkdServiceImpl$$EnhancerBySpringCGLIB$$fa8dd034.store(<generated>)
              at org.opennms.netmgt.enlinkd.NodeDiscoveryOspf.runCollection(NodeDiscoveryOspf.java:119)
              at org.opennms.netmgt.enlinkd.NodeDiscovery.run(NodeDiscovery.java:121)
              at org.opennms.netmgt.enlinkd.scheduler.Scheduler$1.run(Scheduler.java:209)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at org.opennms.core.concurrent.LogPreservingThreadFactory$3.run(LogPreservingThreadFactory.java:124)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.hibernate.exception.ConstraintViolationException: could not insert: [org.opennms.netmgt.model.OspfElement]
              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2455)
              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2875)
              at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:79)
              at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:273)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:265)
              at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:184)
              at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321)
              at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:51)
              at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1216)
              at org.springframework.orm.hibernate3.HibernateTemplate$27.doInHibernate(HibernateTemplate.java:941)
              at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:411)
              ... 21 more
      Caused by: org.postgresql.util.PSQLException: ERROR: null value in column "ospfrouteridnetmask" violates not-null constraint
        Detail: Failing row contains (554995, 11, 10.0.0.10, 1, 2, 2, 2, null, null, 2016-01-05 14:18:10.141-05, 2016-01-05 14:18:10.141-05).
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:560)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
              at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
              at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
              at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
              at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2435)
              ... 31 more
      

        Attachments

          Activity

            People

            • Assignee:
              rssntn67 Antonio Russo
              Reporter:
              j-white Jesse White
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: