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

Null ospfrouterid in NodeDiscoveryOspf

    Details

      Description

      I noticed the following stack trace on a system running 19 development code:

      Exception in thread "Scheduler-Thread-1-of-5" org.springframework.dao.DataIntegrityViolationException: could not update: [org.opennms.netmgt.model.OspfElement#594]; SQL [update ospfElement set nodeId=?, ospfASBdrRtrStatus=?, ospfAdminStat=?, ospfBdrRtrStatus=?, ospfNodeCreateTime=?, ospfNodeLastPollTime=?, ospfRouterId=?, ospfRouterIdIfindex=?, ospfRouterIdNetmask=?, ospfVersionNumber=? where id=?]; constraint [ospfrouterid]; nested exception is org.hibernate.exception.ConstraintViolationException: could not update: [org.opennms.netmgt.model.OspfElement#594]
              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:487)
              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$$157d5405.store(<generated>)
              at org.opennms.netmgt.enlinkd.NodeDiscoveryOspf.runCollection(NodeDiscoveryOspf.java:118)
              at org.opennms.netmgt.enlinkd.NodeDiscovery.run(NodeDiscovery.java:106)
              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 update: [org.opennms.netmgt.model.OspfElement#594]
              at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:96)
              at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
              at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2613)
              at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2495)
              at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2822)
              at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:113)
              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:185)
              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 "ospfrouterid" violates not-null constraint
        Detail: Failing row contains (594, 120, null, 1, 2, 2, 2, 255.255.255.255, null, 2016-06-17 09:25:06.71-05, 2016-08-05 08:08:24.663-05).
              at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
              at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
              at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
              at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
              at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
              at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
              at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:384)
              at org.hibernate.jdbc.NonBatchingBatcher.addToBatch(NonBatchingBatcher.java:46)
              at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:2591)
              ... 32 more
      

        Attachments

          Activity

            People

            • Assignee:
              rssntn67 Antonio Russo
              Reporter:
              seth Seth Leger
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: